Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Aug 2016 18:19:05 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r303930 - head/usr.bin/xinstall
Message-ID:  <201608101819.u7AIJ5nm079403@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Wed Aug 10 18:19:05 2016
New Revision: 303930
URL: https://svnweb.freebsd.org/changeset/base/303930

Log:
  Support -v for -l.
  
  MFC after:	1 week
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/usr.bin/xinstall/xinstall.c

Modified: head/usr.bin/xinstall/xinstall.c
==============================================================================
--- head/usr.bin/xinstall/xinstall.c	Wed Aug 10 18:19:02 2016	(r303929)
+++ head/usr.bin/xinstall/xinstall.c	Wed Aug 10 18:19:05 2016	(r303930)
@@ -533,6 +533,9 @@ do_link(const char *from_name, const cha
 			if (target_sb->st_flags & NOCHANGEBITS)
 				(void)chflags(to_name, target_sb->st_flags &
 				     ~NOCHANGEBITS);
+			if (verbose)
+				printf("install: link %s -> %s\n",
+				    from_name, to_name);
 			unlink(to_name);
 			ret = rename(tmpl, to_name);
 			/*
@@ -543,8 +546,12 @@ do_link(const char *from_name, const cha
 			(void)unlink(tmpl);
 		}
 		return (ret);
-	} else
+	} else {
+		if (verbose)
+			printf("install: link %s -> %s\n",
+			    from_name, to_name);
 		return (link(from_name, to_name));
+	}
 }
 
 /*
@@ -575,12 +582,18 @@ do_symlink(const char *from_name, const 
 			     ~NOCHANGEBITS);
 		unlink(to_name);
 
+		if (verbose)
+			printf("install: symlink %s -> %s\n",
+			    from_name, to_name);
 		if (rename(tmpl, to_name) == -1) {
 			/* Remove temporary link before exiting. */
 			(void)unlink(tmpl);
 			err(EX_OSERR, "%s: rename", to_name);
 		}
 	} else {
+		if (verbose)
+			printf("install: symlink %s -> %s\n",
+			    from_name, to_name);
 		if (symlink(from_name, to_name) == -1)
 			err(EX_OSERR, "symlink %s -> %s", from_name, to_name);
 	}



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