From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 19:03:11 2011 Received: (at submit) by debbugs.gnu.org; 11 Nov 2011 00:03:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROeaN-0008JH-7Z for submit@debbugs.gnu.org; Thu, 10 Nov 2011 19:03:11 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROeaJ-0008J4-U1 for submit@debbugs.gnu.org; Thu, 10 Nov 2011 19:03:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROea0-0005OJ-JZ for submit@debbugs.gnu.org; Thu, 10 Nov 2011 19:02:49 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.7 required=5.0 tests=BAYES_00,RCVD_IN_PBL, RCVD_IN_RP_RNBL, RCVD_IN_SORBS_DUL, RDNS_DYNAMIC, TO_NO_BRKTS_DYNIP autolearn=no version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:50101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROea0-0005OF-Hy for submit@debbugs.gnu.org; Thu, 10 Nov 2011 19:02:48 -0500 Received: from eggs.gnu.org ([140.186.70.92]:43446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROeZz-0007mO-JG for bug-coreutils@gnu.org; Thu, 10 Nov 2011 19:02:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROeZy-0005Np-65 for bug-coreutils@gnu.org; Thu, 10 Nov 2011 19:02:47 -0500 Received: from c-67-162-90-113.hsd1.in.comcast.net ([67.162.90.113]:49563 helo=kosh.dhis.org) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ROeZy-0005MN-2e for bug-coreutils@gnu.org; Thu, 10 Nov 2011 19:02:46 -0500 Received: (qmail 20350 invoked by uid 1000); 10 Nov 2011 23:35:32 -0000 Message-ID: <20111110233532.20349.qmail@kosh.dhis.org> From: "Alan Curry" Subject: ls -lk is wrong To: bug-coreutils@gnu.org Date: Thu, 10 Nov 2011 18:35:32 -0500 (GMT+5) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.7 (---) I mentioned this already in the bug#9939 thread, but nobody replied and it's really a separate issue so here's an independent report. This behavior: $ ls -l /bin/ls -rwxr-xr-x 1 root root 107124 Feb 8 2011 /bin/ls $ ls -lk /bin/ls -rwxr-xr-x 1 root root 105 Feb 8 2011 /bin/ls is awful. -k should not have any effect on the ls -l field that reports st_size. It is only supposed to possibly affect the reporting of st_blocks by -s and the "total" line at the start of a full directory listing. I won't make any claims about what --block-size should do, but -k comes from BSD and it should act like BSD. -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 19:14:49 2011 Received: (at 10016) by debbugs.gnu.org; 11 Nov 2011 00:14:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROelc-000085-R6 for submit@debbugs.gnu.org; Thu, 10 Nov 2011 19:14:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROelY-00007n-3Z for 10016@debbugs.gnu.org; Thu, 10 Nov 2011 19:14:46 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pAB0EOZP001856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Nov 2011 19:14:24 -0500 Received: from [10.3.113.23] (ovpn-113-23.phx2.redhat.com [10.3.113.23]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pAB0ENe4029542; Thu, 10 Nov 2011 19:14:24 -0500 Message-ID: <4EBC68DF.701@redhat.com> Date: Thu, 10 Nov 2011 17:14:23 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110928 Fedora/3.1.15-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.4 Thunderbird/3.1.15 MIME-Version: 1.0 To: Alan Curry Subject: Re: bug#10016: ls -lk is wrong References: <20111110233532.20349.qmail@kosh.dhis.org> In-Reply-To: <20111110233532.20349.qmail@kosh.dhis.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: 10016 Cc: 10016@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -10.3 (----------) On 11/10/2011 04:35 PM, Alan Curry wrote: > I mentioned this already in the bug#9939 thread, but nobody replied and it's > really a separate issue so here's an independent report. > > This behavior: > > $ ls -l /bin/ls > -rwxr-xr-x 1 root root 107124 Feb 8 2011 /bin/ls > $ ls -lk /bin/ls > -rwxr-xr-x 1 root root 105 Feb 8 2011 /bin/ls > > is awful. -k should not have any effect on the ls -l field that reports > st_size. It is only supposed to possibly affect the reporting of st_blocks > by -s and the "total" line at the start of a full directory listing. I just re-read POSIX, and it looks like you are correct: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html -k Set the block size for the -s option and the per-directory block count written for the -l, -n, -s, [XSI] [Option Start] -g, and -o [Option End] options (see the STDOUT section) to 1024 bytes. POSIX has no mention of -k affecting the file size output, just the initial column for -s and the per-directory summary on "total" lines. > > I won't make any claims about what --block-size should do, but -k comes from > BSD and it should act like BSD. It's not so much what BSD says, but what POSIX specifies, that matters here - I think you've made a pretty clear case that coreutils has a bug. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 11:20:36 2011 Received: (at 10016) by debbugs.gnu.org; 11 Nov 2011 16:20:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROtqD-0006p2-UP for submit@debbugs.gnu.org; Fri, 11 Nov 2011 11:20:35 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROtqA-0006ot-BJ for 10016@debbugs.gnu.org; Fri, 11 Nov 2011 11:20:31 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id D1E83600B6; Fri, 11 Nov 2011 17:20:11 +0100 (CET) From: Jim Meyering To: Eric Blake Subject: Re: bug#10016: ls -lk is wrong In-Reply-To: <4EBC68DF.701@redhat.com> (Eric Blake's message of "Thu, 10 Nov 2011 17:14:23 -0700") References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> Date: Fri, 11 Nov 2011 17:20:11 +0100 Message-ID: <8739du1vic.fsf@rho.meyering.net> Lines: 75 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10016 Cc: Alan Curry , 10016@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.7 (--) Eric Blake wrote: > On 11/10/2011 04:35 PM, Alan Curry wrote: >> I mentioned this already in the bug#9939 thread, but nobody replied and it's >> really a separate issue so here's an independent report. >> >> This behavior: >> >> $ ls -l /bin/ls >> -rwxr-xr-x 1 root root 107124 Feb 8 2011 /bin/ls >> $ ls -lk /bin/ls >> -rwxr-xr-x 1 root root 105 Feb 8 2011 /bin/ls >> >> is awful. -k should not have any effect on the ls -l field that reports >> st_size. It is only supposed to possibly affect the reporting of st_blocks >> by -s and the "total" line at the start of a full directory listing. > > I just re-read POSIX, and it looks like you are correct: > > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html > > -k > Set the block size for the -s option and the per-directory block > count written for the -l, -n, -s, [XSI] [Option Start] -g, and -o > [Option End] options (see the STDOUT section) to 1024 bytes. > > POSIX has no mention of -k affecting the file size output, just the > initial column for -s and the per-directory summary on "total" lines. Thank you, Alan! I reached the same conclusion. It is a bug. It was introduced 9 years ago, in coreutils-4.5.4, probably by commit 106c3bf3: sprintf (p, "%8s ", - human_readable (size, hbuf, 1, - output_block_size < 0 ? output_block_size : 1)); + human_readable (size, hbuf, human_output_opts, + 1, file_output_block_size)); Per POSIX, this should print 1000000: $ truncate -s 1000000 k; set - $(env ls -ogk k); echo $3 977 The following change fixes it and introduces no test failure, so I'll write a test, NEWS, etc. diff --git a/src/ls.c b/src/ls.c index 0b8f512..41e9123 100644 --- a/src/ls.c +++ b/src/ls.c @@ -3030,9 +3030,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode, { char buf[LONGEST_HUMAN_READABLE + 1]; uintmax_t size = unsigned_file_size (f->stat.st_size); - int len = mbswidth (human_readable (size, buf, human_output_opts, - 1, file_output_block_size), - 0); + int len = mbswidth (human_readable (size, buf, 0, 1, 1), 0); if (file_size_width < len) file_size_width = len; } @@ -3772,7 +3770,7 @@ print_long_format (const struct fileinfo *f) (! f->stat_ok ? "?" : human_readable (unsigned_file_size (f->stat.st_size), - hbuf, human_output_opts, 1, file_output_block_size)); + hbuf, 0, 1, 1)); int pad; for (pad = file_size_width - mbswidth (size, 0); 0 < pad; pad--) *p++ = ' '; From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 13:31:19 2011 Received: (at 10016) by debbugs.gnu.org; 11 Nov 2011 18:31:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROvsl-0002tU-FN for submit@debbugs.gnu.org; Fri, 11 Nov 2011 13:31:19 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROvsj-0002tN-Ag for 10016@debbugs.gnu.org; Fri, 11 Nov 2011 13:31:18 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id AEA4860142; Fri, 11 Nov 2011 19:30:58 +0100 (CET) From: Jim Meyering To: Eric Blake Subject: Re: bug#10016: ls -lk is wrong In-Reply-To: <8739du1vic.fsf@rho.meyering.net> (Jim Meyering's message of "Fri, 11 Nov 2011 17:20:11 +0100") References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> <8739du1vic.fsf@rho.meyering.net> Date: Fri, 11 Nov 2011 19:30:58 +0100 Message-ID: <87vcqqy0il.fsf@rho.meyering.net> Lines: 69 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10016 Cc: Alan Curry , 10016@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.7 (--) Jim Meyering wrote: > Eric Blake wrote: >> On 11/10/2011 04:35 PM, Alan Curry wrote: >>> I mentioned this already in the bug#9939 thread, but nobody replied and it's >>> really a separate issue so here's an independent report. >>> >>> This behavior: >>> >>> $ ls -l /bin/ls >>> -rwxr-xr-x 1 root root 107124 Feb 8 2011 /bin/ls >>> $ ls -lk /bin/ls >>> -rwxr-xr-x 1 root root 105 Feb 8 2011 /bin/ls >>> >>> is awful. -k should not have any effect on the ls -l field that reports >>> st_size. It is only supposed to possibly affect the reporting of st_blocks >>> by -s and the "total" line at the start of a full directory listing. >> >> I just re-read POSIX, and it looks like you are correct: >> >> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html >> >> -k >> Set the block size for the -s option and the per-directory block >> count written for the -l, -n, -s, [XSI] [Option Start] -g, and -o >> [Option End] options (see the STDOUT section) to 1024 bytes. >> >> POSIX has no mention of -k affecting the file size output, just the >> initial column for -s and the per-directory summary on "total" lines. > > Thank you, Alan! > > I reached the same conclusion. > It is a bug. > > It was introduced 9 years ago, in coreutils-4.5.4, > probably by commit 106c3bf3: > > sprintf (p, "%8s ", > - human_readable (size, hbuf, 1, > - output_block_size < 0 ? output_block_size : 1)); > + human_readable (size, hbuf, human_output_opts, > + 1, file_output_block_size)); > > > Per POSIX, this should print 1000000: > > $ truncate -s 1000000 k; set - $(env ls -ogk k); echo $3 > 977 > > The following change fixes it and introduces no test failure, > so I'll write a test, NEWS, etc. > > diff --git a/src/ls.c b/src/ls.c > index 0b8f512..41e9123 100644 > --- a/src/ls.c > +++ b/src/ls.c > @@ -3030,9 +3030,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode, > { > char buf[LONGEST_HUMAN_READABLE + 1]; > uintmax_t size = unsigned_file_size (f->stat.st_size); > - int len = mbswidth (human_readable (size, buf, human_output_opts, > - 1, file_output_block_size), > - 0); > + int len = mbswidth (human_readable (size, buf, 0, 1, 1), 0); I don't like the idea of printing a byte count there when --block-size=... takes effect. Does anyone else have an opinion? Regardless, -k's descriptions will have to be fixed, too. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 13:50:08 2011 Received: (at 10016) by debbugs.gnu.org; 11 Nov 2011 18:50:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROwAy-0003KY-JH for submit@debbugs.gnu.org; Fri, 11 Nov 2011 13:50:08 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROwAw-0003Jw-Bp for 10016@debbugs.gnu.org; Fri, 11 Nov 2011 13:50:07 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id A3DDC39E800D; Fri, 11 Nov 2011 10:49:42 -0800 (PST) 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 R7jqPQz5wemR; Fri, 11 Nov 2011 10:49:42 -0800 (PST) Received: from [192.168.1.5] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 3695039E800C; Fri, 11 Nov 2011 10:49:42 -0800 (PST) Message-ID: <4EBD6E3E.8030606@cs.ucla.edu> Date: Fri, 11 Nov 2011 10:49:34 -0800 From: Paul Eggert User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Jim Meyering Subject: Re: bug#10016: ls -lk is wrong References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> <8739du1vic.fsf@rho.meyering.net> <87vcqqy0il.fsf@rho.meyering.net> In-Reply-To: <87vcqqy0il.fsf@rho.meyering.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 10016 Cc: Eric Blake , Alan Curry , 10016@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.9 (--) On 11/11/2011 10:30 AM, Jim Meyering wrote: > I don't like the idea of printing a byte count there when > --block-size=... takes effect. Does anyone else have an opinion? Sorry, I've lost context. Are you talking about the output of "ls -ls --block-size=1"? Currently it starts with something like "total 8642560", and then each line looks something like this: 40960 -rwxr-xr-x 1 root root 38484 2011-02-23 05:22 foo where the "8642560", the "40960", and the "38484" are all byte counts. Which of these three numbers are you thinking should not be a byte count when the block size is 1? And how should the --si and -h options affect that number's display? From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 13:53:52 2011 Received: (at 10016) by debbugs.gnu.org; 11 Nov 2011 18:53:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROwEa-0003Pk-Ei for submit@debbugs.gnu.org; Fri, 11 Nov 2011 13:53:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROwEY-0003PO-6L for 10016@debbugs.gnu.org; Fri, 11 Nov 2011 13:53:51 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pABIrEhs011292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 11 Nov 2011 13:53:28 -0500 Received: from [10.3.226.71] (vpn-226-71.phx2.redhat.com [10.3.226.71]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pABIalT1031690; Fri, 11 Nov 2011 13:36:47 -0500 Message-ID: <4EBD6B3E.7010903@redhat.com> Date: Fri, 11 Nov 2011 11:36:46 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: Jim Meyering Subject: Re: bug#10016: ls -lk is wrong References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> <8739du1vic.fsf@rho.meyering.net> <87vcqqy0il.fsf@rho.meyering.net> In-Reply-To: <87vcqqy0il.fsf@rho.meyering.net> X-Enigmail-Version: 1.3.3 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigE51E8DFC65A4B6616557170B" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: 10016 Cc: Alan Curry , 10016@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -10.3 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE51E8DFC65A4B6616557170B Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/11/2011 11:30 AM, Jim Meyering wrote: >> +++ b/src/ls.c >> @@ -3030,9 +3030,7 @@ gobble_file (char const *name, enum filetype typ= e, ino_t inode, >> { >> char buf[LONGEST_HUMAN_READABLE + 1]; >> uintmax_t size =3D unsigned_file_size (f->stat.st_size)= ; >> - int len =3D mbswidth (human_readable (size, buf, human_= output_opts, >> - 1, file_output_bloc= k_size), >> - 0); >> + int len =3D mbswidth (human_readable (size, buf, 0, 1, = 1), 0); >=20 > I don't like the idea of printing a byte count there when > --block-size=3D... takes effect. Does anyone else have an opinion? Are you proposing that --block-size keep the current behavior, and that -k no longer be a synonym for --block-size=3D1k but instead becomes a new= long option? Makes sense to me - POSIX didn't standardize -k until 2008, which was long after coreutils had been implementing --block-size; I'm worried that changing the behavior of --block-size may have negative effects, whereas changing the behavior of -k to match POSIX is justifiable. >=20 > Regardless, -k's descriptions will have to be fixed, too. Agreed. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigE51E8DFC65A4B6616557170B 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.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJOvWs/AAoJEKeha0olJ0NqFDYH/3QEdJhH7mnJU6kC8SF9VJZu ZH9KGiqNrgq2MW5ccgZ2wbCopsuwkAumqQeu9r2gCa7GNOJC9guynFtD+R1nT350 UOGba6R8ShLDsuPG1UAus+2nBTXpsvKL3OP4tZabPhw+bjc4wYTZot4NKNGX2MSg F6/c0Y2h+RPz02FJH3GkWl3h5Bss7XRyYzwmtRkEXPBlxdo80Z5lfQjdjVHRPsVj /r1gxYgv4yHbQoPSUzdHjegspZzfd4Opfpwf+qLzUGvfpDtW4MiWtAiZr+0Shl+M avy7OJgOwkYit6aHc8hE3GeQfZPjG0SPPZ7uRov7nkKrfEyd/fGjJR7sO8qPscE= =mlfZ -----END PGP SIGNATURE----- --------------enigE51E8DFC65A4B6616557170B-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 14:24:22 2011 Received: (at 10016) by debbugs.gnu.org; 11 Nov 2011 19:24:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROwi6-00048L-AM for submit@debbugs.gnu.org; Fri, 11 Nov 2011 14:24:22 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROwi3-00048D-Is for 10016@debbugs.gnu.org; Fri, 11 Nov 2011 14:24:20 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 6C3C460142; Fri, 11 Nov 2011 20:24:00 +0100 (CET) From: Jim Meyering To: Paul Eggert Subject: Re: bug#10016: ls -lk is wrong In-Reply-To: <4EBD6E3E.8030606@cs.ucla.edu> (Paul Eggert's message of "Fri, 11 Nov 2011 10:49:34 -0800") References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> <8739du1vic.fsf@rho.meyering.net> <87vcqqy0il.fsf@rho.meyering.net> <4EBD6E3E.8030606@cs.ucla.edu> Date: Fri, 11 Nov 2011 20:24:00 +0100 Message-ID: <87pqgyxy27.fsf@rho.meyering.net> Lines: 27 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10016 Cc: Eric Blake , Alan Curry , 10016@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.7 (--) Paul Eggert wrote: > On 11/11/2011 10:30 AM, Jim Meyering wrote: >> I don't like the idea of printing a byte count there when >> --block-size=... takes effect. Does anyone else have an opinion? > Sorry, I've lost context. Are you talking about > the output of "ls -ls --block-size=1"? > Currently it starts with something like > "total 8642560", and then each line looks something > like this: > > 40960 -rwxr-xr-x 1 root root 38484 2011-02-23 05:22 foo > > where the "8642560", the "40960", and the "38484" > are all byte counts. Which of these three numbers are > you thinking should not be a byte count when the block > size is 1? And how should the --si and -h options affect > that number's display? I'm talking only about the st.st_size number, your 38484 above, when using -k with a long-listing option like -l, -o or -g. POSIX requires a byte-count (as you get with --block-size=1), but we print a block count. I'm thinking of making -k comply, but letting any block-size specification (via --block-size= or an envvar) override that to give the behavior we've seen for the last 9 years. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 14:25:09 2011 Received: (at 10016) by debbugs.gnu.org; 11 Nov 2011 19:25:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROwir-00049g-K2 for submit@debbugs.gnu.org; Fri, 11 Nov 2011 14:25:09 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROwip-00049Z-7z for 10016@debbugs.gnu.org; Fri, 11 Nov 2011 14:25:07 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id B1ACB6019A; Fri, 11 Nov 2011 20:24:48 +0100 (CET) From: Jim Meyering To: Eric Blake Subject: Re: bug#10016: ls -lk is wrong In-Reply-To: <4EBD6B3E.7010903@redhat.com> (Eric Blake's message of "Fri, 11 Nov 2011 11:36:46 -0700") References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> <8739du1vic.fsf@rho.meyering.net> <87vcqqy0il.fsf@rho.meyering.net> <4EBD6B3E.7010903@redhat.com> Date: Fri, 11 Nov 2011 20:24:48 +0100 Message-ID: <87k476xy0v.fsf@rho.meyering.net> Lines: 21 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10016 Cc: Alan Curry , 10016@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.7 (--) Eric Blake wrote: > On 11/11/2011 11:30 AM, Jim Meyering wrote: >>> +++ b/src/ls.c >>> @@ -3030,9 +3030,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode, >>> { >>> char buf[LONGEST_HUMAN_READABLE + 1]; >>> uintmax_t size = unsigned_file_size (f->stat.st_size); >>> - int len = mbswidth (human_readable (size, buf, human_output_opts, >>> - 1, file_output_block_size), >>> - 0); >>> + int len = mbswidth (human_readable (size, buf, 0, 1, 1), 0); >> >> I don't like the idea of printing a byte count there when >> --block-size=... takes effect. Does anyone else have an opinion? > > Are you proposing that --block-size keep the current behavior, and that > -k no longer be a synonym for --block-size=1k but instead becomes a new > long option? Precisely. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 14:26:08 2011 Received: (at 10016) by debbugs.gnu.org; 11 Nov 2011 19:26:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROwjo-0004BQ-9t for submit@debbugs.gnu.org; Fri, 11 Nov 2011 14:26:08 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROwjk-0004Ae-QG for 10016@debbugs.gnu.org; Fri, 11 Nov 2011 14:26:05 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 083F739E8008; Fri, 11 Nov 2011 11:25:41 -0800 (PST) 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 kAk5aEzTo0KH; Fri, 11 Nov 2011 11:25:40 -0800 (PST) Received: from [192.168.1.5] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 9CB5A39E8007; Fri, 11 Nov 2011 11:25:40 -0800 (PST) Message-ID: <4EBD76B4.1040702@cs.ucla.edu> Date: Fri, 11 Nov 2011 11:25:40 -0800 From: Paul Eggert User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#10016: ls -lk is wrong References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> <8739du1vic.fsf@rho.meyering.net> <87vcqqy0il.fsf@rho.meyering.net> <4EBD6B3E.7010903@redhat.com> In-Reply-To: <4EBD6B3E.7010903@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 10016 Cc: 10016@debbugs.gnu.org, Jim Meyering , Alan Curry X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.9 (--) On 11/11/2011 10:36 AM, Eric Blake wrote: > Are you proposing that --block-size keep the current behavior, and that > -k no longer be a synonym for --block-size=1k but instead becomes a new > long option? > > Makes sense to me That sort of thing makes sense to me too. I assume --block-size should silently override -k if both options are specified (in either order)? Does -k need a long-named option? From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 15:27:32 2011 Received: (at 10016) by debbugs.gnu.org; 11 Nov 2011 20:27:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROxhE-0006LB-Bo for submit@debbugs.gnu.org; Fri, 11 Nov 2011 15:27:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROxhB-0006L2-1G for 10016@debbugs.gnu.org; Fri, 11 Nov 2011 15:27:31 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pABKR2Ga027852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 11 Nov 2011 15:27:03 -0500 Received: from [10.3.226.71] (vpn-226-71.phx2.redhat.com [10.3.226.71]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pABKR1oN013843; Fri, 11 Nov 2011 15:27:02 -0500 Message-ID: <4EBD8515.70007@redhat.com> Date: Fri, 11 Nov 2011 13:27:01 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: Paul Eggert Subject: Re: bug#10016: ls -lk is wrong References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> <8739du1vic.fsf@rho.meyering.net> <87vcqqy0il.fsf@rho.meyering.net> <4EBD6B3E.7010903@redhat.com> <4EBD76B4.1040702@cs.ucla.edu> In-Reply-To: <4EBD76B4.1040702@cs.ucla.edu> X-Enigmail-Version: 1.3.3 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigF19EAE2ACE2EF2E401220DBA" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: 10016 Cc: 10016@debbugs.gnu.org, Jim Meyering , Alan Curry X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -10.3 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF19EAE2ACE2EF2E401220DBA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/11/2011 12:25 PM, Paul Eggert wrote: > On 11/11/2011 10:36 AM, Eric Blake wrote: >> Are you proposing that --block-size keep the current behavior, and tha= t >> -k no longer be a synonym for --block-size=3D1k but instead becomes a = new >> long option? >> >> Makes sense to me >=20 > That sort of thing makes sense to me too. > I assume --block-size should silently override -k > if both options are specified (in either order)? > Does -k need a long-named option? GNU Coding Standards request that all short options have a corresponding long option; by breaking the tie between -k and --block-size, we are breaking that convention unless we also add a new long option for the new meaning of -k. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigF19EAE2ACE2EF2E401220DBA 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.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJOvYUVAAoJEKeha0olJ0NqwAUIAJQVEIYdo1cFHq9t9QfreAkH sV3H9aJV9lLYboqmwV3nLnLAtplg8KpYnJbJqSHy7c3sfYMrf/UFVKgZkYaV80v9 9meC95y/g/BrcNjiiLuZEa9TiQzJ/YWZgZBEb8aesyImRbd8/+YGL7TsrR/R+oTJ n/w5fXi+KAJtPPTwL6qrN73Am7sCJAOssY6MgflNi2viUAt83U+PHL0vu7HNhl55 jkpHCRk+ZSo31EPLxNE9e5I7vC/kFmPr4MN9TjGYqSAjA+MfLTZ/CqbZVHfm+7Zl l+zh0Rxd2/7GelBgjlil1//EWV/ncQZJr+Bjz5vnzvYbHZmn427x+23fduhVbWQ= =p6ko -----END PGP SIGNATURE----- --------------enigF19EAE2ACE2EF2E401220DBA-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 16:06:42 2011 Received: (at 10016) by debbugs.gnu.org; 11 Nov 2011 21:06:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROyJ8-0007Cz-Ll for submit@debbugs.gnu.org; Fri, 11 Nov 2011 16:06:42 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROyJ5-0007Cm-IL for 10016@debbugs.gnu.org; Fri, 11 Nov 2011 16:06:40 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 8091E39E800C; Fri, 11 Nov 2011 13:06:15 -0800 (PST) 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 v7fXgMT8PKX6; Fri, 11 Nov 2011 13:06:14 -0800 (PST) Received: from [192.168.1.5] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id D550E39E8007; Fri, 11 Nov 2011 13:06:14 -0800 (PST) Message-ID: <4EBD8E46.5010108@cs.ucla.edu> Date: Fri, 11 Nov 2011 13:06:14 -0800 From: Paul Eggert User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#10016: ls -lk is wrong References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> <8739du1vic.fsf@rho.meyering.net> <87vcqqy0il.fsf@rho.meyering.net> <4EBD6B3E.7010903@redhat.com> <4EBD76B4.1040702@cs.ucla.edu> <4EBD8515.70007@redhat.com> In-Reply-To: <4EBD8515.70007@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 10016 Cc: 10016@debbugs.gnu.org, Jim Meyering , Alan Curry X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.9 (--) The long option shouldn't be --kilobyte, since ls -k means 1024 not 1000. So I suppose it should be --kibibyte. It's a little tricky, since -k means --block-size=1K for df and du as well, and I assume this won't change, since df -k and du -k conform to POSIX. (Surely there's no need to add --kibibyte to du and df -- why should we make df and du more confusing merely because ls must be more confusing? :-). So does the following sound plausible? Add --kibibyte to 'ls', make it equivalent to -k, change -k so that it conforms to POSIX, and have --block-size override -k. But leave df and du alone From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 16:11:06 2011 Received: (at 10016) by debbugs.gnu.org; 11 Nov 2011 21:11:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROyNO-0007Iy-6G for submit@debbugs.gnu.org; Fri, 11 Nov 2011 16:11:06 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROyNM-0007Iq-78 for 10016@debbugs.gnu.org; Fri, 11 Nov 2011 16:11:05 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id DAE286019A; Fri, 11 Nov 2011 22:10:44 +0100 (CET) From: Jim Meyering To: Paul Eggert Subject: Re: bug#10016: ls -lk is wrong In-Reply-To: <4EBD8E46.5010108@cs.ucla.edu> (Paul Eggert's message of "Fri, 11 Nov 2011 13:06:14 -0800") References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> <8739du1vic.fsf@rho.meyering.net> <87vcqqy0il.fsf@rho.meyering.net> <4EBD6B3E.7010903@redhat.com> <4EBD76B4.1040702@cs.ucla.edu> <4EBD8515.70007@redhat.com> <4EBD8E46.5010108@cs.ucla.edu> Date: Fri, 11 Nov 2011 22:10:44 +0100 Message-ID: <87wrb6wejv.fsf@rho.meyering.net> Lines: 19 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10016 Cc: Eric Blake , Alan Curry , 10016@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.7 (--) Paul Eggert wrote: > The long option shouldn't be --kilobyte, since ls -k means > 1024 not 1000. So I suppose it should be --kibibyte. > > It's a little tricky, since -k means --block-size=1K > for df and du as well, and I assume this won't change, > since df -k and du -k conform to POSIX. (Surely there's > no need to add --kibibyte to du and df -- why should > we make df and du more confusing merely because > ls must be more confusing? :-). > > So does the following sound plausible? > > Add --kibibyte to 'ls', make it equivalent to -k, change > -k so that it conforms to POSIX, and have --block-size > override -k. But leave df and du alone That sounds right. Do you feel like writing the patch? From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 17:54:12 2011 Received: (at 10016) by debbugs.gnu.org; 11 Nov 2011 22:54:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROzz9-0001Bd-TN for submit@debbugs.gnu.org; Fri, 11 Nov 2011 17:54:12 -0500 Received: from c-67-162-90-113.hsd1.in.comcast.net ([67.162.90.113] helo=kosh.dhis.org ident=qmailr) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1ROzz8-0001BW-CE for 10016@debbugs.gnu.org; Fri, 11 Nov 2011 17:54:11 -0500 Received: (qmail 14061 invoked by uid 1000); 11 Nov 2011 22:53:50 -0000 Message-ID: <20111111225350.14060.qmail@kosh.dhis.org> From: "Alan Curry" Subject: Re: bug#10016: ls -lk is wrong To: jim@meyering.net (Jim Meyering) Date: Fri, 11 Nov 2011 17:53:50 -0500 (GMT+5) In-Reply-To: <87pqgyxy27.fsf@rho.meyering.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: -0.8 (/) X-Debbugs-Envelope-To: 10016 Cc: 10016@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -0.8 (/) Jim Meyering writes: > > I'm thinking of making -k comply, but letting any block-size > specification (via --block-size= or an envvar) override that > to give the behavior we've seen for the last 9 years. > Wow, look what I stirred up. If it's been like this for 9 years, it's been broken for 9 years. As I said originally, BSD is the standard that matters here. It doesn't matter when or even whether POSIX blessed the -k option. Everywhere except GNU, this is simple. The size field of the ls -l output is not defined in terms of blocks, so the block size setting doesn't affect it. Numbers derived from st_blocks are reported in units of blocks, and others aren't. If you're going to define --block-size to have this effect, then you really need to document it as being an option that does 2 separate things: 1. sets the size of a block 2. alters the definition of the -l format -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 19:56:59 2011 Received: (at 10016) by debbugs.gnu.org; 12 Nov 2011 00:56:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RP1tx-0003wg-Tm for submit@debbugs.gnu.org; Fri, 11 Nov 2011 19:56:59 -0500 Received: from mail1.vodafone.ie ([213.233.128.43]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RP1tv-0003wQ-7o for 10016@debbugs.gnu.org; Fri, 11 Nov 2011 19:56:56 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAKDDvU5tTdQB/2dsb2JhbAAMNQ6EcqglAQEBBCMPAUYQCw0LAgIFFgsCAgkDAgECAUUGDQEHAQGIBqVKkTWBMIc4gRYEmgaLaDc Received: from unknown (HELO [192.168.1.79]) ([109.77.212.1]) by mail1.vodafone.ie with ESMTP; 12 Nov 2011 00:56:29 +0000 Message-ID: <4EBDC43D.9010504@draigBrady.com> Date: Sat, 12 Nov 2011 00:56:29 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Paul Eggert Subject: Re: bug#10016: ls -lk is wrong References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> <8739du1vic.fsf@rho.meyering.net> <87vcqqy0il.fsf@rho.meyering.net> <4EBD6B3E.7010903@redhat.com> <4EBD76B4.1040702@cs.ucla.edu> <4EBD8515.70007@redhat.com> <4EBD8E46.5010108@cs.ucla.edu> In-Reply-To: <4EBD8E46.5010108@cs.ucla.edu> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10016 Cc: 10016@debbugs.gnu.org, Eric Blake , Alan Curry , Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.6 (--) On 11/11/2011 09:06 PM, Paul Eggert wrote: > The long option shouldn't be --kilobyte, since ls -k means > 1024 not 1000. So I suppose it should be --kibibyte. > > It's a little tricky, since -k means --block-size=1K > for df and du as well, and I assume this won't change, > since df -k and du -k conform to POSIX. (Surely there's > no need to add --kibibyte to du and df -- why should > we make df and du more confusing merely because > ls must be more confusing? :-). > > So does the following sound plausible? > > Add --kibibyte to 'ls', make it equivalent to -k, change > -k so that it conforms to POSIX, and have --block-size > override -k. But leave df and du alone I'm reluctant to add a new option which no one will really use. But I concur, given the hits from: http://codesearch.google.com/#search/&q=ls\%20.*--block%20lang:^shell$&p=1&type=cs -k really isn't used in that context, and replacing --block with -k in the above query returns no hits. cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 12 02:41:09 2011 Received: (at 10016-done) by debbugs.gnu.org; 12 Nov 2011 07:41:09 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RP8D6-0004mL-AA for submit@debbugs.gnu.org; Sat, 12 Nov 2011 02:41:09 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RP8D0-0004ll-8Z; Sat, 12 Nov 2011 02:41:05 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 35BD439E800D; Fri, 11 Nov 2011 23:40:35 -0800 (PST) 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 ymY3WmmmciTN; Fri, 11 Nov 2011 23:40:32 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id BE2B839E800C; Fri, 11 Nov 2011 23:40:32 -0800 (PST) Message-ID: <4EBE22F4.4020904@cs.ucla.edu> Date: Fri, 11 Nov 2011 23:40:36 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Jim Meyering Subject: Re: bug#10016: ls -lk is wrong References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> <8739du1vic.fsf@rho.meyering.net> <87vcqqy0il.fsf@rho.meyering.net> <4EBD6B3E.7010903@redhat.com> <4EBD76B4.1040702@cs.ucla.edu> <4EBD8515.70007@redhat.com> <4EBD8E46.5010108@cs.ucla.edu> <87wrb6wejv.fsf@rho.meyering.net> In-Reply-To: <87wrb6wejv.fsf@rho.meyering.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 10016-done Cc: 9939@debbugs.gnu.org, 10016-done@debbugs.gnu.org, Eric Blake , Alan Curry X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.9 (--) On 11/11/11 13:10, Jim Meyering wrote: > Do you feel like writing the patch? Sure. I wrote and pushed the following. The test case isn't elegant, but at least it catches the bug. ls: -k no longer affects -l's file sizes This fixes an incompatibility with POSIX 2008 and with BSD. Problem reported by Abdallah Clark (Bug#9939) via Alan Curry (Bug#10016). * NEWS: Document this. * doc/coreutils.texi (General output formatting): Document the new -k behavior, and --kibibytes. * src/ls.c (file_human_output_opts): New static var. (long_options, usage): Add --kibibytes. (decode_switches, gobble_file, print_long_format): Implement the new -k behavior. * tests/ls/block-size: New file. * tests/Makefile.am (TESTS): Add it. diff --git a/NEWS b/NEWS index 081989d..1b0f2f5 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,13 @@ GNU coreutils NEWS -*- outline -*- ** Bug fixes + ls's -k option no longer affects how ls -l outputs file sizes. + It now affects only the per-directory block counts written by -l, + and the sizes written by -s. This is for compatibility with BSD + and with POSIX 2008. Because -k is no longer equivalent to + --block-size=1KiB, a new long option --kibibyte stands for -k. + [bug introduced in coreutils-4.5.4] + rm -rf DIR would fail with "Device or resource busy" on Cygwin with NWFS and NcFsd file systems. This did not affect Unix/Linux-based kernels. [bug introduced in coreutils-8.0, when rm began using fts] diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 2c33fe8..4531440 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -7127,10 +7127,19 @@ Append @samp{*} for executable regular files, otherwise behave as for @end table @item -k +@itemx --kibibytes @opindex -k -Print file sizes in 1024-byte blocks, overriding the default block -size (@pxref{Block size}). -This option is equivalent to @option{--block-size=1K}. +@opindex --kibibytes +Set the default block size to its normal value of 1024 bytes, +overriding any contrary specification in environment variables +(@pxref{Block size}). This option is in turn overridden by the +@option{--block-size}, @option{-h} or @option{--human-readable}, and +@option{--si} options. + +The @option{-k} or @option{--kibibytes} option affects the +per-directory block count written by the @option{-l} and similar +options, and the size written by the @option{-s} or @option{--size} +option. It does not affect the file size written by @option{-l}. @item -m @itemx --format=commas diff --git a/src/ls.c b/src/ls.c index 1b0c250..b8a09b3 100644 --- a/src/ls.c +++ b/src/ls.c @@ -479,13 +479,14 @@ static bool numeric_ids; static bool print_block_size; -/* Human-readable options for output. */ +/* Human-readable options for output, when printing block counts. */ static int human_output_opts; -/* The units to use when printing sizes other than file sizes. */ +/* The units to use when printing block counts. */ static uintmax_t output_block_size; /* Likewise, but for file sizes. */ +static int file_human_output_opts; static uintmax_t file_output_block_size = 1; /* Follow the output with a special string. Using this format, @@ -809,6 +810,7 @@ static struct option const long_options[] = GROUP_DIRECTORIES_FIRST_OPTION}, {"human-readable", no_argument, NULL, 'h'}, {"inode", no_argument, NULL, 'i'}, + {"kibibytes", no_argument, NULL, 'k'}, {"numeric-uid-gid", no_argument, NULL, 'n'}, {"no-group", no_argument, NULL, 'G'}, {"hide-control-chars", no_argument, NULL, 'q'}, @@ -1512,8 +1514,8 @@ decode_switches (int argc, char **argv) { char *time_style_option = NULL; - /* Record whether there is an option specifying sort type. */ bool sort_type_specified = false; + bool kibibytes_specified = false; qmark_funny_chars = false; @@ -1582,14 +1584,6 @@ decode_switches (int argc, char **argv) } } - { - char const *ls_block_size = getenv ("LS_BLOCK_SIZE"); - human_options (ls_block_size, - &human_output_opts, &output_block_size); - if (ls_block_size || getenv ("BLOCK_SIZE")) - file_output_block_size = output_block_size; - } - line_length = 80; { char const *p = getenv ("COLUMNS"); @@ -1689,7 +1683,8 @@ decode_switches (int argc, char **argv) break; case 'h': - human_output_opts = human_autoscale | human_SI | human_base_1024; + file_human_output_opts = human_output_opts = + human_autoscale | human_SI | human_base_1024; file_output_block_size = output_block_size = 1; break; @@ -1698,8 +1693,7 @@ decode_switches (int argc, char **argv) break; case 'k': - human_output_opts = 0; - file_output_block_size = output_block_size = 1024; + kibibytes_specified = true; break; case 'l': @@ -1937,12 +1931,14 @@ decode_switches (int argc, char **argv) &output_block_size); if (e != LONGINT_OK) xstrtol_fatal (e, oi, 0, long_options, optarg); + file_human_output_opts = human_output_opts; file_output_block_size = output_block_size; } break; case SI_OPTION: - human_output_opts = human_autoscale | human_SI; + file_human_output_opts = human_output_opts = + human_autoscale | human_SI; file_output_block_size = output_block_size = 1; break; @@ -1959,6 +1955,23 @@ decode_switches (int argc, char **argv) } } + if (! output_block_size) + { + char const *ls_block_size = getenv ("LS_BLOCK_SIZE"); + human_options (ls_block_size, + &human_output_opts, &output_block_size); + if (ls_block_size || getenv ("BLOCK_SIZE")) + { + file_human_output_opts = human_output_opts; + file_output_block_size = output_block_size; + } + if (kibibytes_specified) + { + human_output_opts = 0; + output_block_size = 1024; + } + } + max_idx = MAX (1, line_length / MIN_COLUMN_WIDTH); filename_quoting_options = clone_quoting_options (NULL); @@ -3025,7 +3038,8 @@ gobble_file (char const *name, enum filetype type, ino_t inode, { char buf[LONGEST_HUMAN_READABLE + 1]; uintmax_t size = unsigned_file_size (f->stat.st_size); - int len = mbswidth (human_readable (size, buf, human_output_opts, + int len = mbswidth (human_readable (size, buf, + file_human_output_opts, 1, file_output_block_size), 0); if (file_size_width < len) @@ -3767,7 +3781,8 @@ print_long_format (const struct fileinfo *f) (! f->stat_ok ? "?" : human_readable (unsigned_file_size (f->stat.st_size), - hbuf, human_output_opts, 1, file_output_block_size)); + hbuf, file_human_output_opts, 1, + file_output_block_size)); int pad; for (pad = file_size_width - mbswidth (size, 0); 0 < pad; pad--) *p++ = ' '; @@ -4672,7 +4687,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\ -i, --inode print the index number of each file\n\ -I, --ignore=PATTERN do not list implied entries matching shell PATTERN\ \n\ - -k like --block-size=1K\n\ + -k, --kibibytes use 1024-byte blocks\n\ "), stdout); fputs (_("\ -l use a long listing format\n\ diff --git a/tests/Makefile.am b/tests/Makefile.am index 5021c18..64366a4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -415,6 +415,7 @@ TESTS = \ ln/slash-decorated-nonexistent-dest \ ln/target-1 \ ls/abmon-align \ + ls/block-size \ ls/color-clear-to-eol \ ls/color-dtype-dir \ ls/color-norm \ diff --git a/tests/ls/block-size b/tests/ls/block-size new file mode 100644 index 0000000..16ede04 --- /dev/null +++ b/tests/ls/block-size @@ -0,0 +1,173 @@ +#!/bin/sh +# Exercise ls --block-size and related options. + +# Copyright (C) 2011 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. "${srcdir=.}/init.sh"; path_prepend_ ../src +print_ver_ ls + +TZ=UTC0 +export TZ + +mkdir sub +cd sub + +for size in 1024 4096 262144; do + echo foo | dd conv=sync bs=$size >file$size || fail=1 +done +touch -d '2001-01-01 00:00' file* || fail=1 + +size_etc='s/[^ ]* *[^ ]* *[^ ]* *[^ ]* *//' + +ls -l * | sed "$size_etc" >../out || fail=1 +POSIXLY_CORRECT=1 ls -l * | sed "$size_etc" >>../out || fail=1 +POSIXLY_CORRECT=1 ls -k -l * | sed "$size_etc" >>../out || fail=1 + +for var in BLOCKSIZE BLOCK_SIZE LS_BLOCK_SIZE; do + for blocksize in 1 512 1K 1KiB; do + (eval $var=$blocksize && export $var && + ls -l * && + ls -l -k * && + ls -l -k --block-size=$blocksize * + ) | sed "$size_etc" >>../out || fail=1 + done +done + +cd .. + +cat >exp <<'EOF' +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +2 Jan 1 2001 file1024 +512 Jan 1 2001 file262144 +8 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +2 Jan 1 2001 file1024 +512 Jan 1 2001 file262144 +8 Jan 1 2001 file4096 +2 Jan 1 2001 file1024 +512 Jan 1 2001 file262144 +8 Jan 1 2001 file4096 +2 Jan 1 2001 file1024 +512 Jan 1 2001 file262144 +8 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +1024 Jan 1 2001 file1024 +262144 Jan 1 2001 file262144 +4096 Jan 1 2001 file4096 +2 Jan 1 2001 file1024 +512 Jan 1 2001 file262144 +8 Jan 1 2001 file4096 +2 Jan 1 2001 file1024 +512 Jan 1 2001 file262144 +8 Jan 1 2001 file4096 +2 Jan 1 2001 file1024 +512 Jan 1 2001 file262144 +8 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +1 Jan 1 2001 file1024 +256 Jan 1 2001 file262144 +4 Jan 1 2001 file4096 +EOF + +compare out exp || fail=1 + +Exit $fail From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 12 04:47:11 2011 Received: (at 10016-done) by debbugs.gnu.org; 12 Nov 2011 09:47:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RPAB5-0007bK-7q for submit@debbugs.gnu.org; Sat, 12 Nov 2011 04:47:11 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RPAB2-0007b9-Bo; Sat, 12 Nov 2011 04:47:09 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 0D0D46002D; Sat, 12 Nov 2011 10:46:46 +0100 (CET) From: Jim Meyering To: Paul Eggert Subject: Re: bug#10016: ls -lk is wrong In-Reply-To: <4EBE22F4.4020904@cs.ucla.edu> (Paul Eggert's message of "Fri, 11 Nov 2011 23:40:36 -0800") References: <20111110233532.20349.qmail@kosh.dhis.org> <4EBC68DF.701@redhat.com> <8739du1vic.fsf@rho.meyering.net> <87vcqqy0il.fsf@rho.meyering.net> <4EBD6B3E.7010903@redhat.com> <4EBD76B4.1040702@cs.ucla.edu> <4EBD8515.70007@redhat.com> <4EBD8E46.5010108@cs.ucla.edu> <87wrb6wejv.fsf@rho.meyering.net> <4EBE22F4.4020904@cs.ucla.edu> Date: Sat, 12 Nov 2011 10:46:45 +0100 Message-ID: <87boshvfju.fsf@rho.meyering.net> Lines: 8 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10016-done Cc: 9939@debbugs.gnu.org, 10016-done@debbugs.gnu.org, Eric Blake , Alan Curry X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.7 (--) Paul Eggert wrote: > On 11/11/11 13:10, Jim Meyering wrote: >> Do you feel like writing the patch? > > Sure. I wrote and pushed the following. > The test case isn't elegant, but at least it catches the bug. That was quick. Thanks! From unknown Mon Aug 18 02:36:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 10 Dec 2011 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator