|
Lines 52-57
Link Here
|
| 52 |
#include <protocols/dumprestore.h> |
52 |
#include <protocols/dumprestore.h> |
| 53 |
|
53 |
|
| 54 |
#include <err.h> |
54 |
#include <err.h> |
|
|
55 |
#include <errno.h> |
| 55 |
#include <stdio.h> |
56 |
#include <stdio.h> |
| 56 |
#include <stdlib.h> |
57 |
#include <stdlib.h> |
| 57 |
#include <unistd.h> |
58 |
#include <unistd.h> |
|
Lines 99-107
Link Here
|
| 99 |
inputdev = _PATH_DEFTAPE; |
100 |
inputdev = _PATH_DEFTAPE; |
| 100 |
obsolete(&argc, &argv); |
101 |
obsolete(&argc, &argv); |
| 101 |
#ifdef KERBEROS |
102 |
#ifdef KERBEROS |
| 102 |
#define optlist "b:cdf:hikmNRrs:tuvxy" |
103 |
#define optlist "b:cD:df:hikmNRrs:tuvxy" |
| 103 |
#else |
104 |
#else |
| 104 |
#define optlist "b:cdf:himNRrs:tuvxy" |
105 |
#define optlist "b:cD:df:himNRrs:tuvxy" |
| 105 |
#endif |
106 |
#endif |
| 106 |
while ((ch = getopt(argc, argv, optlist)) != -1) |
107 |
while ((ch = getopt(argc, argv, optlist)) != -1) |
| 107 |
switch(ch) { |
108 |
switch(ch) { |
|
Lines 117-122
Link Here
|
| 117 |
case 'c': |
118 |
case 'c': |
| 118 |
cvtflag = 1; |
119 |
cvtflag = 1; |
| 119 |
break; |
120 |
break; |
|
|
121 |
case 'D': |
| 122 |
if (chdir(optarg) < 0) |
| 123 |
errx(1, |
| 124 |
"error accessing file system %s; %s", |
| 125 |
optarg, strerror(errno)); |
| 126 |
break; |
| 120 |
case 'd': |
127 |
case 'd': |
| 121 |
dflag = 1; |
128 |
dflag = 1; |
| 122 |
break; |
129 |
break; |
|
Lines 293-303
Link Here
|
| 293 |
usage() |
300 |
usage() |
| 294 |
{ |
301 |
{ |
| 295 |
(void)fprintf(stderr, "usage:\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n", |
302 |
(void)fprintf(stderr, "usage:\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n", |
| 296 |
"restore -i [-chkmuvy] [-b blocksize] [-f file] [-s fileno]", |
303 |
"restore -i [-chkmuvy] [-b blocksize] [-D path] [-f file] [-s fileno]", |
| 297 |
"restore -r [-ckuvy] [-b blocksize] [-f file] [-s fileno]", |
304 |
"restore -r [-ckuvy] [-b blocksize] [-D path] [-f file] [-s fileno]", |
| 298 |
"restore -R [-ckuvy] [-b blocksize] [-f file] [-s fileno]", |
305 |
"restore -R [-ckuvy] [-b blocksize] [-D path] [-f file] [-s fileno]", |
| 299 |
"restore -x [-chkmuvy] [-b blocksize] [-f file] [-s fileno] [file ...]", |
306 |
"restore -x [-chkmuvy] [-b blocksize] [-D path] [-f file] [-s fileno] [file ...]", |
| 300 |
"restore -t [-chkuvy] [-b blocksize] [-f file] [-s fileno] [file ...]"); |
307 |
"restore -t [-chkuvy] [-b blocksize] [-D path] [-f file] [-s fileno] [file ...]"); |
| 301 |
done(1); |
308 |
done(1); |
| 302 |
} |
309 |
} |
| 303 |
|
310 |
|