]> www.infradead.org Git - mtd-utils.git/commitdiff
ubinfo: handle -d correctly
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 20 Apr 2009 13:16:33 +0000 (16:16 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 20 Apr 2009 13:18:37 +0000 (16:18 +0300)
Fix ubinfo utility and make it handle -d parameter correctly.
Without this patch it simple refuses working with -d.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
ubi-utils/src/ubinfo.c

index 536ec013c60884a38d82002d5ae5a8d9862d2087..62d42b045ef8c0df5e74d2a8b82e4e6bd4d8fd8d 100644 (file)
@@ -21,8 +21,8 @@
  * Author: Artem Bityutskiy
  */
 
-#include <stdio.h>
 #include <stdint.h>
+#include <stdio.h>
 #include <getopt.h>
 #include <stdlib.h>
 #include <string.h>
@@ -364,9 +364,6 @@ int main(int argc, char * const argv[])
        if (err)
                return -1;
 
-       if (!args.node && args.devn != -1)
-               return errmsg("specify either device number or node file (use -h for help)");
-
        libubi = libubi_open(1);
        if (libubi == NULL)
                return sys_errmsg("cannot open libubi");