From: Bartosz Golaszewski Date: Fri, 5 Jun 2015 08:27:30 +0000 (+0200) Subject: i2cdetect: add a check for (mode == DETECT_MODE_AUTO) X-Git-Tag: 1_24_0~108 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2204472497285dd6fd7b686bb49732fda7394492;p=oweals%2Fbusybox.git 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 Signed-off-by: Denys Vlasenko --- 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) } else if (mode == DETECT_MODE_READ && !(funcs & I2C_FUNC_SMBUS_READ_BYTE)) { no_support("SMBus Receive Byte command"); - } else { + } + + if (mode == DETECT_MODE_AUTO) { if (!(funcs & I2C_FUNC_SMBUS_QUICK)) will_skip("SMBus Quick Write"); if (!(funcs & I2C_FUNC_SMBUS_READ_BYTE))