From owner-freebsd-bugs@FreeBSD.ORG Mon Feb 2 11:30:13 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA2851065690 for ; Mon, 2 Feb 2009 11:30:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7D1EF8FC1C for ; Mon, 2 Feb 2009 11:30:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n12BUDot013985 for ; Mon, 2 Feb 2009 11:30:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n12BUDkq013975; Mon, 2 Feb 2009 11:30:13 GMT (envelope-from gnats) Date: Mon, 2 Feb 2009 11:30:13 GMT Message-Id: <200902021130.n12BUDkq013975@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: bin/86148: commit references a PR X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 11:30:14 -0000 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 Submitted by: Leif Neland 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"