SCCS-vsn: sbin/restore/main.c 5.10
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 5.10 (Berkeley) %G%";
time_t dumpdate;
FILE *terminal;
time_t dumpdate;
FILE *terminal;
main(argc, argv)
int argc;
char *argv[];
main(argc, argv)
int argc;
char *argv[];
if (signal(SIGTERM, onintr) == SIG_IGN)
(void) signal(SIGTERM, SIG_IGN);
setlinebuf(stderr);
if (signal(SIGTERM, onintr) == SIG_IGN)
(void) signal(SIGTERM, SIG_IGN);
setlinebuf(stderr);
- if (argc < 2) {
-usage:
- fprintf(stderr, "Usage:\n%s%s%s%s%s",
- "\trestore tfhsvy [file file ...]\n",
- "\trestore xfhmsvy [file file ...]\n",
- "\trestore ifhmsvy\n",
- "\trestore rfsvy\n",
- "\trestore Rfsvy\n");
- done(1);
- }
+ if (argc < 2)
+ usage();
argv++;
argc -= 2;
command = '\0';
argv++;
argc -= 2;
command = '\0';
fprintf(stderr,
"%c and %c are mutually exclusive\n",
*cp, command);
fprintf(stderr,
"%c and %c are mutually exclusive\n",
*cp, command);
}
command = *cp;
break;
default:
fprintf(stderr, "Bad key character %c\n", *cp);
}
command = *cp;
break;
default:
fprintf(stderr, "Bad key character %c\n", *cp);
}
}
if (command == '\0') {
fprintf(stderr, "must specify i, t, r, R, or x\n");
}
}
if (command == '\0') {
fprintf(stderr, "must specify i, t, r, R, or x\n");
}
setinput(inputdev);
if (argc == 0) {
}
setinput(inputdev);
if (argc == 0) {
+
+usage()
+{
+ (void)fprintf(stderr, "usage:\n%s%s%s%s%s",
+ "\trestore tfhsvy [file file ...]\n",
+ "\trestore xfhmsvy [file file ...]\n",
+ "\trestore ifhmsvy\n",
+ "\trestore rfsvy\n",
+ "\trestore Rfsvy\n");
+ done(1);
+}