Whamcloud - gitweb
LU-1581 utils: unknown fstype
authorAlex Zhuravlev <bzzz@whamcloud.com>
Sun, 17 Jun 2012 06:18:15 +0000 (10:18 +0400)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 4 Jul 2012 22:29:50 +0000 (18:29 -0400)
scream and exit if specific fstype is not recognized

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib5e897bdfe9609be81d74a41fd65ec57b6cf5d37
Reviewed-on: http://review.whamcloud.com/3225
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
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':