← Commit list

5ed6989d8

Bartosz Golaszewski
Bartosz Golaszewski
2015-11-01
SUCCESS Duration: 263s

Subject

i2cdump: display the numeric value for block read ioctl() errors

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 →

miscutils/i2c_tools.c+4 -2
@@ -732,8 +732,10 @@ static int read_block_data(int buf_fd, int mode, int *block)
tmp = i2c_smbus_read_i2c_block_data(
buf_fd, res, I2C_SMBUS_BLOCK_MAX,
cblock + res);
- if (tmp <= 0)
+ if (tmp <= 0) {
+ blen = tmp;
goto fail;
+ }
}
if (res >= I2CDUMP_NUM_REGS)
@@ -750,7 +752,7 @@ static int read_block_data(int buf_fd, int mode, int *block)
return blen;
fail:
- bb_error_msg_and_die("block read failed");
+ bb_error_msg_and_die("block read failed: %d", blen);
}
/* Dump all but word data. */