Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Sep 2012 20:14:27 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r240790 - projects/mtree/contrib/mtree
Message-ID:  <201209212014.q8LKER3E099600@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Fri Sep 21 20:14:27 2012
New Revision: 240790
URL: http://svn.freebsd.org/changeset/base/240790

Log:
  Make -t the default on FreeBSD systems.  Add a -T which disables this
  behavior and document the defaults.

Modified:
  projects/mtree/contrib/mtree/mtree.8
  projects/mtree/contrib/mtree/mtree.c

Modified: projects/mtree/contrib/mtree/mtree.8
==============================================================================
--- projects/mtree/contrib/mtree/mtree.8	Fri Sep 21 20:03:13 2012	(r240789)
+++ projects/mtree/contrib/mtree/mtree.8	Fri Sep 21 20:14:27 2012	(r240790)
@@ -300,6 +300,16 @@ The checksum is seeded with the specifie
 .It Fl t
 Modify the modified time of existing files, the device type of devices, and
 symbolic link targets, to match the specification.
+This is the default on
+.Fx
+systems.
+.It Fl T
+.Em Do not
+modify the modified timeof existing files, the device type of devices, and
+symbolic link targets, to match the specification.
+This is the default on systems other than
+.Fx
+.
 .It Fl U
 Same as
 .Fl u

Modified: projects/mtree/contrib/mtree/mtree.c
==============================================================================
--- projects/mtree/contrib/mtree/mtree.c	Fri Sep 21 20:03:13 2012	(r240789)
+++ projects/mtree/contrib/mtree/mtree.c	Fri Sep 21 20:14:27 2012	(r240790)
@@ -79,8 +79,12 @@ main(int argc, char **argv)
 	spec1 = stdin;
 	spec2 = NULL;
 
+#ifdef __FreeBSD__
+	tflag = 1;
+#endif
+
 	while ((ch = getopt(argc, argv,
-	    "cCdDeE:f:I:ijk:K:lLmMnN:p:PqrR:s:StuUwWxX:"))
+	    "cCdDeE:f:I:ijk:K:lLmMnN:p:PqrR:s:StTuUwWxX:"))
 	    != -1) {
 		switch((char)ch) {
 		case 'c':
@@ -187,6 +191,9 @@ main(int argc, char **argv)
 		case 't':
 			tflag = 1;
 			break;
+		case 'T':
+			tflag = 0;
+			break;
 		case 'u':
 			uflag = 1;
 			break;



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