Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/restore Don't forget to update curfile, if tape begins ...
details: https://anonhg.NetBSD.org/src/rev/cb1b531b4ac8
branches: trunk
changeset: 522462:cb1b531b4ac8
user: perseant <perseant%NetBSD.org@localhost>
date: Tue Feb 19 19:16:38 2002 +0000
description:
Don't forget to update curfile, if tape begins with TS_ADDR type block.
In particular, this means that if one member (say the last member) of a tape
set begins with continuation blocks, restore will not consider that tape
to contain all the inodes (curfile.ino==0 at the beginning of the tape).
Close PR #15545.
diffstat:
sbin/restore/tape.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 27004b2e999a -r cb1b531b4ac8 sbin/restore/tape.c
--- a/sbin/restore/tape.c Tue Feb 19 17:41:15 2002 +0000
+++ b/sbin/restore/tape.c Tue Feb 19 19:16:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tape.c,v 1.44 2001/12/23 14:40:42 lukem Exp $ */
+/* $NetBSD: tape.c,v 1.45 2002/02/19 19:16:38 perseant Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)tape.c 8.9 (Berkeley) 5/1/95";
#else
-__RCSID("$NetBSD: tape.c,v 1.44 2001/12/23 14:40:42 lukem Exp $");
+__RCSID("$NetBSD: tape.c,v 1.45 2002/02/19 19:16:38 perseant Exp $");
#endif
#endif /* not lint */
@@ -1258,6 +1258,7 @@
curfile.action = UNKNOWN;
curfile.dip = NULL;
curfile.ino = 0;
+ top:
do {
if (header->c_magic != NFS_MAGIC) {
skipcnt++;
@@ -1277,7 +1278,8 @@
while (gethead(header) == FAIL ||
header->c_date != dumpdate)
skipcnt++;
- break;
+ /* We've read a header; don't drop it. */
+ goto top;
case TS_INODE:
curfile.dip = &header->c_dinode;
Home |
Main Index |
Thread Index |
Old Index