svn commit: r245191 - projects/mtree/usr.bin/xinstall

Brooks Davis brooks at FreeBSD.org
Tue Jan 8 22:51:49 UTC 2013


Author: brooks
Date: Tue Jan  8 22:51:48 2013
New Revision: 245191
URL: http://svnweb.freebsd.org/changeset/base/245191

Log:
  Don't check that the src and dest are the same files if we're going to link
  them.

Modified:
  projects/mtree/usr.bin/xinstall/xinstall.c

Modified: projects/mtree/usr.bin/xinstall/xinstall.c
==============================================================================
--- projects/mtree/usr.bin/xinstall/xinstall.c	Tue Jan  8 22:42:15 2013	(r245190)
+++ projects/mtree/usr.bin/xinstall/xinstall.c	Tue Jan  8 22:51:48 2013	(r245191)
@@ -357,7 +357,7 @@ main(int argc, char *argv[])
 			errno = EFTYPE;
 			err(EX_OSERR, "%s", to_name);
 		}
-		if (to_sb.st_dev == from_sb.st_dev &&
+		if (!dolink && to_sb.st_dev == from_sb.st_dev &&
 		    to_sb.st_ino == from_sb.st_ino)
 			errx(EX_USAGE, 
 			    "%s and %s are the same file", *argv, to_name);


More information about the svn-src-projects mailing list