svn commit: r264064 - head/bin/ls
Greg Lehey
grog at FreeBSD.org
Thu Apr 3 05:48:29 UTC 2014
Author: grog
Date: Thu Apr 3 05:48:28 2014
New Revision: 264064
URL: http://svnweb.freebsd.org/changeset/base/264064
Log:
Make -f set -a, as required by the standard.
From the original OpenBSD commit message:
restore the traditional behavior of -f implying -a; apparently Keith
Bostic forgot to restore it when the -f flag was put back on 2nd of
September 1989, after being removed on 16th of August as a
consequence of issues getting it working over NFS, so deviation from
traditional UNIX behavior in all BSDs looks like an historical
accident; as a side effect, this change accommodates behavior of
this option to IEEE Std 1003.1-2008 (``POSIX.1'').
joint work with jmc@ (who found the inaccuracy in our
implementation), schwarze@ (who provided a detailed tracking of
historical facts) and millert@
Submitted by: Igor Sobrado
Discussed with: mckusick
Obtained from: OpenBSD project
MFC after: 2 weeks
Modified:
head/bin/ls/ls.1
head/bin/ls/ls.c
Modified: head/bin/ls/ls.1
==============================================================================
--- head/bin/ls/ls.1 Thu Apr 3 01:46:03 2014 (r264063)
+++ head/bin/ls/ls.1 Thu Apr 3 05:48:28 2014 (r264064)
@@ -194,6 +194,8 @@ Use time when file status was last chang
Directories are listed as plain files (not searched recursively).
.It Fl f
Output is not sorted.
+This option turns on
+.Fl a .
.It Fl g
This option is deprecated and is only available for compatibility
with
Modified: head/bin/ls/ls.c
==============================================================================
--- head/bin/ls/ls.c Thu Apr 3 01:46:03 2014 (r264063)
+++ head/bin/ls/ls.c Thu Apr 3 05:48:28 2014 (r264064)
@@ -226,6 +226,9 @@ main(int argc, char *argv[])
f_accesstime = 0;
f_statustime = 0;
break;
+ case 'f':
+ f_nosort = 1;
+ /* FALLTHROUGH */
case 'a':
fts_options |= FTS_SEEDOT;
/* FALLTHROUGH */
@@ -300,9 +303,6 @@ main(int argc, char *argv[])
f_listdir = 1;
f_recursive = 0;
break;
- case 'f':
- f_nosort = 1;
- break;
case 'g': /* Compatibility with 4.3BSD. */
break;
case 'h':
More information about the svn-src-all
mailing list