Module Name:    src
Committed By:   wiz
Date:           Wed Apr  2 10:55:47 UTC 2014

Modified Files:
        src/bin/ls: ls.1 ls.c

Log Message:
Apply diff from Igor Sobrado <i...@orion.ciencias.uniovi.es>:

We have written a diff to our ls(1) to recover the traditional behaviour
of -f implying -a.  This change does not only accommodates POSIX.1
but also matches traditional UNIX.

OpenBSD commit message:

CVSROOT:        /cvs
Module name:    src
Changes by:     sobr...@cvs.openbsd.org 2014/03/31 14:54:37

Modified files:
        bin/ls         : ls.1 ls.c

Log 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@

ok millert@, schwarze@


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/bin/ls/ls.1
cvs rdiff -u -r1.73 -r1.74 src/bin/ls/ls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/ls/ls.1
diff -u src/bin/ls/ls.1:1.75 src/bin/ls/ls.1:1.76
--- src/bin/ls/ls.1:1.75	Fri Feb 21 02:42:41 2014
+++ src/bin/ls/ls.1	Wed Apr  2 10:55:47 2014
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ls.1,v 1.75 2014/02/21 02:42:41 christos Exp $
+.\"	$NetBSD: ls.1,v 1.76 2014/04/02 10:55:47 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1990, 1991, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"     @(#)ls.1	8.7 (Berkeley) 7/29/94
 .\"
-.Dd February 20, 2014
+.Dd April 2, 2014
 .Dt LS 1
 .Os
 .Sh NAME
@@ -127,6 +127,8 @@ after each that is a
 .Tn FIFO .
 .It Fl f
 Output is not sorted.
+This option turns on
+.Fl a .
 .It Fl g
 The same as
 .Fl l ,

Index: src/bin/ls/ls.c
diff -u src/bin/ls/ls.c:1.73 src/bin/ls/ls.c:1.74
--- src/bin/ls/ls.c:1.73	Sat Feb 22 13:08:13 2014
+++ src/bin/ls/ls.c	Wed Apr  2 10:55:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ls.c,v 1.73 2014/02/22 13:08:13 mlelstv Exp $	*/
+/*	$NetBSD: ls.c,v 1.74 2014/04/02 10:55:47 wiz Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)ls.c	8.7 (Berkeley) 8/5/94";
 #else
-__RCSID("$NetBSD: ls.c,v 1.73 2014/02/22 13:08:13 mlelstv Exp $");
+__RCSID("$NetBSD: ls.c,v 1.74 2014/04/02 10:55:47 wiz Exp $");
 #endif
 #endif /* not lint */
 
@@ -207,6 +207,9 @@ ls_main(int argc, char *argv[])
 		case 'R':
 			f_recursive = 1;
 			break;
+		case 'f':
+			f_nosort = 1;
+			/* FALLTHROUGH */
 		case 'a':
 			fts_options |= FTS_SEEDOT;
 			/* FALLTHROUGH */
@@ -230,9 +233,6 @@ ls_main(int argc, char *argv[])
 			f_listdir = 1;
 			f_recursive = 0;
 			break;
-		case 'f':
-			f_nosort = 1;
-			break;
 		case 'i':
 			f_inode = 1;
 			break;

Reply via email to