From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Delvare Subject: Re: [PATCH v2 3/6] i2cset: Abort if value mask is set for block commands Date: Mon, 14 Feb 2011 09:56:09 +0100 Message-ID: <20110214095609.4d1df42c@endymion.delvare> References: <1297628246-19367-1-git-send-email-guenter.roeck@ericsson.com> <1297628246-19367-4-git-send-email-guenter.roeck@ericsson.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1297628246-19367-4-git-send-email-guenter.roeck-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Guenter Roeck Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-i2c@vger.kernel.org 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 > --- > 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