aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartekgola@gmail.com>2015-06-05 10:27:30 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-06-07 18:05:47 +0200
commit2204472497285dd6fd7b686bb49732fda7394492 (patch)
treea5dfb0d2e917a30d25d472ddc371229c1e7d640d /miscutils
parente545bf6723ebfd486c6dce6b754b6de792c46de1 (diff)
downloadbusybox-w32-2204472497285dd6fd7b686bb49732fda7394492.tar.gz
busybox-w32-2204472497285dd6fd7b686bb49732fda7394492.tar.bz2
busybox-w32-2204472497285dd6fd7b686bb49732fda7394492.zip
i2cdetect: add a check for (mode == DETECT_MODE_AUTO)
We should only warn the user about addresses to be skipped if (mode == DETECT_MODE_AUTO). Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/i2c_tools.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index 6f9787280..16784e948 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -1336,7 +1336,9 @@ int i2cdetect_main(int argc UNUSED_PARAM, char **argv)
1336 } else 1336 } else
1337 if (mode == DETECT_MODE_READ && !(funcs & I2C_FUNC_SMBUS_READ_BYTE)) { 1337 if (mode == DETECT_MODE_READ && !(funcs & I2C_FUNC_SMBUS_READ_BYTE)) {
1338 no_support("SMBus Receive Byte command"); 1338 no_support("SMBus Receive Byte command");
1339 } else { 1339 }
1340
1341 if (mode == DETECT_MODE_AUTO) {
1340 if (!(funcs & I2C_FUNC_SMBUS_QUICK)) 1342 if (!(funcs & I2C_FUNC_SMBUS_QUICK))
1341 will_skip("SMBus Quick Write"); 1343 will_skip("SMBus Quick Write");
1342 if (!(funcs & I2C_FUNC_SMBUS_READ_BYTE)) 1344 if (!(funcs & I2C_FUNC_SMBUS_READ_BYTE))