Whamcloud - gitweb
ChangeLog, mke2fs.c:
authorTheodore Ts'o <tytso@mit.edu>
Tue, 17 Apr 2001 02:34:41 +0000 (02:34 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 17 Apr 2001 02:34:41 +0000 (02:34 +0000)
  mke2fs.c (create_journal_dev): Call ext2fs_create_journal_superblock()
  first, so if it's going to error out, the user finds out before
  waiting for the entire device to get zero'ed.
ChangeLog, util.c:
  util.c (parse_journal_opts): Remove code which allowed a bare number
   to be treated as a journal size.

misc/ChangeLog
misc/mke2fs.c
misc/util.c

index 4742d8b..e018e2b 100644 (file)
@@ -1,8 +1,16 @@
 2001-04-16  Theodore Tso  <tytso@valinux.com>
 
+       * util.c (parse_journal_opts): Remove code which allowed a bare
+               number to be treated as a journal size.
+
        * mke2fs.c, tune2fs.c: Add newlines to error messages so that they
                look nicer.
 
+       * mke2fs.c (create_journal_dev): Call
+               ext2fs_create_journal_superblock() first, so if it's going
+               to error out, the user finds out before waiting for the
+               entire device to get zero'ed.
+
 2001-03-26  Theodore Tso  <tytso@valinux.com>
 
        * mke2fs.8.in, tune2fs.8.in: Change man paegs to document that the
index bf93636..38b870b 100644 (file)
@@ -573,6 +573,13 @@ static void create_journal_dev(ext2_filsys fs)
        blk_t                   blk;
        int                     count;
 
+       retval = ext2fs_create_journal_superblock(fs,
+                                 fs->super->s_blocks_count, 0, &buf);
+       if (retval) {
+               com_err("create_journal_dev", retval,
+                       _("while initializing journal superblock"));
+               exit(1);
+       }
        if (quiet)
                memset(&progress, 0, sizeof(progress));
        else
@@ -589,13 +596,6 @@ static void create_journal_dev(ext2_filsys fs)
        }
        zero_blocks(0, 0, 0, 0, 0, 0);
 
-       retval = ext2fs_create_journal_superblock(fs,
-                                 fs->super->s_blocks_count, 0, &buf);
-       if (retval) {
-               com_err("create_journal_dev", retval,
-                       _("while initialization journal superblock"));
-               exit(1);
-       }
        retval = io_channel_write_blk(fs->io,
                                      fs->super->s_first_data_block+1,
                                      1, buf);
index 6ab5b7a..c4a8c2b 100644 (file)
@@ -168,11 +168,8 @@ void parse_journal_opts(const char *opts)
                } else if (strcmp(token, "v1_superblock") == 0) {
                        journal_flags |= EXT2_MKJOURNAL_V1_SUPER;
                        continue;
-               } else {
-                       journal_size = strtoul(token, &p, 0);
-                       if (*p)
-                               journal_usage++;
-               }
+               } else
+                       journal_usage++;
        }
        if (journal_usage) {
                fprintf(stderr, _("\nBad journal options specified.\n\n"