Subject: undocumented options of restore(8)
To: None <tech-userlevel@NetBSD.ORG>
From: enami tsugutomo <enami@but-b.or.jp>
List: tech-userlevel
Date: 01/04/1998 12:01:41
Hi all.

I found some option of restore(8) is undocumented.  I feel that at
least -N option is useful, so I wrote minimum documents for them.

Any comments or more precise documents are welcome :-).

enami.

Index: interactive.c
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sbin/restore/interactive.c,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 interactive.c
--- interactive.c	1997/09/17 15:40:14	1.1.1.5
+++ interactive.c	1998/01/04 02:46:32
@@ -191,7 +191,7 @@
 		if (strncmp(cmd, "help", strlen(cmd)) != 0)
 			goto bad;
 	case '?':
-		fprintf(stderr, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+		fprintf(stderr, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
 			"Available commands are:\n",
 			"\tls [arg] - list directory\n",
 			"\tcd arg - change directory\n",
@@ -202,11 +202,12 @@
 			" list of files to be extracted\n",
 			"\textract - extract requested files\n",
 			"\tsetmodes - set modes of requested directories\n",
-			"\tquit - immediately exit program\n",
+			"\tquit or xit - immediately exit program\n",
 			"\twhat - list dump header information\n",
 			"\tverbose - toggle verbose flag",
 			" (useful with ``ls'')\n",
 			"\thelp or `?' - print this list\n",
+			"\tDebug - turn on debugging\n",
 			"If no `arg' is supplied, the current",
 			" directory is used\n");
 		break;
Index: main.c
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sbin/restore/main.c,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 main.c
--- main.c	1997/09/17 15:40:14	1.1.1.7
+++ main.c	1998/01/04 02:48:53
@@ -290,19 +290,19 @@
 {
 
 	(void)fprintf(stderr,
-	    "usage: %s -i [-chmvy] [-b blocksize] [-f file] [-s fileno]\n",
+	    "usage: %s -i [-cdhmvyN] [-b blocksize] [-f file] [-s fileno]\n",
 	    __progname);
 	(void)fprintf(stderr,
-	    "\t%s -R [-cvy] [-b blocksize] [-f file] [-s fileno]\n",
+	    "\t%s -R [-cdvyN] [-b blocksize] [-f file] [-s fileno]\n",
 	    __progname);
 	(void)fprintf(stderr,
-	    "\t%s -r [-cvy] [-b blocksize] [-f file] [-s fileno]\n",
+	    "\t%s -r [-cdvyN] [-b blocksize] [-f file] [-s fileno]\n",
 	    __progname);
 	(void)fprintf(stderr,
-	    "\t%s -t [-chvy] [-b blocksize] [-f file] [-s fileno] [file ...]\n",
+	    "\t%s -t [-cdhvy] [-b blocksize] [-f file] [-s fileno] [file ...]\n",
 	    __progname);
 	(void)fprintf(stderr,
-	    "\t%s -x [-chmvy] [-b blocksize] [-f file] [-s fileno] [file ...]\n",
+	    "\t%s -x [-cdhmvyN] [-b blocksize] [-f file] [-s fileno] [file ...]\n",
 	    __progname);
 	exit(1);
 }
Index: restore.8
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sbin/restore/restore.8,v
retrieving revision 1.1.1.10
diff -u -r1.1.1.10 restore.8
--- restore.8	1997/11/12 23:43:32	1.1.1.10
+++ restore.8	1998/01/04 02:43:27
@@ -43,32 +43,32 @@
 .Sh SYNOPSIS
 .Nm
 .Fl i
-.Op Fl chmvy
+.Op Fl cdhmvyN
 .Op Fl b Ar blocksize
 .Op Fl f Ar file
 .Op Fl s Ar fileno
 .Nm ""
 .Fl R
-.Op Fl cvy
+.Op Fl cdvyN
 .Op Fl b Ar blocksize
 .Op Fl f Ar file
 .Op Fl s Ar fileno
 .Nm ""
 .Fl r
-.Op Fl cvy
+.Op Fl cdvyN
 .Op Fl b Ar blocksize
 .Op Fl f Ar file
 .Op Fl s Ar fileno
 .Nm ""
 .Fl t
-.Op Fl chvy
+.Op Fl cdhvy
 .Op Fl b Ar blocksize
 .Op Fl f Ar file
 .Op Fl s Ar fileno
 .Op file ...
 .Nm ""
 .Fl x
-.Op Fl chmvy
+.Op Fl cdhmvyN
 .Op Fl b Ar blocksize
 .Op Fl f Ar file
 .Op Fl s Ar fileno
@@ -145,7 +145,7 @@
 will ask which volume the user wishes to mount.
 The fastest way to extract a few files is to
 start with the last volume, and work towards the first volume.
-.It Ic help
+.It Ic help, ?
 List a summary of the available commands.
 .It Ic \&ls Op Ar arg
 List the current or specified directory.
@@ -155,7 +155,7 @@
 flag is set the inode number of each entry is also listed.
 .It Ic pwd
 Print the full pathname of the current working directory.
-.It Ic quit
+.It Ic quit, xit
 Restore immediately exits,
 even if the extraction list is not empty.
 .It Ic setmodes
@@ -173,6 +173,10 @@
 It also causes
 .Nm
 to print out information about each file as it is extracted.
+.It Ic what
+List dump header information.
+.It Ic Debug
+Turn on debugging.
 .El
 .It Fl R
 .Nm
@@ -275,6 +279,8 @@
 .Fl c
 flag disables this check, and only allows reading a dump in the old
 format.
+.It Fl d
+Turn on debugging.
 .It Fl f Ar file
 Read the backup from
 .Ar file ;
@@ -337,6 +343,8 @@
 .It Fl y
 Do not ask the user whether to abort the restore in the event of an error.
 Always try to skip over the bad block(s) and continue.
+.It Fl N
+Doesn't perform actual writing to disk.
 .El
 .Sh DIAGNOSTICS
 Complaints if it gets a read error.