Deleted Added
full compact
41c41
< "$FreeBSD: head/sbin/restore/main.c 128073 2004-04-09 19:58:40Z markm $";
---
> "$FreeBSD: head/sbin/restore/main.c 128175 2004-04-13 02:58:06Z green $";
64a65
> int pipecmd = 0;
96,97c97
< if ((inputdev = getenv("TAPE")) == NULL)
< inputdev = _PATH_DEFTAPE;
---
> inputdev = NULL;
99c99
< while ((ch = getopt(argc, argv, "b:df:himNRrs:tuvxy")) != -1)
---
> while ((ch = getopt(argc, argv, "b:df:himNP:Rrs:tuvxy")) != -1)
113a114,116
> if (pipecmd)
> errx(1,
> "-P and -f options are mutually exclusive");
115a119,125
> case 'P':
> if (!pipecmd && inputdev)
> errx(1,
> "-P and -f options are mutually exclusive");
> inputdev = optarg;
> pipecmd = 1;
> break;
168c178,180
< setinput(inputdev);
---
> if (inputdev == NULL && (inputdev = getenv("TAPE")) == NULL)
> inputdev = _PATH_DEFTAPE;
> setinput(inputdev, pipecmd);
280,285c292,302
< (void)fprintf(stderr, "usage:\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n",
< "restore -i [-cdhmNuvy] [-b blocksize] [-f file] [-s fileno]",
< "restore -r [-cdNuvy] [-b blocksize] [-f file] [-s fileno]",
< "restore -R [-cdNuvy] [-b blocksize] [-f file] [-s fileno]",
< "restore -x [-cdhmNuvy] [-b blocksize] [-f file] [-s fileno] [file ...]",
< "restore -t [-cdhNuvy] [-b blocksize] [-f file] [-s fileno] [file ...]");
---
> const char *const common =
> "[-b blocksize] [-P pipecmd | -f file] [-s fileno]";
> const char *const fileell = "[file ...]";
>
> (void)fprintf(stderr, "usage:\t%s %s\n\t%s %s\n\t%s %s\n"
> "\t%s %s %s\n\t%s %s %s\n",
> "restore -i [-cdhmNuvy]", common,
> "restore -r [-cdNuvy]", common,
> "restore -R [-cdNuvy]", common,
> "restore -x [-cdhmNuvy]", common, fileell,
> "restore -t [-cdhNuvy]", common, fileell);