bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Verbose output standarization


From: Krzysztof Drewniak
Subject: Verbose output standarization
Date: Fri, 19 Sep 2008 18:08:23 -0500
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

I have created patches that cause the verbose output for mkdir shred and
split from stderr to stdout (it was asked for in TODO). I would like you
to take a look at these and if you want, put them in. I'm sending this
to the bug address because it said to in the README. I did this with a
fresh coreutils 6.9. I'm attaching the patches here.
Krzysztof Drewniak
--- src/mkdir.c 2007-03-18 16:36:43.000000000 -0500
+++ src/mkdir.work.c    2008-09-18 12:19:23.000000000 -0500
@@ -102,7 +102,7 @@ announce_mkdir (char const *dir, void *o
 {
   struct mkdir_options const *o = options;
   if (o->created_directory_format)
-    error (0, 0, o->created_directory_format, quote (dir));
+    printf (o->created_directory_format, quote (dir));
 }
 
 /* Make ancestor directory DIR, whose last component is COMPONENT,
--- src/shred.c 2007-03-18 16:36:43.000000000 -0500
+++ src/shred.work.c    2008-09-18 12:15:42.000000000 -0500
@@ -407,7 +407,7 @@ dopass (int fd, char const *qname, off_t
   /* Set position if first status update */
   if (n)
     {
-      error (0, 0, _("%s: pass %lu/%lu (%s)..."), qname, k, n, pass_string);
+      printf (_("%s: pass %lu/%lu (%s)..."), qname, k, n, pass_string);
       thresh = time (NULL) + VERBOSE_UPDATE;
       previous_human_offset = "";
     }
--- src/split.c 2007-03-18 16:36:43.000000000 -0500
+++ src/split.work.c    2008-09-18 12:22:00.000000000 -0500
@@ -124,7 +124,7 @@ Mandatory arguments to long options are 
   -l, --lines=NUMBER      put NUMBER lines per output file\n\
 "), DEFAULT_SUFFIX_LENGTH);
       fputs (_("\
-      --verbose           print a diagnostic to standard error just\n\
+      --verbose           print a diagnostic to standard output just\n\
                             before each output file is opened\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
@@ -208,7 +208,7 @@ cwrite (bool new_file_flag, const char *
 
       next_file_name ();
       if (verbose)
-       fprintf (stderr, _("creating file %s\n"), quote (outfile));
+       fprintf (stdout, _("creating file %s\n"), quote (outfile));
       output_desc = open (outfile,
                          O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
                          (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP

reply via email to

[Prev in Thread] Current Thread [Next in Thread]