Date: Sat, 7 Feb 2009 11:30:10 GMT From: dfilter@FreeBSD.ORG (dfilter service) To: freebsd-bugs@FreeBSD.org Subject: Re: bin/86148: commit references a PR Message-ID: <200902071130.n17BUAat072153@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/86148; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/86148: commit references a PR Date: Sat, 7 Feb 2009 11:27:45 +0000 (UTC) Author: rwatson Date: Sat Feb 7 11:27:35 2009 New Revision: 188279 URL: http://svn.freebsd.org/changeset/base/188279 Log: Merge r188006 from head to stable/7: Alow dirname(1) to accept multiple arguments in the same way that basename(1) does. (Two different PRs contained identical patches, both cited below) PR: 121520, 86148 Submitted by: Ighighi <ighighi at gmail dot com> Submitted by: Leif Neland <leif at neland dot dk> Modified: stable/7/usr.bin/basename/ (props changed) stable/7/usr.bin/basename/basename.1 stable/7/usr.bin/dirname/ (props changed) stable/7/usr.bin/dirname/dirname.c Modified: stable/7/usr.bin/basename/basename.1 ============================================================================== --- stable/7/usr.bin/basename/basename.1 Sat Feb 7 11:15:53 2009 (r188278) +++ stable/7/usr.bin/basename/basename.1 Sat Feb 7 11:27:35 2009 (r188279) @@ -52,6 +52,7 @@ .Op Ar ... .Nm dirname .Ar string +.Op Ar ... .Sh DESCRIPTION The .Nm Modified: stable/7/usr.bin/dirname/dirname.c ============================================================================== --- stable/7/usr.bin/dirname/dirname.c Sat Feb 7 11:15:53 2009 (r188278) +++ stable/7/usr.bin/dirname/dirname.c Sat Feb 7 11:27:35 2009 (r188279) @@ -66,12 +66,15 @@ main(int argc, char **argv) argc -= optind; argv += optind; - if (argc != 1) + if (argc < 1) usage(); - if ((p = dirname(*argv)) == NULL) - err(1, "%s", *argv); - (void)printf("%s\n", p); + while (argc--) { + if ((p = dirname(*argv)) == NULL) + err(1, "%s", *argv); + argv++; + (void)printf("%s\n", p); + } exit(0); } @@ -79,6 +82,6 @@ void usage(void) { - (void)fprintf(stderr, "usage: dirname string\n"); + (void)fprintf(stderr, "usage: dirname string [...]\n"); exit(1); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902071130.n17BUAat072153>