Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/cron/dist make the utime and utimes cases work ...



details:   https://anonhg.NetBSD.org/src/rev/15e8f26850c1
branches:  trunk
changeset: 782467:15e8f26850c1
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Nov 03 17:33:01 2012 +0000

description:
make the utime and utimes cases work too.

diffstat:

 external/bsd/cron/dist/crontab.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (52 lines):

diff -r 11717a57f1df -r 15e8f26850c1 external/bsd/cron/dist/crontab.c
--- a/external/bsd/cron/dist/crontab.c  Sat Nov 03 17:07:49 2012 +0000
+++ b/external/bsd/cron/dist/crontab.c  Sat Nov 03 17:33:01 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: crontab.c,v 1.6 2012/11/03 15:39:23 christos Exp $     */
+/*     $NetBSD: crontab.c,v 1.7 2012/11/03 17:33:01 christos Exp $     */
 
 /* Copyright 1988,1990,1993,1994 by Paul Vixie
  * All rights reserved
@@ -25,7 +25,7 @@
 #if 0
 static char rcsid[] = "Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp";
 #else
-__RCSID("$NetBSD: crontab.c,v 1.6 2012/11/03 15:39:23 christos Exp $");
+__RCSID("$NetBSD: crontab.c,v 1.7 2012/11/03 17:33:01 christos Exp $");
 #endif
 #endif
 
@@ -155,11 +155,11 @@
        struct timeval tv[2];
        TIMESPEC_TO_TIMEVAL(&tv[0], &ts[0]);
        TIMESPEC_TO_TIMEVAL(&tv[1], &ts[1]);
-       return utimes(name, tvs);
+       return utimes(name, tv);
 #else
-       struct utimebuf ut;
-       ut.actime = tv[0].tv_sec;
-       ut.modtime = tv[1].tv_sec;
+       struct utimbuf ut;
+       ut.actime = ts[0].tv_sec;
+       ut.modtime = ts[1].tv_sec;
        return utime(name, &ut);
 #endif
 }
@@ -174,7 +174,7 @@
 #if defined(HAVE_UTIMENSAT)
            && ts1[1].tv_nsec == ts2[1].tv_nsec
 #elif defined(HAVE_UTIMES)
-           && ts1[1].tv_nsec / 1000 = ts2[1].tv_nsec / 1000
+           && ts1[1].tv_nsec / 1000 == ts2[1].tv_nsec / 1000
 #endif
        ;
 }
@@ -638,7 +638,7 @@
         */
        (void)fprintf(tmp, "# DO NOT EDIT THIS FILE - edit the master and reinstall.\n");
        (void)fprintf(tmp, "# (%s installed on %-24.24s)\n", Filename, ctime(&now));
-       (void)fprintf(tmp, "# (Cron version %s -- %s)\n", CRON_VERSION, "$NetBSD: crontab.c,v 1.6 2012/11/03 15:39:23 christos Exp $");
+       (void)fprintf(tmp, "# (Cron version %s -- %s)\n", CRON_VERSION, "$NetBSD: crontab.c,v 1.7 2012/11/03 17:33:01 christos Exp $");
 
        /* copy the crontab to the tmp
         */



Home | Main Index | Thread Index | Old Index