Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jan 2013 22:51:49 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r245191 - projects/mtree/usr.bin/xinstall
Message-ID:  <201301082251.r08MpncG036525@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



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