Browse Source

Return the correct error code on I2C block read failure.

git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5073 7894878c-1315-0410-8ee3-d5d059ff63e0
tags/v3.0.1
Jean Delvare 18 years ago
parent
commit
7abc52d779
  1. 1
      CHANGES
  2. 4
      tools/i2cdump.c

1
CHANGES

@ -7,6 +7,7 @@ SVN
decode-vaio: Private data might not be readable by non-root users
Print the asset tag
Fix the timestamp decoding
i2cdump: Fix I2C block mode error code
i2cset: Final status messages go to stdout
Return success even when readback fails or doesn't match
i2c-stub-from-dump: New helper script to use with i2c-stub

4
tools/i2cdump.c

@ -313,8 +313,10 @@ int main(int argc, char *argv[])
for (res = 0; res < 256; res += i) {
i = i2c_smbus_read_i2c_block_data(file,
res, 32, cblock + res);
if (i <= 0)
if (i <= 0) {
res = i;
break;
}
}
}
if (res <= 0) {

Loading…
Cancel
Save