put in key words
[unix-history] / usr / src / sbin / restore / main.c
index 60b33a9..fe9d358 100644 (file)
@@ -1,18 +1,19 @@
 /*
 /*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * Copyright (c) 1983 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
  */
 
 #ifndef lint
 char copyright[] =
  */
 
 #ifndef lint
 char copyright[] =
-"@(#) Copyright (c) 1983 Regents of the University of California.\n\
+"@(#) Copyright (c) 1983 The Regents of the University of California.\n\
  All rights reserved.\n";
  All rights reserved.\n";
-#endif not lint
+#endif /* not lint */
 
 #ifndef lint
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     5.2 (Berkeley) %G%";
-#endif not lint
+static char sccsid[] = "@(#)main.c     5.8 (Berkeley) %G%";
+#endif /* not lint */
 
 /*
  *     Modified to recursively extract all files within a subtree
 
 /*
  *     Modified to recursively extract all files within a subtree
@@ -34,10 +35,11 @@ static char sccsid[] = "@(#)main.c  5.2 (Berkeley) %G%";
 
 #include "restore.h"
 #include <protocols/dumprestore.h>
 
 #include "restore.h"
 #include <protocols/dumprestore.h>
-#include <signal.h>
+#include <sys/signal.h>
+#include "pathnames.h"
 
 int    bflag = 0, cvtflag = 0, dflag = 0, vflag = 0, yflag = 0;
 
 int    bflag = 0, cvtflag = 0, dflag = 0, vflag = 0, yflag = 0;
-int    hflag = 1, mflag = 1;
+int    hflag = 1, mflag = 1, Nflag = 0;
 char   command = '\0';
 long   dumpnum = 1;
 long   volno = 0;
 char   command = '\0';
 long   dumpnum = 1;
 long   volno = 0;
@@ -55,11 +57,10 @@ main(argc, argv)
 {
        register char *cp;
        ino_t ino;
 {
        register char *cp;
        ino_t ino;
-       char *inputdev = "/dev/rmt8";
+       char *inputdev = _PATH_DEFTAPE;
        char *symtbl = "./restoresymtable";
        char name[MAXPATHLEN];
        char *symtbl = "./restoresymtable";
        char name[MAXPATHLEN];
-       int (*signal())();
-       extern int onintr();
+       void onintr();
 
        if (signal(SIGINT, onintr) == SIG_IGN)
                (void) signal(SIGINT, SIG_IGN);
 
        if (signal(SIGINT, onintr) == SIG_IGN)
                (void) signal(SIGINT, SIG_IGN);
@@ -95,6 +96,9 @@ usage:
                case 'm':
                        mflag = 0;
                        break;
                case 'm':
                        mflag = 0;
                        break;
+               case 'N':
+                       Nflag++;
+                       break;
                case 'v':
                        vflag++;
                        break;
                case 'v':
                        vflag++;
                        break;
@@ -233,6 +237,7 @@ usage:
        case 't':
                setup();
                extractdirs(0);
        case 't':
                setup();
                extractdirs(0);
+               initsymtable((char *)0);
                while (argc--) {
                        canon(*argv++, name);
                        ino = dirlookup(name);
                while (argc--) {
                        canon(*argv++, name);
                        ino = dirlookup(name);