Date: Sun, 2 May 1999 15:18:40 +0100 (BST) From: Doug Rabson <dfr@nlsystems.com> To: Greg Lehey <grog@freebsd.org> Cc: cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sbin/vinum v.c Message-ID: <Pine.BSF.4.05.9905021516320.555-100000@herring.nlsystems.com> In-Reply-To: <199905020800.BAA60660@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2 May 1999, Greg Lehey wrote: > grog 1999/05/02 01:00:32 PDT > > Modified files: > sbin/vinum v.c > Log: > Maintain a log file, by default /var/log/vinum.history, showing what > has been done. This name can be overridden by the value of the > VINUM_HISTORY environment variable. > > Print dates in log file according to the variable VINUM_DATEFORMAT, by > default %e %b %Y %H:%M:%S. This doesn't build on the alpha. This patch should fix it: Index: v.c =================================================================== RCS file: /home/ncvs/src/sbin/vinum/v.c,v retrieving revision 1.13 diff -u -r1.13 v.c --- v.c 1999/05/02 08:00:30 1.13 +++ v.c 1999/05/02 14:16:03 @@ -752,13 +752,15 @@ struct timeval now; struct tm *date; char datetext[MAXDATETEXT]; + time_t sec; if (history != NULL) { if (gettimeofday(&now, NULL) != 0) { fprintf(stderr, "Can't get time: %s\n", strerror(errno)); return; } - date = localtime(&(time_t) now.tv_sec); + sec = now.tv_sec; + date = localtime(&sec); strftime(datetext, MAXDATETEXT, dateformat, date), fprintf(history, "%s.%06ld ", -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9905021516320.555-100000>