Whamcloud - gitweb
LU-1581 utils: unknown fstype 25/3225/4
authorAlex Zhuravlev <bzzz@whamcloud.com>
Sun, 17 Jun 2012 06:18:15 +0000 (10:18 +0400)
committerAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 2 Jul 2012 16:47:15 +0000 (20:47 +0400)
scream and exit if specific fstype is not recognized

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib5e897bdfe9609be81d74a41fd65ec57b6cf5d37

lustre/utils/mkfs_lustre.c

index 21f7d19..0af4fae 100644 (file)
@@ -293,6 +293,11 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop,
                                 }
                                 i++;
                         }
+                       if (i == LDD_MT_LAST) {
+                               fprintf(stderr, "%s: invalid backend filesystem"
+                                       " type %s\n", progname, optarg);
+                               return 1;
+                       }
                         break;
                 }
                 case 'c':