PR bin/5346 from haszlaki@UAccess.NET:

After parsing the entries from /etc/dumpdates, remember ou entrie, in order
to print the date after /etc/dumpdates has been rewritten.
This commit is contained in:
bouyer 1998-04-22 08:55:18 +00:00
parent 930085f3c8
commit d90a3686d5
1 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: itime.c,v 1.7 1998/04/01 16:13:40 kleink Exp $ */ /* $NetBSD: itime.c,v 1.8 1998/04/22 08:55:18 bouyer Exp $ */
/*- /*-
* Copyright (c) 1980, 1993 * Copyright (c) 1980, 1993
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)itime.c 8.1 (Berkeley) 6/5/93"; static char sccsid[] = "@(#)itime.c 8.1 (Berkeley) 6/5/93";
#else #else
__RCSID("$NetBSD: itime.c,v 1.7 1998/04/01 16:13:40 kleink Exp $"); __RCSID("$NetBSD: itime.c,v 1.8 1998/04/22 08:55:18 bouyer Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -174,7 +174,7 @@ void
putdumptime() putdumptime()
{ {
FILE *df; FILE *df;
struct dumpdates *dtwalk; struct dumpdates *dtwalk, *dtfound;
int i; int i;
int fd; int fd;
char *fname; char *fname;
@ -214,6 +214,7 @@ putdumptime()
(void) strncpy(dtwalk->dd_name, fname, sizeof (dtwalk->dd_name)); (void) strncpy(dtwalk->dd_name, fname, sizeof (dtwalk->dd_name));
dtwalk->dd_level = level; dtwalk->dd_level = level;
dtwalk->dd_ddate = iswap32(spcl.c_date); dtwalk->dd_ddate = iswap32(spcl.c_date);
dtfound = dtwalk;
ITITERATE(i, dtwalk) { ITITERATE(i, dtwalk) {
dumprecout(df, dtwalk); dumprecout(df, dtwalk);
@ -224,7 +225,7 @@ putdumptime()
quit("ftruncate (%s): %s\n", dumpdates, strerror(errno)); quit("ftruncate (%s): %s\n", dumpdates, strerror(errno));
(void) fclose(df); (void) fclose(df);
msg("level %c dump on %s", level, msg("level %c dump on %s", level,
spcl.c_date == 0 ? "the epoch\n" : ctime(&dtwalk->dd_ddate)); spcl.c_date == 0 ? "the epoch\n" : ctime(&dtfound->dd_ddate));
} }
static void static void