Mercurial > hg > toybox
changeset 1400:31cb9ba1815c draft
Improve gid/uid error messages.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 21 Jul 2014 19:57:36 -0500 |
parents | a0c328bc2c14 |
children | 8a67f42e4f76 |
files | lib/xwrap.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/xwrap.c Mon Jul 21 19:56:53 2014 -0500 +++ b/lib/xwrap.c Mon Jul 21 19:57:36 2014 -0500 @@ -450,14 +450,16 @@ struct group *xgetgrgid(gid_t gid) { struct group *group = getgrgid(gid); - if (!group) error_exit("bad gid %ld", (long)gid); + + if (!group) perror_exit("gid %ld", (long)gid); return group; } struct passwd *xgetpwnam(char *name) { struct passwd *up = getpwnam(name); - if (!up) error_exit("bad user '%s'", name); + + if (!up) perror_exit("user '%s'", name); return up; }