Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/vipw when checking timestamp, check tv_nsec as well.



details:   https://anonhg.NetBSD.org/src/rev/d1b36537c3ad
branches:  trunk
changeset: 580534:d1b36537c3ad
user:      yamt <yamt%NetBSD.org@localhost>
date:      Thu Apr 28 08:44:49 2005 +0000

description:
when checking timestamp, check tv_nsec as well.

diffstat:

 usr.sbin/vipw/vipw.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r acfdefefcf90 -r d1b36537c3ad usr.sbin/vipw/vipw.c
--- a/usr.sbin/vipw/vipw.c      Thu Apr 28 07:54:39 2005 +0000
+++ b/usr.sbin/vipw/vipw.c      Thu Apr 28 08:44:49 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vipw.c,v 1.11 2004/01/05 23:23:39 jmmv Exp $   */
+/*     $NetBSD: vipw.c,v 1.12 2005/04/28 08:44:49 yamt Exp $   */
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)vipw.c     8.3 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: vipw.c,v 1.11 2004/01/05 23:23:39 jmmv Exp $");
+__RCSID("$NetBSD: vipw.c,v 1.12 2005/04/28 08:44:49 yamt Exp $");
 #endif
 #endif /* not lint */
 
@@ -115,7 +115,8 @@
                pw_edit(0, NULL);
                if (stat(mpwdl, &end))
                        pw_error(mpwdl, 1, 1);
-               if (begin.st_mtime == end.st_mtime) {
+               if (begin.st_mtime == end.st_mtime &&
+                   begin.st_mtimensec == end.st_mtimensec) {
                        warnx("no changes made");
                        pw_error((char *)NULL, 0, 0);
                }



Home | Main Index | Thread Index | Old Index