Module Name:    src
Committed By:   christos
Date:           Fri Oct  5 01:19:54 UTC 2012

Modified Files:
        src/usr.sbin/mtree: create.c mtree.8 spec.c

Log Message:
clarify seconds.09nanoseconds format (brooks)


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/usr.sbin/mtree/create.c
cvs rdiff -u -r1.58 -r1.59 src/usr.sbin/mtree/mtree.8
cvs rdiff -u -r1.81 -r1.82 src/usr.sbin/mtree/spec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/mtree/create.c
diff -u src/usr.sbin/mtree/create.c:1.63 src/usr.sbin/mtree/create.c:1.64
--- src/usr.sbin/mtree/create.c:1.63	Thu Oct  4 21:13:50 2012
+++ src/usr.sbin/mtree/create.c	Thu Oct  4 21:19:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: create.c,v 1.63 2012/10/05 01:13:50 christos Exp $	*/
+/*	$NetBSD: create.c,v 1.64 2012/10/05 01:19:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)create.c	8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: create.c,v 1.63 2012/10/05 01:13:50 christos Exp $");
+__RCSID("$NetBSD: create.c,v 1.64 2012/10/05 01:19:54 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -213,11 +213,11 @@ statf(int indent, FTSENT *p)
 		    (long long)p->fts_statp->st_size);
 	if (keys & F_TIME)
 #if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H)
-		output(indent, &offset, "time=%ld.%ld",
+		output(indent, &offset, "time=%ld.%09ld",
 		    (long)p->fts_statp->st_mtimespec.tv_sec,
 		    p->fts_statp->st_mtimespec.tv_nsec);
 #else
-		output(indent, &offset, "time=%ld.%ld",
+		output(indent, &offset, "time=%ld.%09ld",
 		    (long)p->fts_statp->st_mtime, (long)0);
 #endif
 	if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) {

Index: src/usr.sbin/mtree/mtree.8
diff -u src/usr.sbin/mtree/mtree.8:1.58 src/usr.sbin/mtree/mtree.8:1.59
--- src/usr.sbin/mtree/mtree.8:1.58	Thu Oct  4 21:13:50 2012
+++ src/usr.sbin/mtree/mtree.8	Thu Oct  4 21:19:54 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mtree.8,v 1.58 2012/10/05 01:13:50 christos Exp $
+.\"	$NetBSD: mtree.8,v 1.59 2012/10/05 01:19:54 christos Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -489,7 +489,10 @@ and
 These may be specified without leading or trailing commas, but will be
 stored internally with them.
 .It Sy time
-The last modification time of the file.
+The last modification time of the file,
+in second and nanoseconds.
+The value should include a period character and exactly nine digits after
+the period.
 .It Sy type
 The type of the file; may be set to any one of the following:
 .Pp

Index: src/usr.sbin/mtree/spec.c
diff -u src/usr.sbin/mtree/spec.c:1.81 src/usr.sbin/mtree/spec.c:1.82
--- src/usr.sbin/mtree/spec.c:1.81	Thu Oct  4 20:59:35 2012
+++ src/usr.sbin/mtree/spec.c	Thu Oct  4 21:19:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: spec.c,v 1.81 2012/10/05 00:59:35 christos Exp $	*/
+/*	$NetBSD: spec.c,v 1.82 2012/10/05 01:19:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -67,7 +67,7 @@
 #if 0
 static char sccsid[] = "@(#)spec.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: spec.c,v 1.81 2012/10/05 00:59:35 christos Exp $");
+__RCSID("$NetBSD: spec.c,v 1.82 2012/10/05 01:19:54 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -358,7 +358,7 @@ dump_nodes(const char *dir, NODE *root, 
 		if (MATCHFLAG(F_SIZE))
 			appendfield(pathlast, "size=%lld", (long long)cur->st_size);
 		if (MATCHFLAG(F_TIME))
-			appendfield(pathlast, "time=%lld.%ld",
+			appendfield(pathlast, "time=%lld.%09ld",
 			    (long long)cur->st_mtimespec.tv_sec,
 			    cur->st_mtimespec.tv_nsec);
 		if (MATCHFLAG(F_CKSUM))

Reply via email to