On Sun, 13 Feb 2011 12:17:23 -0800, Guenter Roeck wrote:
> 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 c59186b..bdc16f8 100644
> --- a/tools/i2cset.c
> +++ b/tools/i2cset.c
> @@ -227,6 +227,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();
> +                     }
>                       for (len = 0; len + flags + 5 < argc; len++) {
>                               value = strtol(argv[flags + len + 4], &end, 0);
>                               if (*end || value < 0 || value > 0xff) {

Yes, good check.

-- 
Jean Delvare
--
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