Whamcloud - gitweb
Give an error if -O is specified more than once to tune2fs.
authorTheodore Ts'o <tytso@mit.edu>
Wed, 15 Aug 2001 15:03:58 +0000 (11:03 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 15 Aug 2001 15:03:58 +0000 (11:03 -0400)
misc/ChangeLog
misc/tune2fs.c

index 8cedc06..238616c 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-15  Theodore Tso  <tytso@valinux.com>
+
+       * tune2fs.c (parse_tune2fs_options): Give an error if -O is
+               specified more than once.
+
 2001-08-10  Theodore Tso  <tytso@valinux.com>
 
        * mke2fs.8.in: Slim down text describing the -O flag to remove
index 0ec0c66..c506703 100644 (file)
@@ -550,6 +550,11 @@ static void parse_tune2fs_options(int argc, char **argv)
                                open_flag = EXT2_FLAG_RW;
                                break;
                        case 'O':
+                               if (features_cmd) {
+                                       com_err (program_name, 0,
+                                        _("-O may only be specified once"));
+                                       usage();
+                               }
                                features_cmd = optarg;
                                open_flag = EXT2_FLAG_RW;
                                break;