diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-27 11:20:10 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-27 11:20:10 +0000 |
commit | 3734b946bfef55c8f63d367422da5c7aa7b972db (patch) | |
tree | 1bdd3e14523002dc8276d167b17f900e40fa6dff /include | |
parent | 661f6fad77b672a5f6648b01275eb9ff19c59139 (diff) | |
download | busybox-w32-3734b946bfef55c8f63d367422da5c7aa7b972db.tar.gz busybox-w32-3734b946bfef55c8f63d367422da5c7aa7b972db.tar.bz2 busybox-w32-3734b946bfef55c8f63d367422da5c7aa7b972db.zip |
bb_getpwuid, bb_getgrgid: change order of arguments to more intuitive one;
comment thoroughly when they die and when they dont.
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/libbb.h b/include/libbb.h index 8fb5520eb..82cee380b 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -481,10 +481,14 @@ struct bb_uidgid_t { | |||
481 | int get_uidgid(struct bb_uidgid_t*, const char*, int numeric_ok); | 481 | int get_uidgid(struct bb_uidgid_t*, const char*, int numeric_ok); |
482 | /* chown-like handling of "user[:[group]" */ | 482 | /* chown-like handling of "user[:[group]" */ |
483 | void parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_group); | 483 | void parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_group); |
484 | /* what is this? */ | 484 | /* bb_getpwuid, bb_getgrgid: |
485 | /*extern char *bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix);*/ | 485 | bb_getXXXid(buf, bufsz, id) - copy user/group name or id |
486 | char *bb_getpwuid(char *name, long uid, int bufsize); | 486 | as a string to buf, return user/group name or NULL |
487 | char *bb_getgrgid(char *group, long gid, int bufsize); | 487 | bb_getXXXid(NULL, 0, id) - return user/group name or NULL |
488 | bb_getXXXid(NULL, -1, id) - return user/group name or exit | ||
489 | */ | ||
490 | char *bb_getpwuid(char *name, int bufsize, long uid); | ||
491 | char *bb_getgrgid(char *group, int bufsize, long gid); | ||
488 | /* versions which cache results (useful for ps, ls etc) */ | 492 | /* versions which cache results (useful for ps, ls etc) */ |
489 | const char* get_cached_username(uid_t uid); | 493 | const char* get_cached_username(uid_t uid); |
490 | const char* get_cached_groupname(gid_t gid); | 494 | const char* get_cached_groupname(gid_t gid); |
@@ -596,6 +600,7 @@ extern const char *opt_complementary; | |||
596 | extern const char *applet_long_options; | 600 | extern const char *applet_long_options; |
597 | #endif | 601 | #endif |
598 | extern uint32_t option_mask32; | 602 | extern uint32_t option_mask32; |
603 | /* TODO: don't pass argc, determine it by looking at argv */ | ||
599 | extern uint32_t getopt32(int argc, char **argv, const char *applet_opts, ...); | 604 | extern uint32_t getopt32(int argc, char **argv, const char *applet_opts, ...); |
600 | 605 | ||
601 | 606 | ||