Module Name: src
Committed By: christos
Date: Fri Feb 21 02:42:41 UTC 2014
Modified Files:
src/bin/ls: ls.1 ls.c
Log Message:
Add -X (don't cross mount points when recursing) from tls@
To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/bin/ls/ls.1
cvs rdiff -u -r1.71 -r1.72 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.74 src/bin/ls/ls.1:1.75
--- src/bin/ls/ls.1:1.74 Thu Feb 20 14:10:25 2014
+++ src/bin/ls/ls.1 Thu Feb 20 21:42:41 2014
@@ -1,4 +1,4 @@
-.\" $NetBSD: ls.1,v 1.74 2014/02/20 19:10:25 wiz Exp $
+.\" $NetBSD: ls.1,v 1.75 2014/02/21 02:42:41 christos Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@@ -40,7 +40,7 @@
.Nd list directory contents
.Sh SYNOPSIS
.Nm
-.Op Fl 1AaBbCcdFfghikLlMmnOoPpqRrSsTtuWwx
+.Op Fl 1AaBbCcdFfghikLlMmnOoPpqRrSsTtuWwXx
.Op Ar
.Sh DESCRIPTION
For each
@@ -254,6 +254,8 @@ Force raw printing of non-printable char
This is the default when output is not to a terminal.
.It Fl x
Multi-column output sorted across the page rather than down the page.
+.It Fl X
+Don't cross mount points when recursing.
.El
.Pp
The
Index: src/bin/ls/ls.c
diff -u src/bin/ls/ls.c:1.71 src/bin/ls/ls.c:1.72
--- src/bin/ls/ls.c:1.71 Thu Feb 20 13:56:36 2014
+++ src/bin/ls/ls.c Thu Feb 20 21:42:41 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: ls.c,v 1.71 2014/02/20 18:56:36 christos Exp $ */
+/* $NetBSD: ls.c,v 1.72 2014/02/21 02:42:41 christos 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.71 2014/02/20 18:56:36 christos Exp $");
+__RCSID("$NetBSD: ls.c,v 1.72 2014/02/21 02:42:41 christos Exp $");
#endif
#endif /* not lint */
@@ -119,7 +119,7 @@ usage(void)
{
(void)fprintf(stderr,
- "usage: %s [-1AaBbCcdFfghikLlMmnopqRrSsTtuWwx] [file ...]\n",
+ "usage: %s [-1AaBbCcdFfghikLlMmnOoPpqRrSsTtuWwXx] [file ...]\n",
getprogname());
exit(EXIT_FAILURE);
/* NOTREACHED */
@@ -151,7 +151,8 @@ ls_main(int argc, char *argv[])
f_listdot = 1;
fts_options = FTS_PHYSICAL;
- while ((ch = getopt(argc, argv, "1ABCFLMOPRSTWabcdfghiklmnopqrstuwx")) != -1) {
+ while ((ch = getopt(argc, argv, "1AaBbCcdFfghikLlMmnOoPpqRrSsTtWwXx"))
+ != -1) {
switch (ch) {
/*
* The -1, -C, -l, -m and -x options all override each other so
@@ -297,6 +298,9 @@ ls_main(int argc, char *argv[])
f_octal = 0;
f_octal_escape = 0;
break;
+ case 'X':
+ fts_options |= FTS_XDEV;
+ break;
default:
case '?':
usage();