[git commit] i2cdetect: add a check for (mode == DETECT_MODE_AUTO)
Denys Vlasenko
vda.linux at googlemail.com
Sun Jun 7 16:05:47 UTC 2015
commit: http://git.busybox.net/busybox/commit/?id=2204472497285dd6fd7b686bb49732fda7394492
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
We should only warn the user about addresses to be skipped if
(mode == DETECT_MODE_AUTO).
Signed-off-by: Bartosz Golaszewski <bartekgola at gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
miscutils/i2c_tools.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index 6f97872..16784e9 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))
More information about the busybox-cvs
mailing list