Specifying the value mask is not supported for block commands,
abort if it is specified anyway.

Signed-off-by: Guenter Roeck <[email protected]>
---
 tools/i2cset.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/i2cset.c b/tools/i2cset.c
index e835465..7750c03 100644
--- a/tools/i2cset.c
+++ b/tools/i2cset.c
@@ -223,6 +223,10 @@ int main(int argc, char *argv[])
                                fprintf(stderr, "Error: PEC not supported for 
I2C block writes!\n");
                                help();
                        }
+                       if (maskp) {
+                               fprintf(stderr, "Error: Mask not supported for 
block writes!\n");
+                               help();
+                       }
                        if (argc > (int)sizeof(block) + flags + 5) {
                                fprintf(stderr, "Error: Too many arguments!\n");
                                help();
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to