Message ID | 1291017722-23985-7-git-send-email-computersforpeace@gmail.com |
---|---|
State | New, archived |
Headers | show |
On Mon, Nov 29, 2010 at 03:02, Brian Norris wrote: > + errmsg_die("Can't specify a negative blockalign '%d'", > + blockalign); personally, i'd avoid quotes on non-string types. maybe also mention the command line option that is "blockalign" ? otherwise, these changes all look fine to me -mike
On 11/29/2010 12:05 AM, Mike Frysinger wrote: > On Mon, Nov 29, 2010 at 03:02, Brian Norris wrote: >> + errmsg_die("Can't specify a negative blockalign '%d'", >> + blockalign); > > personally, i'd avoid quotes on non-string types. maybe also mention > the command line option that is "blockalign" ? I'm sending some "v2" patches related to these err messages. I'm not sure what the best, descriptive messages are, but I tried. Brian
diff --git a/nandwrite.c b/nandwrite.c index 5373a89..c409878 100644 --- a/nandwrite.c +++ b/nandwrite.c @@ -218,6 +218,10 @@ static void process_options(int argc, char * const argv[]) exit(EXIT_FAILURE); } + if (blockalign < 0) + errmsg_die("Can't specify a negative blockalign '%d'", + blockalign); + argc -= optind; argv += optind;
Signed-off-by: Brian Norris <computersforpeace@gmail.com> --- nandwrite.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)