Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/dump PR/42952: The Grey Wolf: Fix for "true incremental...
details: https://anonhg.NetBSD.org/src/rev/11386120159a
branches: trunk
changeset: 752909:11386120159a
user: christos <christos%NetBSD.org@localhost>
date: Thu Mar 11 01:32:59 2010 +0000
description:
PR/42952: The Grey Wolf: Fix for "true incremental". Don't overload level
9, use a new level "i" which is logically 10.
diffstat:
sbin/dump/itime.c | 15 ++++++++++-----
sbin/dump/main.c | 11 ++++++-----
2 files changed, 16 insertions(+), 10 deletions(-)
diffs (79 lines):
diff -r bc278f488ef8 -r 11386120159a sbin/dump/itime.c
--- a/sbin/dump/itime.c Wed Mar 10 23:41:56 2010 +0000
+++ b/sbin/dump/itime.c Thu Mar 11 01:32:59 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: itime.c,v 1.17 2010/02/26 02:11:40 christos Exp $ */
+/* $NetBSD: itime.c,v 1.18 2010/03/11 01:32:59 christos Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)itime.c 8.1 (Berkeley) 6/5/93";
#else
-__RCSID("$NetBSD: itime.c,v 1.17 2010/02/26 02:11:40 christos Exp $");
+__RCSID("$NetBSD: itime.c,v 1.18 2010/03/11 01:32:59 christos Exp $");
#endif
#endif /* not lint */
@@ -146,13 +146,18 @@
/*
* Go find the entry with the same name for a lower increment
* and older date. If we are doing a true incremental, then
- * we can use level 9 as a ref point
+ * we can use any level as a ref point.
*/
ITITERATE(i, ddp) {
if (strncmp(fname, ddp->dd_name, sizeof (ddp->dd_name)) != 0)
continue;
- if ((!trueinc && (ddp->dd_level >= level)) ||
- (trueinc && (ddp->dd_level > level)))
+ /* trueinc: ostensibly could omit the second clause
+ * since if trueinc is set, we don't care about the level
+ * at all.
+ */
+ /* if ((!trueinc && (ddp->dd_level >= level)) ||
+ (trueinc && (ddp->dd_level > level))) */
+ if (!trueinc && (ddp->dd_level >= level))
continue;
if (ddp->dd_ddate <= iswap32(spcl.c_ddate))
continue;
diff -r bc278f488ef8 -r 11386120159a sbin/dump/main.c
--- a/sbin/dump/main.c Wed Mar 10 23:41:56 2010 +0000
+++ b/sbin/dump/main.c Thu Mar 11 01:32:59 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.65 2010/02/26 02:11:40 christos Exp $ */
+/* $NetBSD: main.c,v 1.66 2010/03/11 01:32:59 christos Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95";
#else
-__RCSID("$NetBSD: main.c,v 1.65 2010/02/26 02:11:40 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.66 2010/03/11 01:32:59 christos Exp $");
#endif
#endif /* not lint */
@@ -181,8 +181,8 @@
honorlevel = numarg("honor level", 0L, 10L);
break;
- case 'i': /* "true incremental" regardless level 9 */
- level = '9';
+ case 'i': /* "true incremental" regardless level */
+ level = 'i';
trueinc = 1;
break;
@@ -470,7 +470,8 @@
needswap = fs_read_sblock(sblock_buf);
- spcl.c_level = iswap32(level - '0');
+ /* true incremental is always a level 10 dump */
+ spcl.c_level = trueinc? iswap32(10): iswap32(level - '0');
spcl.c_type = iswap32(TS_TAPE);
spcl.c_date = iswap32(spcl.c_date);
spcl.c_ddate = iswap32(spcl.c_ddate);
Home |
Main Index |
Thread Index |
Old Index