← Commit list

5afd63a63

Denys Vlasenko
Denys Vlasenko
2018-01-10
SUCCESS Duration: 143s

Subject

dd: exit with 1 if last write was incomplete

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/dd.c+7 -5
@@ -195,14 +195,16 @@ static bool write_and_stats(const void *buf, size_t len, size_t obs,
ssize_t n = full_write_or_warn(buf, len, filename);
if (n < 0)
return 1;
- if ((size_t)n == obs)
- G.out_full++;
- else if (n) /* > 0 */
- G.out_part++;
#if ENABLE_FEATURE_DD_THIRD_STATUS_LINE
G.total_bytes += n;
#endif
- return 0;
+ if ((size_t)n == obs) {
+ G.out_full++;
+ return 0;
+ }
+ if (n) /* > 0 */
+ G.out_part++;
+ return 1;
}
#if ENABLE_LFS