summaryrefslogtreecommitdiffstats
path: root/usr.bin/ar/ar.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ar/ar.c')
-rw-r--r--usr.bin/ar/ar.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/usr.bin/ar/ar.c b/usr.bin/ar/ar.c
index 7c76290..3d5e2b8 100644
--- a/usr.bin/ar/ar.c
+++ b/usr.bin/ar/ar.c
@@ -113,7 +113,7 @@ main(int argc, char **argv)
len = strlen(bsdar->progname);
if (len >= strlen("ranlib") &&
strcmp(bsdar->progname + len - strlen("ranlib"), "ranlib") == 0) {
- while ((opt = getopt_long(argc, argv, "tDV", longopts,
+ while ((opt = getopt_long(argc, argv, "tDUV", longopts,
NULL)) != -1) {
switch(opt) {
case 't':
@@ -122,6 +122,9 @@ main(int argc, char **argv)
case 'D':
bsdar->options |= AR_D;
break;
+ case 'U':
+ bsdar->options &= ~AR_D;
+ break;
case 'V':
ranlib_version();
break;
@@ -157,7 +160,7 @@ main(int argc, char **argv)
}
}
- while ((opt = getopt_long(argc, argv, "abCcdDfijlMmopqrSsTtuVvxz",
+ while ((opt = getopt_long(argc, argv, "abCcdDfijlMmopqrSsTtUuVvxz",
longopts, NULL)) != -1) {
switch(opt) {
case 'a':
@@ -216,6 +219,9 @@ main(int argc, char **argv)
case 't':
set_mode(bsdar, opt);
break;
+ case 'U':
+ bsdar->options &= ~AR_D;
+ break;
case 'u':
bsdar->options |= AR_U;
break;
@@ -364,9 +370,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 [-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 -q [-TcDjsUvz] archive file ...\n");
+ (void)fprintf(stderr, "\tar -r [-TcDjsUuvz] archive file ...\n");
+ (void)fprintf(stderr, "\tar -r [-TabcDijsUuvz] 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");
@@ -378,7 +384,7 @@ static void
ranlib_usage(void)
{
- (void)fprintf(stderr, "usage: ranlib [-t] archive ...\n");
+ (void)fprintf(stderr, "usage: ranlib [-DtU] archive ...\n");
(void)fprintf(stderr, "\tranlib -V\n");
exit(EX_USAGE);
}
OpenPOWER on IntegriCloud