diff options
| author | Tim Kientzle <kientzle@FreeBSD.org> | 2010-10-09 05:31:08 +0000 |
|---|---|---|
| committer | Tim Kientzle <kientzle@FreeBSD.org> | 2010-10-09 05:31:08 +0000 |
| commit | 0e479ac8f7a2d846f5e73fb07d7504fedb89d653 (patch) | |
| tree | 2553e2bcd168f62d37e7f3fd998d5ea9a1b01f29 /usr.bin/ar/ar.c | |
| parent | cf7d9a8ca86f4febb0a4d0d029474b4ec6b6706b (diff) | |
Notes
Diffstat (limited to 'usr.bin/ar/ar.c')
| -rw-r--r-- | usr.bin/ar/ar.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/ar/ar.c b/usr.bin/ar/ar.c index 1fe92fbef3d8..e5bc1d2682aa 100644 --- a/usr.bin/ar/ar.c +++ b/usr.bin/ar/ar.c @@ -154,7 +154,7 @@ main(int argc, char **argv) } } - while ((opt = getopt_long(argc, argv, "abCcdfijlMmopqrSsTtuVvxz", + while ((opt = getopt_long(argc, argv, "abCcdDfijlMmopqrSsTtuVvxz", longopts, NULL)) != -1) { switch(opt) { case 'a': @@ -173,6 +173,9 @@ main(int argc, char **argv) case 'd': set_mode(bsdar, opt); break; + case 'D': + bsdar->options |= AR_D; + break; case 'f': case 'T': bsdar->options |= AR_TR; @@ -269,6 +272,8 @@ main(int argc, char **argv) only_mode(bsdar, "-c", "qr"); if (bsdar->options & AR_CC) only_mode(bsdar, "-C", "x"); + if (bsdar->options & AR_D) + only_mode(bsdar, "-D", "qr"); if (bsdar->options & AR_O) only_mode(bsdar, "-o", "x"); if (bsdar->options & AR_SS) @@ -356,9 +361,9 @@ bsdar_usage(void) (void)fprintf(stderr, "\tar -m [-Tjsvz] archive file ...\n"); (void)fprintf(stderr, "\tar -m [-Tabijsvz] position archive file ...\n"); (void)fprintf(stderr, "\tar -p [-Tv] archive [file ...]\n"); - (void)fprintf(stderr, "\tar -q [-Tcjsvz] archive file ...\n"); - (void)fprintf(stderr, "\tar -r [-Tcjsuvz] archive file ...\n"); - (void)fprintf(stderr, "\tar -r [-Tabcijsuvz] position archive file ...\n"); + (void)fprintf(stderr, "\tar -q [-TcDjsvz] archive file ...\n"); + (void)fprintf(stderr, "\tar -r [-TcDjsuvz] archive file ...\n"); + (void)fprintf(stderr, "\tar -r [-TabcDijsuvz] position archive file ...\n"); (void)fprintf(stderr, "\tar -s [-jz] archive\n"); (void)fprintf(stderr, "\tar -t [-Tv] archive [file ...]\n"); (void)fprintf(stderr, "\tar -x [-CTouv] archive [file ...]\n"); |
