diff options
author | Rob Landley <rob@landley.net> | 2014-07-21 19:57:36 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-07-21 19:57:36 -0500 |
commit | 4fd07e0f6698cdb873aab0113369eb36c81853a9 (patch) | |
tree | f146d813c9aeb91cd937e35d5d239c9c161b5ec4 | |
parent | 546b293cb9369c9c421981c71577af29d83b925a (diff) | |
download | toybox-4fd07e0f6698cdb873aab0113369eb36c81853a9.tar.gz |
Improve gid/uid error messages.
-rw-r--r-- | lib/xwrap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c index 7e495caf..583a4cae 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c @@ -450,14 +450,16 @@ struct passwd *xgetpwuid(uid_t uid) 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; } |