| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: tape.c,v 1.69 2020/09/03 19:31:34 bouyer Exp $ */ | | 1 | /* $NetBSD: tape.c,v 1.70 2021/03/11 01:13:11 msaitoh Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1983, 1993 | | 4 | * Copyright (c) 1983, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * (c) UNIX System Laboratories, Inc. | | 6 | * (c) UNIX System Laboratories, Inc. |
7 | * All or some portions of this file are derived from material licensed | | 7 | * All or some portions of this file are derived from material licensed |
8 | * to the University of California by American Telephone and Telegraph | | 8 | * to the University of California by American Telephone and Telegraph |
9 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | | 9 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with |
10 | * the permission of UNIX System Laboratories, Inc. | | 10 | * the permission of UNIX System Laboratories, Inc. |
11 | * | | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | | 12 | * Redistribution and use in source and binary forms, with or without |
13 | * modification, are permitted provided that the following conditions | | 13 | * modification, are permitted provided that the following conditions |
14 | * are met: | | 14 | * are met: |
| @@ -29,27 +29,27 @@ | | | @@ -29,27 +29,27 @@ |
29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 | * SUCH DAMAGE. | | 34 | * SUCH DAMAGE. |
35 | */ | | 35 | */ |
36 | | | 36 | |
37 | #include <sys/cdefs.h> | | 37 | #include <sys/cdefs.h> |
38 | #ifndef lint | | 38 | #ifndef lint |
39 | #if 0 | | 39 | #if 0 |
40 | static char sccsid[] = "@(#)tape.c 8.9 (Berkeley) 5/1/95"; | | 40 | static char sccsid[] = "@(#)tape.c 8.9 (Berkeley) 5/1/95"; |
41 | #else | | 41 | #else |
42 | __RCSID("$NetBSD: tape.c,v 1.69 2020/09/03 19:31:34 bouyer Exp $"); | | 42 | __RCSID("$NetBSD: tape.c,v 1.70 2021/03/11 01:13:11 msaitoh Exp $"); |
43 | #endif | | 43 | #endif |
44 | #endif /* not lint */ | | 44 | #endif /* not lint */ |
45 | | | 45 | |
46 | #include <sys/param.h> | | 46 | #include <sys/param.h> |
47 | #include <sys/file.h> | | 47 | #include <sys/file.h> |
48 | #include <sys/ioctl.h> | | 48 | #include <sys/ioctl.h> |
49 | #include <sys/mtio.h> | | 49 | #include <sys/mtio.h> |
50 | #include <sys/stat.h> | | 50 | #include <sys/stat.h> |
51 | | | 51 | |
52 | #include <ufs/ufs/dinode.h> | | 52 | #include <ufs/ufs/dinode.h> |
53 | #include <protocols/dumprestore.h> | | 53 | #include <protocols/dumprestore.h> |
54 | | | 54 | |
55 | #include <err.h> | | 55 | #include <err.h> |
| @@ -1429,27 +1429,27 @@ skip: | | | @@ -1429,27 +1429,27 @@ skip: |
1429 | curfile.name = "<file removal list>"; | | 1429 | curfile.name = "<file removal list>"; |
1430 | break; | | 1430 | break; |
1431 | | | 1431 | |
1432 | case TS_BITS: | | 1432 | case TS_BITS: |
1433 | curfile.name = "<file dump list>"; | | 1433 | curfile.name = "<file dump list>"; |
1434 | break; | | 1434 | break; |
1435 | | | 1435 | |
1436 | case TS_TAPE: | | 1436 | case TS_TAPE: |
1437 | panic("unexpected tape header\n"); | | 1437 | panic("unexpected tape header\n"); |
1438 | break; | | 1438 | break; |
1439 | | | 1439 | |
1440 | default: | | 1440 | default: |
1441 | panic("unknown tape header type %d\n", spcl.c_type); | | 1441 | panic("unknown tape header type %d\n", spcl.c_type); |
1442 | fprintf(stderr, "skiping to next header\n"); | | 1442 | fprintf(stderr, "skipping to next header\n"); |
1443 | goto skip; | | 1443 | goto skip; |
1444 | | | 1444 | |
1445 | } | | 1445 | } |
1446 | } while (header->c_type == TS_ADDR); | | 1446 | } while (header->c_type == TS_ADDR); |
1447 | if (skipcnt > 0) | | 1447 | if (skipcnt > 0) |
1448 | fprintf(stderr, "resync restore, skipped %ld blocks\n", | | 1448 | fprintf(stderr, "resync restore, skipped %ld blocks\n", |
1449 | (long)skipcnt); | | 1449 | (long)skipcnt); |
1450 | skipcnt = 0; | | 1450 | skipcnt = 0; |
1451 | } | | 1451 | } |
1452 | | | 1452 | |
1453 | static int | | 1453 | static int |
1454 | checksum(int *buf) | | 1454 | checksum(int *buf) |
1455 | { | | 1455 | { |