]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
mke2fs.c: Output warnings to stderr
authorTheodore Ts'o <tytso@mit.edu>
Fri, 8 Mar 2002 05:14:46 +0000 (00:14 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 8 Mar 2002 05:14:46 +0000 (00:14 -0500)
(From Philipp Thomas <pthomas@suse.de>)

misc/ChangeLog
misc/mke2fs.c

index 7c5e596ecaf202e1510b5a9781dda4771689b798..df1a3cb81f0b517228f824764a749327759c52ce 100644 (file)
@@ -1,5 +1,8 @@
 2002-03-07  Theodore Tso  <tytso@mit.edu>
 
+       * mke2fs.c: Output warnings to stderr 
+               (From Philipp Thomas <pthomas@suse.de>)
+
        * base_device.c (main): Fix gcc -Wall complaints in debug code.
 
        * mke2fs.c (zap_sector): Don't erase BSD disklabels on Alpha.
index 671bd9e4e0fc927798edd545b34bf7d1d37ff79f..3165dfc3133caff689fdd5509cfb846d87e83b6c 100644 (file)
@@ -179,7 +179,7 @@ static void set_fs_defaults(const char *fs_type,
  */
 static void invalid_block(ext2_filsys fs, blk_t blk)
 {
-       printf(_("Bad block %u out of range; ignored.\n"), blk);
+       fprintf(stderr, _("Bad block %u out of range; ignored.\n"), blk);
        return;
 }
 
@@ -440,9 +440,9 @@ static void write_inode_tables(ext2_filsys fs)
 
                retval = zero_blocks(fs, blk, num, 0, &blk, &num);
                if (retval) {
-                       printf(_("\nCould not write %d blocks "
-                                "in inode table starting at %d: %s\n"),
-                              num, blk, error_message(retval));
+                       fprintf(stderr, _("\nCould not write %d blocks "
+                               "in inode table starting at %d: %s\n"),
+                               num, blk, error_message(retval));
                        exit(1);
                }
                if (sync_kludge) {
@@ -587,8 +587,8 @@ static void zap_sector(ext2_filsys fs, int sect, int nsect)
        io_channel_set_blksize(fs->io, fs->blocksize);
        free(buf);
        if (retval)
-               printf(_("Warning: could not erase sector %d: %s\n"), sect,
-                      error_message(retval));
+               fprintf(stderr, _("Warning: could not erase sector %d: %s\n"),
+                       sect, error_message(retval));
 }
 
 static void create_journal_dev(ext2_filsys fs)
@@ -641,7 +641,7 @@ static void show_stats(ext2_filsys fs)
        int                     i, need, col_left;
        
        if (param.s_blocks_count != s->s_blocks_count)
-               printf(_("warning: %d blocks unused.\n\n"),
+               fprintf(stderr, _("warning: %d blocks unused.\n\n"),
                       param.s_blocks_count - s->s_blocks_count);
 
        memset(buf, 0, sizeof(buf));
@@ -876,7 +876,7 @@ static void PRS(int argc, char *argv[])
                        }
                        param.s_log_frag_size =
                                int_log2(size >> EXT2_MIN_BLOCK_LOG_SIZE);
-                       printf(_("Warning: fragments not supported.  "
+                       fprintf(stderr, _("Warning: fragments not supported.  "
                               "Ignoring -f option\n"));
                        break;
                case 'g':
@@ -1350,7 +1350,8 @@ no_journal:
                       "filesystem accounting information: "));
        retval = ext2fs_flush(fs);
        if (retval) {
-               printf(_("\nWarning, had trouble writing out superblocks."));
+               fprintf(stderr,
+                       _("\nWarning, had trouble writing out superblocks."));
        }
        if (!quiet) {
                printf(_("done\n\n"));