Date: Mon, 2 Feb 2009 11:30:13 GMT From: dfilter@FreeBSD.ORG (dfilter service) To: freebsd-bugs@FreeBSD.org Subject: Re: bin/86148: commit references a PR Message-ID: <200902021130.n12BUDkq013975@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: Mon, 2 Feb 2009 11:20:41 +0000 (UTC) Author: rwatson Date: Mon Feb 2 11:19:56 2009 New Revision: 188006 URL: http://svn.freebsd.org/changeset/base/188006 Log: 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> MFC after: 3 days Modified: head/usr.bin/basename/basename.1 head/usr.bin/dirname/dirname.c Modified: head/usr.bin/basename/basename.1 ============================================================================== --- head/usr.bin/basename/basename.1 Mon Feb 2 11:02:19 2009 (r188005) +++ head/usr.bin/basename/basename.1 Mon Feb 2 11:19:56 2009 (r188006) @@ -52,6 +52,7 @@ .Op Ar ... .Nm dirname .Ar string +.Op Ar ... .Sh DESCRIPTION The .Nm Modified: head/usr.bin/dirname/dirname.c ============================================================================== --- head/usr.bin/dirname/dirname.c Mon Feb 2 11:02:19 2009 (r188005) +++ head/usr.bin/dirname/dirname.c Mon Feb 2 11:19:56 2009 (r188006) @@ -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?200902021130.n12BUDkq013975>