From owner-cvs-all Sun May 2 7:18:41 1999 Delivered-To: cvs-all@freebsd.org Received: from herring.nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (Postfix) with ESMTP id 5A60E1536F; Sun, 2 May 1999 07:18:36 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id PAA16380; Sun, 2 May 1999 15:18:41 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Sun, 2 May 1999 15:18:40 +0100 (BST) From: Doug Rabson To: Greg Lehey Cc: cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sbin/vinum v.c In-Reply-To: <199905020800.BAA60660@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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