coreutils
[Top][All Lists]
Advanced

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

[PATCH 1/2] df: remove long-obsolescent --megabytes option [was: coreuti


From: Bernhard Voelker
Subject: [PATCH 1/2] df: remove long-obsolescent --megabytes option [was: coreutils: FIXMEs in 2013]
Date: Fri, 29 Nov 2013 12:23:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

On 11/29/2013 11:10 AM, Pádraig Brady wrote:
> On 11/29/2013 09:16 AM, Bernhard Voelker wrote:
>>      1       src/df.c:246:  MEGABYTES_OPTION  /* FIXME: remove long opt in 
>> Aug 2013 */
> Nuke it please.

Great, thanks.

Have a nice day,
Berny


>From 5ca7178614935b01f4db4bb625ef3e0947da718e Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <address@hidden>
Date: Fri, 29 Nov 2013 11:43:45 +0100
Subject: [PATCH 1/2] df: remove long-obsolescent --megabytes option

This option has been undocumented for 12 years (commit d1772031),
and warned about for a year (453ce92f).

* src/df.c (MEGABYTES_OPTION): Remove.
(long_options): Remove "megabytes" element.
(main): In the option parsing loop, remove the MEGABYTES_OPTION case.
* NEWS: Mention the change.
---
 NEWS     |  2 ++
 src/df.c | 11 +----------
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/NEWS b/NEWS
index ecc094a..b967885 100644
--- a/NEWS
+++ b/NEWS
@@ -99,6 +99,8 @@ GNU coreutils NEWS                                    -*- 
outline -*-
   dd status=none now suppresses all non fatal diagnostic messages,
   not just the transfer counts.

+  df no longer accepts the long-obsolescent --megabytes option.
+
   stdbuf now requires at least one buffering mode option to be specified,
   as per the documented interface.

diff --git a/src/df.c b/src/df.c
index 07a468b..f6ce79d 100644
--- a/src/df.c
+++ b/src/df.c
@@ -242,8 +242,7 @@ enum
   NO_SYNC_OPTION = CHAR_MAX + 1,
   SYNC_OPTION,
   TOTAL_OPTION,
-  OUTPUT_OPTION,
-  MEGABYTES_OPTION  /* FIXME: remove long opt in Aug 2013 */
+  OUTPUT_OPTION
 };

 static struct option const long_options[] =
@@ -254,7 +253,6 @@ 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, MEGABYTES_OPTION}, /* obsolescent,  */
   {"output", optional_argument, NULL, OUTPUT_OPTION},
   {"portability", no_argument, NULL, 'P'},
   {"print-type", no_argument, NULL, 'T'},
@@ -1358,13 +1356,6 @@ main (int argc, char **argv)
         case 'l':
           show_local_fs = true;
           break;
-        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;
-- 
1.8.4.2



reply via email to

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