OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
546b293
)
Improve gid/uid error messages.
author
Rob Landley
<rob@landley.net>
Tue, 22 Jul 2014 00:57:36 +0000
(19:57 -0500)
committer
Rob Landley
<rob@landley.net>
Tue, 22 Jul 2014 00:57:36 +0000
(19:57 -0500)
lib/xwrap.c
patch
|
blob
|
history
diff --git
a/lib/xwrap.c
b/lib/xwrap.c
index
7e495ca
..
583a4ca
100644
(file)
--- 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;
}