Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/mtree clarify seconds.09nanoseconds format (brooks)



details:   https://anonhg.NetBSD.org/src/rev/50686cef0ff0
branches:  trunk
changeset: 781877:50686cef0ff0
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 05 01:19:54 2012 +0000

description:
clarify seconds.09nanoseconds format (brooks)

diffstat:

 usr.sbin/mtree/create.c |  8 ++++----
 usr.sbin/mtree/mtree.8  |  7 +++++--
 usr.sbin/mtree/spec.c   |  6 +++---
 3 files changed, 12 insertions(+), 9 deletions(-)

diffs (80 lines):

diff -r 57f12d13fc3c -r 50686cef0ff0 usr.sbin/mtree/create.c
--- a/usr.sbin/mtree/create.c   Fri Oct 05 01:19:03 2012 +0000
+++ b/usr.sbin/mtree/create.c   Fri Oct 05 01:19:54 2012 +0000
@@ -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 @@
                    (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)) {
diff -r 57f12d13fc3c -r 50686cef0ff0 usr.sbin/mtree/mtree.8
--- a/usr.sbin/mtree/mtree.8    Fri Oct 05 01:19:03 2012 +0000
+++ b/usr.sbin/mtree/mtree.8    Fri Oct 05 01:19:54 2012 +0000
@@ -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 @@
 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
diff -r 57f12d13fc3c -r 50686cef0ff0 usr.sbin/mtree/spec.c
--- a/usr.sbin/mtree/spec.c     Fri Oct 05 01:19:03 2012 +0000
+++ b/usr.sbin/mtree/spec.c     Fri Oct 05 01:19:54 2012 +0000
@@ -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 @@
                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))



Home | Main Index | Thread Index | Old Index