diff options
author | Brian Norris <computersforpeace@gmail.com> | 2010-11-30 22:20:46 -0800 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-12-02 05:26:14 +0200 |
commit | f0cc488fd772934bd41c6afdbee495f20d8516df (patch) | |
tree | 8c081b8a5ed072def82ae62c49c6fd47f6949f16 /nandwrite.c | |
parent | 0d6504cadbe0ac4c898789cfc1ea1e303dbb5db0 (diff) |
nandwrite: use common.h "errmsg_die"
errmsg_die() should be nearly the equivalent of the error message used
here. This saves a few lines.
Also edited the error message to include the offending option and got
rid of the quotes.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'nandwrite.c')
-rw-r--r-- | nandwrite.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/nandwrite.c b/nandwrite.c index 2e45136..7f459cb 100644 --- a/nandwrite.c +++ b/nandwrite.c @@ -212,11 +212,9 @@ static void process_options(int argc, char * const argv[]) } } - if (mtdoffset < 0) { - fprintf(stderr, "Can't specify a negative device offset `%lld'\n", - mtdoffset); - exit(EXIT_FAILURE); - } + if (mtdoffset < 0) + errmsg_die("Can't specify negative device offset with option" + " -s: %lld", mtdoffset); if (blockalign < 0) errmsg_die("Can't specify negative blockalign with option -b:" |