From unknown Mon Aug 18 04:42:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11858: df -m undocumented, why no df -g Resent-From: Andreas Jaeger Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 04 Jul 2012 18:43:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11858 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 11858@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.134142734911334 (code B ref -1); Wed, 04 Jul 2012 18:43:03 +0000 Received: (at submit) by debbugs.gnu.org; 4 Jul 2012 18:42:29 +0000 Received: from localhost ([127.0.0.1]:48366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmUWs-0002we-N6 for submit@debbugs.gnu.org; Wed, 04 Jul 2012 14:42:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51158) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmKlR-0003he-6h for submit@debbugs.gnu.org; Wed, 04 Jul 2012 04:16:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmKgk-0008Au-SS for submit@debbugs.gnu.org; Wed, 04 Jul 2012 04:11:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,FRT_OFFER2, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:41180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmKgk-0008Ap-P4 for submit@debbugs.gnu.org; Wed, 04 Jul 2012 04:11:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmKge-0001fH-PR for bug-coreutils@gnu.org; Wed, 04 Jul 2012 04:11:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmKgW-00086q-JM for bug-coreutils@gnu.org; Wed, 04 Jul 2012 04:11:48 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45989 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmKgW-00084Q-Ch for bug-coreutils@gnu.org; Wed, 04 Jul 2012 04:11:40 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id DF2DCA6382 for ; Wed, 4 Jul 2012 10:11:25 +0200 (CEST) From: Andreas Jaeger Date: Wed, 04 Jul 2012 10:11:25 +0200 Message-ID: <24852045.dvGmEHvuct@byrd> Organization: SUSE Linux Products GmbH, Nuernberg, GF: Jeff Hawn, Jennifer Guild, Felix =?UTF-8?Q?Imend=C3=B6rffer,?= HRB 16746 (AG Nuernberg) User-Agent: KMail/4.8.4 (Linux/3.4.4-1-desktop; KDE/4.8.4; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -5.9 (-----) X-Mailman-Approved-At: Wed, 04 Jul 2012 14:42:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) 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=3D1M as well? Btw. df --version outputs: df (GNU coreutils) 8.16 Andreas --=20 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi= SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn,Jennifer Guild,Felix Imend=F6rffer,HRB16746 (AG N=FCrn= berg) GPG fingerprint =3D 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A= 126 From unknown Mon Aug 18 04:42:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11858: df -m undocumented, why no df -g Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 04 Jul 2012 19:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11858 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Andreas Jaeger Cc: 11858@debbugs.gnu.org Received: via spool by 11858-submit@debbugs.gnu.org id=B11858.134143100416678 (code B ref 11858); Wed, 04 Jul 2012 19:44:01 +0000 Received: (at 11858) by debbugs.gnu.org; 4 Jul 2012 19:43:24 +0000 Received: from localhost ([127.0.0.1]:48459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmVTv-0004Kv-1R for submit@debbugs.gnu.org; Wed, 04 Jul 2012 15:43:24 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:50793) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmVTt-0004Ko-71 for 11858@debbugs.gnu.org; Wed, 04 Jul 2012 15:43:21 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 51812A6000A; Wed, 4 Jul 2012 12:38:32 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vUpoGSOq7WEM; Wed, 4 Jul 2012 12:38:31 -0700 (PDT) Received: from [192.168.1.4] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id D18DEA60002; Wed, 4 Jul 2012 12:38:31 -0700 (PDT) Message-ID: <4FF49BB8.7070001@cs.ucla.edu> Date: Wed, 04 Jul 2012 12:38:32 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 References: <24852045.dvGmEHvuct@byrd> In-Reply-To: <24852045.dvGmEHvuct@byrd> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 07/04/2012 01:11 AM, Andreas Jaeger wrote: > 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. I think the general idea is that -k was a mistake, but it's standardized, and that we don't want to have options -m, -g, -t, -p, -e, -z, -y for the other sizes (among other things -t is already taken). -m is there only for BSD compatibility but we don't want to publicize it and we may want to take it back at some point. From unknown Mon Aug 18 04:42:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11858: df -m undocumented, why no df -g Resent-From: Bernhard Voelker Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 05 Jul 2012 06:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11858 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Paul Eggert Cc: Andreas Jaeger , 11858@debbugs.gnu.org Received: via spool by 11858-submit@debbugs.gnu.org id=B11858.134147120017173 (code B ref 11858); Thu, 05 Jul 2012 06:54:02 +0000 Received: (at 11858) by debbugs.gnu.org; 5 Jul 2012 06:53:20 +0000 Received: from localhost ([127.0.0.1]:49503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmfwE-0004Su-Mt for submit@debbugs.gnu.org; Thu, 05 Jul 2012 02:53:20 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:56213) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmfwB-0004Sk-0V for 11858@debbugs.gnu.org; Thu, 05 Jul 2012 02:53:16 -0400 Received: from [192.168.2.108] (p4FF733EB.dip.t-dialin.net [79.247.51.235]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0MekDA-1SSv1B34ci-00OHaw; Thu, 05 Jul 2012 08:48:22 +0200 Message-ID: <4FF538B3.2000103@bernhard-voelker.de> Date: Thu, 05 Jul 2012 08:48:19 +0200 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 References: <24852045.dvGmEHvuct@byrd> <4FF49BB8.7070001@cs.ucla.edu> In-Reply-To: <4FF49BB8.7070001@cs.ucla.edu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:AoQFh3Mt26NJ6cqjDvrYb61eQN2ASGOazx8NelaatFB yWtnGDwuqq/sQUqi5gniGSbCryfMYOMPyTprGBusmpD+IRNqmm KtzhT5Yj4AuKF8LhaFVyES8IbGT9qIanak+GwaR56SLaViO8Zc YSn512/ExYtw8KhAD9c9Uu2BdhHGqAlfMBT0mq04JlfxIf/ugb IX8Sb1mqIDdFFfhva3TmTeCQD85zL5NwZVoFWtGVEvefP4zEQu Hr98h5rUninnBJM51O6Irz8OUcb55qy5YuMKPyPoaUAZ0dxKE2 J2KwmKpsYPVQ7WfUNdvJVEDLZBN+M0PFyet4SH5wnKffP6HaRu 5vbubk/jQ7MUqGhGAYTSopQ14S+3MulIaV0YyOtHg X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 07/04/2012 09:38 PM, Paul Eggert wrote: > On 07/04/2012 01:11 AM, Andreas Jaeger wrote: >> 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. > > I think the general idea is that -k was a mistake, but > it's standardized, and that we don't want to have > options -m, -g, -t, -p, -e, -z, -y for the other sizes > (among other things -t is already taken). -m is there > only for BSD compatibility but we don't want to publicize > it and we may want to take it back at some point. Wouldn't it then be consequent to remove the long option --megabyte? (It's sister --kilobyte has been removed by v6.9-151-g1e07a21 in 2007.) Have a nice day, Berny >From 664bf8a103585915896f3be9f3a01f11ce17ddc6 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Thu, 5 Jul 2012 08:44:22 +0200 Subject: [PATCH] df: Remove long-obsolescent --megabyte option. * src/df.c (long_options): Remove --megabyte option. --- src/df.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/df.c b/src/df.c index e99fedf..8520424 100644 --- a/src/df.c +++ b/src/df.c @@ -178,7 +178,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, 'm'}, /* obsolescent */ {"portability", no_argument, NULL, 'P'}, {"print-type", no_argument, NULL, 'T'}, {"sync", no_argument, NULL, SYNC_OPTION}, -- 1.7.7 From unknown Mon Aug 18 04:42:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11858: df -m undocumented, why no df -g Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 05 Jul 2012 07:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11858 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Bernhard Voelker Cc: Andreas Jaeger , 11858@debbugs.gnu.org Received: via spool by 11858-submit@debbugs.gnu.org id=B11858.134147227818666 (code B ref 11858); Thu, 05 Jul 2012 07:12:01 +0000 Received: (at 11858) by debbugs.gnu.org; 5 Jul 2012 07:11:18 +0000 Received: from localhost ([127.0.0.1]:49519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmgDe-0004r0-2e for submit@debbugs.gnu.org; Thu, 05 Jul 2012 03:11:18 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:39767) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmgDb-0004qs-DN for 11858@debbugs.gnu.org; Thu, 05 Jul 2012 03:11:16 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 6DF39A60001; Thu, 5 Jul 2012 00:06:23 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lyt6IOUhLgwm; Thu, 5 Jul 2012 00:06:23 -0700 (PDT) Received: from [192.168.1.4] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 1FB9B39E8008; Thu, 5 Jul 2012 00:06:23 -0700 (PDT) Message-ID: <4FF53CEF.9010102@cs.ucla.edu> Date: Thu, 05 Jul 2012 00:06:23 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 References: <24852045.dvGmEHvuct@byrd> <4FF49BB8.7070001@cs.ucla.edu> <4FF538B3.2000103@bernhard-voelker.de> In-Reply-To: <4FF538B3.2000103@bernhard-voelker.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 07/04/2012 11:48 PM, Bernhard Voelker wrote: > Wouldn't it then be consequent to remove the long option --megabyte? Yes, that does make sense. From unknown Mon Aug 18 04:42:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11858: df -m undocumented, why no df -g Resent-From: Eric Blake Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 05 Jul 2012 11:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11858 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Bernhard Voelker Cc: Andreas Jaeger , 11858@debbugs.gnu.org, Paul Eggert Received: via spool by 11858-submit@debbugs.gnu.org id=B11858.134148760611463 (code B ref 11858); Thu, 05 Jul 2012 11:27:01 +0000 Received: (at 11858) by debbugs.gnu.org; 5 Jul 2012 11:26:46 +0000 Received: from localhost ([127.0.0.1]:49816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmkCs-0002yp-9n for submit@debbugs.gnu.org; Thu, 05 Jul 2012 07:26:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51761) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmkCo-0002yg-VK for 11858@debbugs.gnu.org; Thu, 05 Jul 2012 07:26:44 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q65BLcKl006813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 5 Jul 2012 07:21:39 -0400 Received: from [10.3.113.17] ([10.3.113.17]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q65BLbe1011993; Thu, 5 Jul 2012 07:21:38 -0400 Message-ID: <4FF578C0.3070807@redhat.com> Date: Thu, 05 Jul 2012 05:21:36 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 References: <24852045.dvGmEHvuct@byrd> <4FF49BB8.7070001@cs.ucla.edu> <4FF538B3.2000103@bernhard-voelker.de> In-Reply-To: <4FF538B3.2000103@bernhard-voelker.de> X-Enigmail-Version: 1.4.2 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig050A04B672B177DAE96279C2" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig050A04B672B177DAE96279C2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/05/2012 12:48 AM, Bernhard Voelker wrote: >> I think the general idea is that -k was a mistake, but >> it's standardized, and that we don't want to have >> options -m, -g, -t, -p, -e, -z, -y for the other sizes >> (among other things -t is already taken). -m is there >> only for BSD compatibility but we don't want to publicize >> it and we may want to take it back at some point. >=20 > Wouldn't it then be consequent to remove the long option --megabyte? > (It's sister --kilobyte has been removed by v6.9-151-g1e07a21 > in 2007.) In fact, the reason we removed --kilobyte was that it is a misnomer; -k works on kibibytes, not kilobytes. Similarly, -m works on mebibytes, not megabytes. So whether or not we keep -m but leave it undocumented, removing the long form --megabyte makes complete sense. >=20 >>>From 664bf8a103585915896f3be9f3a01f11ce17ddc6 Mon Sep 17 00:00:00 2001 > From: Bernhard Voelker > Date: Thu, 5 Jul 2012 08:44:22 +0200 > Subject: [PATCH] df: Remove long-obsolescent --megabyte option. >=20 > * src/df.c (long_options): Remove --megabyte option. I like this patch, but I'll let Jim decide whether to apply it. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig050A04B672B177DAE96279C2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJP9XjBAAoJEKeha0olJ0NqdScH/2ziw0hWFSbQI8ESad7wefUe L9ZxF06AfJxReD932ZmDD7n8vc0Eyv3DTUNC1UvazMbNjSrGURYjb/F9B3TFXyAz XX8cXjZ77jZZ6H/lT0LOOb15IJcCKbPMmt/xTN4e7oO+lfzY13L6SjAhL2Z2mSmN ihZ4nZEBs60K3tKgMUuZ/ZJHhfASeh/QoesxC8oGSKNYzf7XrWs+wIxRFLixIQ1r Tc8S1u4OVMJXehiPUQ8C9LrzmutenFebEe2RVI4NA/UIxKJ8HFl8zAAJktdnNWyi nkPyI7IsH2simeW6BpsaksRXUQ6G0c4hmG7++i5//ftYJM8juIeu4YKA4IPbfuA= =bHRX -----END PGP SIGNATURE----- --------------enig050A04B672B177DAE96279C2-- From unknown Mon Aug 18 04:42:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11858: df -m undocumented, why no df -g Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 05 Jul 2012 12:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11858 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Bernhard Voelker Cc: Andreas Jaeger , 11858@debbugs.gnu.org, Paul Eggert Received: via spool by 11858-submit@debbugs.gnu.org id=B11858.134149203320966 (code B ref 11858); Thu, 05 Jul 2012 12:41:01 +0000 Received: (at 11858) by debbugs.gnu.org; 5 Jul 2012 12:40:33 +0000 Received: from localhost ([127.0.0.1]:49925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmlMG-0005S7-Bt for submit@debbugs.gnu.org; Thu, 05 Jul 2012 08:40:33 -0400 Received: from mx.meyering.net ([88.168.87.75]:42436) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmlMC-0005Rn-26 for 11858@debbugs.gnu.org; Thu, 05 Jul 2012 08:40:30 -0400 Received: from rho.meyering.net (rho.meyering.net [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 3062960489; Thu, 5 Jul 2012 14:35:32 +0200 (CEST) From: Jim Meyering In-Reply-To: <4FF538B3.2000103@bernhard-voelker.de> (Bernhard Voelker's message of "Thu, 05 Jul 2012 08:48:19 +0200") References: <24852045.dvGmEHvuct@byrd> <4FF49BB8.7070001@cs.ucla.edu> <4FF538B3.2000103@bernhard-voelker.de> Date: Thu, 05 Jul 2012 14:35:32 +0200 Message-ID: <87fw96wfl7.fsf@rho.meyering.net> Lines: 50 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Bernhard Voelker wrote: > On 07/04/2012 09:38 PM, Paul Eggert wrote: >> On 07/04/2012 01:11 AM, Andreas Jaeger wrote: >>> 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. >> >> I think the general idea is that -k was a mistake, but >> it's standardized, and that we don't want to have >> options -m, -g, -t, -p, -e, -z, -y for the other sizes >> (among other things -t is already taken). -m is there >> only for BSD compatibility but we don't want to publicize >> it and we may want to take it back at some point. > > Wouldn't it then be consequent to remove the long option --megabyte? > (It's sister --kilobyte has been removed by v6.9-151-g1e07a21 > in 2007.) ... > Subject: [PATCH] df: Remove long-obsolescent --megabyte option. > > * src/df.c (long_options): Remove --megabyte option. > --- > src/df.c | 1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/src/df.c b/src/df.c > index e99fedf..8520424 100644 > --- a/src/df.c > +++ b/src/df.c > @@ -178,7 +178,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, 'm'}, /* obsolescent */ > {"portability", no_argument, NULL, 'P'}, > {"print-type", no_argument, NULL, 'T'}, > {"sync", no_argument, NULL, SYNC_OPTION}, Hi Berny, I like the idea, but wonder if an abrupt removal would break old scripts. For du, we made its --megabytes option issue a warning first, and removed it altogether a year or two later. However, I'm tempted to remove it directly this time, since it's been undocumented for a while: 5 years in df.1 and df --help: COREUTILS-6_9-151-g1e07a21 11 years in coreutils.texi: FILEUTILS-4_1_4-28-gf5bf6fe What do you think? From unknown Mon Aug 18 04:42:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11858: df -m undocumented, why no df -g Resent-From: Bernhard Voelker Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 05 Jul 2012 14:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11858 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: Andreas Jaeger , 11858@debbugs.gnu.org, Paul Eggert Received: via spool by 11858-submit@debbugs.gnu.org id=B11858.134149975432456 (code B ref 11858); Thu, 05 Jul 2012 14:50:01 +0000 Received: (at 11858) by debbugs.gnu.org; 5 Jul 2012 14:49:14 +0000 Received: from localhost ([127.0.0.1]:50563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmnMn-0008RR-QM for submit@debbugs.gnu.org; Thu, 05 Jul 2012 10:49:13 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:63983) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmnMk-0008RG-0u for 11858@debbugs.gnu.org; Thu, 05 Jul 2012 10:49:11 -0400 Received: from [192.168.2.108] (p4FF733EB.dip.t-dialin.net [79.247.51.235]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0M5IbP-1Rsv900onv-00z11o; Thu, 05 Jul 2012 16:43:58 +0200 Message-ID: <4FF5A82C.8010806@bernhard-voelker.de> Date: Thu, 05 Jul 2012 16:43:56 +0200 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 References: <24852045.dvGmEHvuct@byrd> <4FF49BB8.7070001@cs.ucla.edu> <4FF538B3.2000103@bernhard-voelker.de> <87fw96wfl7.fsf@rho.meyering.net> In-Reply-To: <87fw96wfl7.fsf@rho.meyering.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:SGmbRHhw2asus2gXMmMmVlV/JfTSr3pfGGYb1JVDP0G ZASOvFAvVFCh8+Ban1qAfNJaaxk2Php1m1GPQWxJoIvQ9tUYcP hE65dGRfSyEh7syTZFgZLqgHXPIxR4GffaF1va3pl288+NuClD YY7R8fJylnKeAVwl/MYFyicBCuv7Rb9atYY8hwecZiSfKezBq7 wWDqZ56dQ4d25/h2CSiEnhrjRAQbQxbS0yJ/8euOgBAI6T+Ahi fJGCUjn2yGGKXN1ruQM7/lKQH4rl9yog0oOdlrQHKWOTiUeJn3 FRbsV3Xxg1DYpxdjWRBaGZpDmOy2zBOoSmIbroUe6v9Jz8LfYa gN3BS+tk+9o8c46ZGwLBbqWJclzgh5k9xI5VGy3vd X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 07/05/2012 02:35 PM, Jim Meyering wrote: > However, I'm tempted to remove it directly this time, since it's been > undocumented for a while: > > 5 years in df.1 and df --help: COREUTILS-6_9-151-g1e07a21 > 11 years in coreutils.texi: FILEUTILS-4_1_4-28-gf5bf6fe > > What do you think? I agree, the option has been added to df in 1996, and declared obsolescent in 2001, so the period since the latter is twice as long as the active use. And it's very easy to s/--megabytes/-BM/ ... Have a nice day, Berny From unknown Mon Aug 18 04:42:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11858: df -m undocumented, why no df -g Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 05 Jul 2012 15:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11858 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Bernhard Voelker Cc: Andreas Jaeger , 11858@debbugs.gnu.org, Paul Eggert Received: via spool by 11858-submit@debbugs.gnu.org id=B11858.13415012242081 (code B ref 11858); Thu, 05 Jul 2012 15:14:01 +0000 Received: (at 11858) by debbugs.gnu.org; 5 Jul 2012 15:13:44 +0000 Received: from localhost ([127.0.0.1]:50602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmnkW-0000XW-Mv for submit@debbugs.gnu.org; Thu, 05 Jul 2012 11:13:44 -0400 Received: from mx.meyering.net ([88.168.87.75]:42861) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmnkU-0000XO-PQ for 11858@debbugs.gnu.org; Thu, 05 Jul 2012 11:13:43 -0400 Received: from rho.meyering.net (rho.meyering.net [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 8354D6007F; Thu, 5 Jul 2012 17:08:47 +0200 (CEST) From: Jim Meyering In-Reply-To: <4FF5A82C.8010806@bernhard-voelker.de> (Bernhard Voelker's message of "Thu, 05 Jul 2012 16:43:56 +0200") References: <24852045.dvGmEHvuct@byrd> <4FF49BB8.7070001@cs.ucla.edu> <4FF538B3.2000103@bernhard-voelker.de> <87fw96wfl7.fsf@rho.meyering.net> <4FF5A82C.8010806@bernhard-voelker.de> Date: Thu, 05 Jul 2012 17:08:47 +0200 Message-ID: <87fw96utxc.fsf@rho.meyering.net> Lines: 18 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Bernhard Voelker wrote: > On 07/05/2012 02:35 PM, Jim Meyering wrote: >> However, I'm tempted to remove it directly this time, since it's been >> undocumented for a while: >> >> 5 years in df.1 and df --help: COREUTILS-6_9-151-g1e07a21 >> 11 years in coreutils.texi: FILEUTILS-4_1_4-28-gf5bf6fe >> >> What do you think? > > I agree, the option has been added to df in 1996, and declared > obsolescent in 2001, so the period since the latter is twice as > long as the active use. > > And it's very easy to s/--megabytes/-BM/ ... More important than 2001 is the year in which we removed the reference from the man page and from --help: 2007 From unknown Mon Aug 18 04:42:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11858: df -m undocumented, why no df -g Resent-From: Bernhard Voelker Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 11 Jul 2012 15:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11858 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: Andreas Jaeger , 11858@debbugs.gnu.org, Paul Eggert Received: via spool by 11858-submit@debbugs.gnu.org id=B11858.13420212857485 (code B ref 11858); Wed, 11 Jul 2012 15:42:02 +0000 Received: (at 11858) by debbugs.gnu.org; 11 Jul 2012 15:41:25 +0000 Received: from localhost ([127.0.0.1]:33589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Soz2b-0001wf-3N for submit@debbugs.gnu.org; Wed, 11 Jul 2012 11:41:25 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:53361) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Soz2X-0001wW-M9 for 11858@debbugs.gnu.org; Wed, 11 Jul 2012 11:41:23 -0400 Received: from [192.168.2.108] (p4FF7689A.dip.t-dialin.net [79.247.104.154]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0LtjF3-1RnyJQ3S6P-010wQI; Wed, 11 Jul 2012 17:35:38 +0200 Message-ID: <4FFD9D48.3090909@bernhard-voelker.de> Date: Wed, 11 Jul 2012 17:35:36 +0200 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 References: <24852045.dvGmEHvuct@byrd> <4FF49BB8.7070001@cs.ucla.edu> <4FF538B3.2000103@bernhard-voelker.de> <87fw96wfl7.fsf@rho.meyering.net> <4FF5A82C.8010806@bernhard-voelker.de> <87fw96utxc.fsf@rho.meyering.net> In-Reply-To: <87fw96utxc.fsf@rho.meyering.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:EuzgSFCbVdzLim0TeflQ0j4TEq6CjbN1AoLB7SPo5Ml 4IZ+XhMupBTjDYmL7yIp9VEw1byeVgSAZYOCZzrAza7W6HfGf7 BxfhEZttusCSHUdwm6iM2CgKh7SiSAsvSijVPENmXYThLpPS9K Fz2swtP2CpcAfmhPszA6tM8GWZSgyicFPBH/NBBO4qp+Cwg9IX Tu/Psv/qglhkQMjfZqLYg9plt+LyCAukteW13e8l1zWFFHIZeb 382n2WeOSamDdHYw8Yxe/O/vx7VdR84x9/K2cmFX1MWcvr3VlS m0D8lxLRL3MmKILoQ4JwbCCt6sKJDJIgLdzVrR/i34NTNPVfY3 10EhpNcgp1ugHIcae2RD+4hjB3NI32KqThw1621QV X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 07/05/2012 05:08 PM, Jim Meyering wrote: > Bernhard Voelker wrote: >> On 07/05/2012 02:35 PM, Jim Meyering wrote: >>> However, I'm tempted to remove it directly this time, since it's been >>> undocumented for a while: >>> >>> 5 years in df.1 and df --help: COREUTILS-6_9-151-g1e07a21 >>> 11 years in coreutils.texi: FILEUTILS-4_1_4-28-gf5bf6fe >>> >>> What do you think? >> >> I agree, the option has been added to df in 1996, and declared >> obsolescent in 2001, so the period since the latter is twice as >> long as the active use. >> >> And it's very easy to s/--megabytes/-BM/ ... > > More important than 2001 is the year in which we removed > the reference from the man page and from --help: 2007 You're right. Then what about a deprecation warning and removing the long option in 2013? P.S. Make "syntax-check" doesn't find the offender against sc_error_message_uppercase for the "Warning:" message when (mount_list == NULL) in df.c Have a nice day, Berny >From 750cd181cf87160b11556f92bd098ba535780ffc Mon Sep 17 00:00:00 2001 From: Bernhard Voelker 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 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. --- src/df.c | 14 +++++++++++--- 1 files 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.7 From unknown Mon Aug 18 04:42:19 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Andreas Jaeger Subject: bug#11858: closed (Re: bug#11858: df -m undocumented, why no df -g) Message-ID: References: <87bojm47rl.fsf@rho.meyering.net> <24852045.dvGmEHvuct@byrd> X-Gnu-PR-Message: they-closed 11858 X-Gnu-PR-Package: coreutils Reply-To: 11858@debbugs.gnu.org Date: Wed, 11 Jul 2012 15:56:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1342022162-8673-1" This is a multi-part message in MIME format... ------------=_1342022162-8673-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #11858: df -m undocumented, why no df -g which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 11858@debbugs.gnu.org. --=20 11858: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11858 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1342022162-8673-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 11858-done) by debbugs.gnu.org; 11 Jul 2012 15:55:38 +0000 Received: from localhost ([127.0.0.1]:33597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SozGL-0002FK-Jh for submit@debbugs.gnu.org; Wed, 11 Jul 2012 11:55:37 -0400 Received: from mx.meyering.net ([88.168.87.75]:37525) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SozGI-0002FC-Pa for 11858-done@debbugs.gnu.org; Wed, 11 Jul 2012 11:55:36 -0400 Received: from rho.meyering.net (rho.meyering.net [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id C2F84600AE; Wed, 11 Jul 2012 17:50:06 +0200 (CEST) From: Jim Meyering To: Bernhard Voelker Subject: Re: bug#11858: df -m undocumented, why no df -g In-Reply-To: <4FFD9D48.3090909@bernhard-voelker.de> (Bernhard Voelker's message of "Wed, 11 Jul 2012 17:35:36 +0200") References: <24852045.dvGmEHvuct@byrd> <4FF49BB8.7070001@cs.ucla.edu> <4FF538B3.2000103@bernhard-voelker.de> <87fw96wfl7.fsf@rho.meyering.net> <4FF5A82C.8010806@bernhard-voelker.de> <87fw96utxc.fsf@rho.meyering.net> <4FFD9D48.3090909@bernhard-voelker.de> Date: Wed, 11 Jul 2012 17:50:06 +0200 Message-ID: <87bojm47rl.fsf@rho.meyering.net> Lines: 69 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11858-done Cc: Andreas Jaeger , 11858-done@debbugs.gnu.org, Paul Eggert X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) 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 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 ------------=_1342022162-8673-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 4 Jul 2012 18:42:29 +0000 Received: from localhost ([127.0.0.1]:48366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmUWs-0002we-N6 for submit@debbugs.gnu.org; Wed, 04 Jul 2012 14:42:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51158) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmKlR-0003he-6h for submit@debbugs.gnu.org; Wed, 04 Jul 2012 04:16:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmKgk-0008Au-SS for submit@debbugs.gnu.org; Wed, 04 Jul 2012 04:11:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,FRT_OFFER2, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:41180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmKgk-0008Ap-P4 for submit@debbugs.gnu.org; Wed, 04 Jul 2012 04:11:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmKge-0001fH-PR for bug-coreutils@gnu.org; Wed, 04 Jul 2012 04:11:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmKgW-00086q-JM for bug-coreutils@gnu.org; Wed, 04 Jul 2012 04:11:48 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45989 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmKgW-00084Q-Ch for bug-coreutils@gnu.org; Wed, 04 Jul 2012 04:11:40 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id DF2DCA6382 for ; Wed, 4 Jul 2012 10:11:25 +0200 (CEST) From: Andreas Jaeger To: bug-coreutils@gnu.org Subject: df -m undocumented, why no df -g Date: Wed, 04 Jul 2012 10:11:25 +0200 Message-ID: <24852045.dvGmEHvuct@byrd> Organization: SUSE Linux Products GmbH, Nuernberg, GF: Jeff Hawn, Jennifer Guild, Felix =?UTF-8?B?SW1lbmTDtnJmZmVyLA==?= HRB 16746 (AG Nuernberg) User-Agent: KMail/4.8.4 (Linux/3.4.4-1-desktop; KDE/4.8.4; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 04 Jul 2012 14:42:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) 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=3D1M as well? Btw. df --version outputs: df (GNU coreutils) 8.16 Andreas --=20 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi= SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn,Jennifer Guild,Felix Imend=F6rffer,HRB16746 (AG N=FCrn= berg) GPG fingerprint =3D 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A= 126 ------------=_1342022162-8673-1--