aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 7721cbf82..30d3006ad 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -223,7 +223,6 @@ struct sysinfo {
223extern int sysinfo(struct sysinfo* info); 223extern int sysinfo(struct sysinfo* info);
224 224
225 225
226
227extern void chomp(char *s); 226extern void chomp(char *s);
228extern void trim(char *s); 227extern void trim(char *s);
229extern char *skip_whitespace(const char *); 228extern char *skip_whitespace(const char *);
@@ -410,20 +409,26 @@ uint16_t xatou16(const char *numstr);
410/* These parse entries in /etc/passwd and /etc/group. This is desirable 409/* These parse entries in /etc/passwd and /etc/group. This is desirable
411 * for BusyBox since we want to avoid using the glibc NSS stuff, which 410 * for BusyBox since we want to avoid using the glibc NSS stuff, which
412 * increases target size and is often not needed on embedded systems. */ 411 * increases target size and is often not needed on embedded systems. */
413extern long xuname2uid(const char *name); 412long xuname2uid(const char *name);
414extern long xgroup2gid(const char *name); 413long xgroup2gid(const char *name);
415/* wrapper: allows string to contain numeric uid or gid */ 414/* wrapper: allows string to contain numeric uid or gid */
416extern unsigned long get_ug_id(const char *s, long (*xname2id)(const char *)); 415unsigned long get_ug_id(const char *s, long (*xname2id)(const char *));
417/* from chpst. Does not die, returns 0 on failure */ 416/* from chpst. Does not die, returns 0 on failure */
418struct bb_uidgid_t { 417struct bb_uidgid_t {
419 uid_t uid; 418 uid_t uid;
420 gid_t gid; 419 gid_t gid;
421}; 420};
422extern int get_uidgid(struct bb_uidgid_t*, const char*, int numeric_ok); 421int get_uidgid(struct bb_uidgid_t*, const char*, int numeric_ok);
423/* what is this? */ 422/* what is this? */
424/*extern char *bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix);*/ 423/*extern char *bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix);*/
425extern char *bb_getpwuid(char *name, long uid, int bufsize); 424char *bb_getpwuid(char *name, long uid, int bufsize);
426extern char *bb_getgrgid(char *group, long gid, int bufsize); 425char *bb_getgrgid(char *group, long gid, int bufsize);
426/* versions which cache results (useful for ps, ls etc) */
427const char* get_cached_username(uid_t uid);
428const char* get_cached_groupname(gid_t gid);
429void clear_username_cache(void);
430/* internally usernames are saved in fixed-sized char[] buffers */
431enum { USERNAME_MAX_SIZE = 16 - sizeof(int) };
427 432
428 433
429enum { BB_GETOPT_ERROR = 0x80000000 }; 434enum { BB_GETOPT_ERROR = 0x80000000 };
@@ -626,9 +631,6 @@ void free_procps_scan(procps_status_t* sp);
626procps_status_t* procps_scan(procps_status_t* sp, int flags); 631procps_status_t* procps_scan(procps_status_t* sp, int flags);
627pid_t *find_pid_by_name(const char* procName); 632pid_t *find_pid_by_name(const char* procName);
628pid_t *pidlist_reverse(pid_t *pidList); 633pid_t *pidlist_reverse(pid_t *pidList);
629void clear_username_cache(void);
630const char* get_cached_username(uid_t uid);
631const char* get_cached_groupname(gid_t gid);
632 634
633 635
634extern const char bb_uuenc_tbl_base64[]; 636extern const char bb_uuenc_tbl_base64[];