From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 11 13:35:40 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1E86150; Tue, 11 Dec 2012 13:35:39 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by mx1.freebsd.org (Postfix) with ESMTP id 692C78FC08; Tue, 11 Dec 2012 13:35:38 +0000 (UTC) Received: from jh (a91-153-115-208.elisa-laajakaista.fi [91.153.115.208]) by gw01.mail.saunalahti.fi (Postfix) with SMTP id 17E721512D7; Tue, 11 Dec 2012 15:35:25 +0200 (EET) Date: Tue, 11 Dec 2012 15:35:25 +0200 From: Jaakko Heinonen To: Greg Lehey Subject: Re: svn commit: r244075 - stable/9/bin/ls Message-ID: <20121211133525.GA43682@jh> References: <201212100311.qBA3BKL6004047@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201212100311.qBA3BKL6004047@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2012 13:35:40 -0000 On 2012-12-10, Greg Lehey wrote: > MFC to r242840: I found confusing that this commit merges changes not mentioned in the commit message below. It make me while to notice "to" before the revision number. Also the commit didn't record mergeinfo. > Add y flag and environment variable LS_SAMESORT to specify the same > sorting order for time and name with the -t option. IEEE Std 1003.2 > (POSIX.2) mandates that the -t option sort in descending order, and > that if two files have the same timestamp, they should be sorted in > ascending order of their names. The -r flag reverses both of these > sort orders, so they're never the same. This creates significant > problems for sequentially named files stored on FAT file systems, > where it can be impossible to list them in the order in which they > were created. > > Add , (comma) option to print file sizes grouped and separated by > thousands using the non-monetary separator returned by localeconv(3), > typically a comma or period. > Modified: stable/9/bin/ls/cmp.c > ============================================================================== > --- stable/9/bin/ls/cmp.c Mon Dec 10 02:44:47 2012 (r244074) > +++ stable/9/bin/ls/cmp.c Mon Dec 10 03:11:19 2012 (r244075) > @@ -78,6 +78,9 @@ modcmp(const FTSENT *a, const FTSENT *b) > if (b->fts_statp->st_mtim.tv_nsec < > a->fts_statp->st_mtim.tv_nsec) > return (-1); > + if (f_samesort) > + return (strcoll(b->fts_name, a->fts_name)); > + else > return (strcoll(a->fts_name, b->fts_name)); > } Wrong indentation. Merge error? > @@ -104,6 +107,9 @@ acccmp(const FTSENT *a, const FTSENT *b) > if (b->fts_statp->st_atim.tv_nsec < > a->fts_statp->st_atim.tv_nsec) > return (-1); > + if (f_samesort) > + return (strcoll(b->fts_name, a->fts_name)); > + else > return (strcoll(a->fts_name, b->fts_name)); > } Ditto. > @@ -130,6 +136,9 @@ birthcmp(const FTSENT *a, const FTSENT * > if (b->fts_statp->st_birthtim.tv_nsec < > a->fts_statp->st_birthtim.tv_nsec) > return (-1); > + if (f_samesort) > + return (strcoll(b->fts_name, a->fts_name)); > + else > return (strcoll(a->fts_name, b->fts_name)); > } Ditto. > @@ -156,6 +165,9 @@ statcmp(const FTSENT *a, const FTSENT *b > if (b->fts_statp->st_ctim.tv_nsec < > a->fts_statp->st_ctim.tv_nsec) > return (-1); > + if (f_samesort) > + return (strcoll(b->fts_name, a->fts_name)); > + else > return (strcoll(a->fts_name, b->fts_name)); > } Ditto. -- Jaakko