Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Oct 2009 21:51:50 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r198056 - head/bin/ls
Message-ID:  <200910132151.n9DLpo1A017647@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Tue Oct 13 21:51:50 2009
New Revision: 198056
URL: http://svn.freebsd.org/changeset/base/198056

Log:
  ls: Make -p not inhibit following symlinks.
  
  According to the man page, when neither -H/-L nor -F/-d/-l are given, -H is
  implied. This agrees with POSIX, GNU ls and Solaris ls. This means that -p,
  although it is very similar to -F, does not prevent the implicit following
  of symlinks.
  
  PR:		standards/128546

Modified:
  head/bin/ls/ls.c

Modified: head/bin/ls/ls.c
==============================================================================
--- head/bin/ls/ls.c	Tue Oct 13 21:28:51 2009	(r198055)
+++ head/bin/ls/ls.c	Tue Oct 13 21:51:50 2009	(r198056)
@@ -399,7 +399,7 @@ main(int argc, char *argv[])
 	 * If not -F, -d or -l options, follow any symbolic links listed on
 	 * the command line.
 	 */
-	if (!f_longform && !f_listdir && !f_type)
+	if (!f_longform && !f_listdir && (!f_type || f_slash))
 		fts_options |= FTS_COMFOLLOW;
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910132151.n9DLpo1A017647>