[PATCH v2 3/6] i2cset: Abort if value mask is set for block commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux