summaryrefslogtreecommitdiff
path: root/sbin/restore
diff options
context:
space:
mode:
authormortimer <mortimer@cvs.openbsd.org>2021-01-21 00:16:37 +0000
committermortimer <mortimer@cvs.openbsd.org>2021-01-21 00:16:37 +0000
commit2b41d0da2010055cf10f6aac534a187af27b49d6 (patch)
tree023c709f3454a8e7d71794c604e45e39ff45d2ab /sbin/restore
parentb9406b0abd78f1f03fbe5a07d6c9d515ce58f8a1 (diff)
Rearrange variables in dump / restore to handle -fno-common.
Largely following the commit by mckusick in FreeBSD. ok naddy@
Diffstat (limited to 'sbin/restore')
-rw-r--r--sbin/restore/restore.h4
-rw-r--r--sbin/restore/tape.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/sbin/restore/restore.h b/sbin/restore/restore.h
index 714830e9a3c..2420d9e18ae 100644
--- a/sbin/restore/restore.h
+++ b/sbin/restore/restore.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: restore.h,v 1.9 2017/01/21 08:31:44 krw Exp $ */
+/* $OpenBSD: restore.h,v 1.10 2021/01/21 00:16:36 mortimer Exp $ */
/* $NetBSD: restore.h,v 1.8 1997/07/01 05:37:54 lukem Exp $ */
/*
@@ -104,7 +104,7 @@ struct entry {
/*
* The entry describes the next file available on the tape
*/
-struct context {
+extern struct context {
short action; /* action being taken on this file */
mode_t mode; /* mode of file */
ino_t ino; /* inumber of file */
diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c
index 324ec6378d8..0e2c693cd2a 100644
--- a/sbin/restore/tape.c
+++ b/sbin/restore/tape.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tape.c,v 1.51 2019/06/28 13:32:46 deraadt Exp $ */
+/* $OpenBSD: tape.c,v 1.52 2021/01/21 00:16:36 mortimer Exp $ */
/* $NetBSD: tape.c,v 1.26 1997/04/15 07:12:25 lukem Exp $ */
/*
@@ -78,6 +78,8 @@ static char *map;
static char lnkbuf[PATH_MAX + 1];
static size_t pathlen;
+struct context curfile; /* describes next file available on the tape */
+union u_spcl u_spcl; /* mapping of variables in a control block */
int oldinofmt; /* old inode format conversion required */
int Bcvt; /* Swap Bytes (for CCI or sun) */