summaryrefslogtreecommitdiffstats
path: root/usr.bin/pkill
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2005-03-03 02:17:20 +0000
committerdelphij <delphij@FreeBSD.org>2005-03-03 02:17:20 +0000
commit3ec33a490c4e69e6bb5eb620245695e740311bb9 (patch)
tree6fdde31da7590286c88bddb999736e5802167e37 /usr.bin/pkill
parent29c3c0268cdcfb5256b01f26a11fb3f390fd0465 (diff)
downloadFreeBSD-src-3ec33a490c4e69e6bb5eb620245695e740311bb9.zip
FreeBSD-src-3ec33a490c4e69e6bb5eb620245695e740311bb9.tar.gz
If a user or group is not known, report the problem user/group, rather than
the first user/group. Caused huge fun in error messages from large script. Old: pgrep -u root,NoSuchUser,daemon -> pgrep: unknown user `root' Now: pgrep -u root,NoSuchUser,daemon -> pgrep: unknown user `NoSuchUser' Obtained from: NetBSD (rev. 1.8) MFC After: 1 week (if re@ would have approved this)
Diffstat (limited to 'usr.bin/pkill')
-rw-r--r--usr.bin/pkill/pkill.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/pkill/pkill.c b/usr.bin/pkill/pkill.c
index f49bc9e..8af5cff 100644
--- a/usr.bin/pkill/pkill.c
+++ b/usr.bin/pkill/pkill.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pkill.c,v 1.7 2004/02/15 17:03:30 soren Exp $ */
+/* $NetBSD: pkill.c,v 1.8 2005/03/02 15:31:44 abs Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -533,13 +533,13 @@ makelist(struct listhead *head, enum listtype type, char *src)
case LT_USER:
if ((pw = getpwnam(sp)) == NULL)
errx(STATUS_BADUSAGE, "unknown user `%s'",
- optarg);
+ sp);
li->li_number = pw->pw_uid;
break;
case LT_GROUP:
if ((gr = getgrnam(sp)) == NULL)
errx(STATUS_BADUSAGE, "unknown group `%s'",
- optarg);
+ sp);
li->li_number = gr->gr_gid;
break;
case LT_TTY:
OpenPOWER on IntegriCloud