← Commit list

cd8eece88

Denys Vlasenko
Denys Vlasenko
2013-07-02
FAILED Duration: 115s

Subject

foo*sum: report I/O errors, don't merely exit with 1.

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/md5_sha1_sum.c+3 -1
@@ -151,7 +151,9 @@ static uint8_t *hash_file(const char *filename)
update(&context, in_buf, count);
}
hash_value = NULL;
- if (count == 0) {
+ if (count < 0) {
+ bb_perror_msg("can't read '%s'", filename);
+ else /* count == 0 */ {
final(&context, in_buf);
hash_value = hash_bin_to_hex(in_buf, hash_len);
}