emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#11858: closed (df -m undocumented, why no df -g)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#11858: closed (df -m undocumented, why no df -g)
Date: Wed, 11 Jul 2012 15:56:02 +0000

Your message dated Wed, 11 Jul 2012 17:50:06 +0200
with message-id <address@hidden>
and subject line Re: bug#11858: df -m undocumented, why no df -g
has caused the debbugs.gnu.org bug report #11858,
regarding df -m undocumented, why no df -g
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
11858: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11858
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: df -m undocumented, why no df -g Date: Wed, 04 Jul 2012 10:11:25 +0200 User-agent: KMail/4.8.4 (Linux/3.4.4-1-desktop; KDE/4.8.4; x86_64; ; )
df -k and df -m both work but only df -k is mentioned as part of df --
help. So, the omission to document -m is IMO a bug.

A second issue:
Since df supports -k and -m, shouldn't if support -g (as synoym for --
block-size=1M as well?

Btw. df --version outputs:
df (GNU coreutils) 8.16

Andreas
-- 
 Andreas Jaeger address@hidden,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126




--- End Message ---
--- Begin Message --- Subject: Re: bug#11858: df -m undocumented, why no df -g Date: Wed, 11 Jul 2012 17:50:06 +0200
Bernhard Voelker wrote:
> Subject: [PATCH] df: Warn if soon-to-be-removed --megabyte option is used
>
> * src/df.c: MEGABYTES_OPTION: Add new enum and mark it to be removed
> in August 2013.
> * src/df.c (long_options): Use MEGABYTES_OPTION for --megabytes option.
> * src/df.c (main): Add case for MEGABYTES_OPTION and issue a deprecation
> warning if the long form is being used. Document the short -m option to
> exist only for BSD compatibility.

Thanks.  Applied with log tweaks (e.g., s/W/w/ in summary, removed
each "* src/df.c" after the first -- "*" introduces a new file).

>From 5e78bbd163dbc739e168fc2bff6273a2b6e5e5de Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <address@hidden>
Date: Wed, 11 Jul 2012 17:27:20 +0200
Subject: [PATCH] df: warn if soon-to-be-removed --megabyte option is used

* src/df.c (MEGABYTES_OPTION): Add enum and mark it for removal
in August 2013.
(long_options): Use MEGABYTES_OPTION for --megabytes option.
(main): Add a case for it and issue a deprecation warning if
the long form is used.  Document the short -m option to
exist only for BSD compatibility.
---
 src/df.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/df.c b/src/df.c
index e99fedf..7e30d57 100644
--- a/src/df.c
+++ b/src/df.c
@@ -167,7 +167,8 @@ static size_t nrows;
 enum
 {
   NO_SYNC_OPTION = CHAR_MAX + 1,
-  SYNC_OPTION
+  SYNC_OPTION,
+  MEGABYTES_OPTION  /* FIXME: remove long opt in Aug 2013 */
 };

 static struct option const long_options[] =
@@ -178,7 +179,7 @@ static struct option const long_options[] =
   {"human-readable", no_argument, NULL, 'h'},
   {"si", no_argument, NULL, 'H'},
   {"local", no_argument, NULL, 'l'},
-  {"megabytes", no_argument, NULL, 'm'}, /* obsolescent */
+  {"megabytes", no_argument, NULL, MEGABYTES_OPTION}, /* obsolescent,  */
   {"portability", no_argument, NULL, 'P'},
   {"print-type", no_argument, NULL, 'T'},
   {"sync", no_argument, NULL, SYNC_OPTION},
@@ -951,7 +952,14 @@ main (int argc, char **argv)
         case 'l':
           show_local_fs = true;
           break;
-        case 'm': /* obsolescent */
+        case MEGABYTES_OPTION:
+          /* Distinguish between the long and the short option.
+             As we want to remove the long option soon,
+             give a warning when the long form is used.  */
+          error (0, 0, "%s%s", _("warning: "),
+            _("long option '--megabytes' is deprecated"
+              " and will soon be removed"));
+        case 'm': /* obsolescent, exists for BSD compatibility */
           human_output_opts = 0;
           output_block_size = 1024 * 1024;
           break;
--
1.7.11.1.165.g299666c


--- End Message ---

reply via email to

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