diff options
Diffstat (limited to 'include/libbb.h')
| -rw-r--r-- | include/libbb.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h index 0bc8cf29e..c58cbc250 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -801,6 +801,8 @@ ssize_t recv_from_to(int fd, void *buf, size_t len, int flags, | |||
| 801 | 801 | ||
| 802 | uint16_t inet_cksum(uint16_t *addr, int len) FAST_FUNC; | 802 | uint16_t inet_cksum(uint16_t *addr, int len) FAST_FUNC; |
| 803 | 803 | ||
| 804 | /* 0 if argv[0] is NULL: */ | ||
| 805 | unsigned string_array_len(char **argv) FAST_FUNC; | ||
| 804 | void overlapping_strcpy(char *dst, const char *src) FAST_FUNC; | 806 | void overlapping_strcpy(char *dst, const char *src) FAST_FUNC; |
| 805 | char *safe_strncpy(char *dst, const char *src, size_t size) FAST_FUNC; | 807 | char *safe_strncpy(char *dst, const char *src, size_t size) FAST_FUNC; |
| 806 | char *strncpy_IFNAMSIZ(char *dst, const char *src) FAST_FUNC; | 808 | char *strncpy_IFNAMSIZ(char *dst, const char *src) FAST_FUNC; |
| @@ -1057,6 +1059,15 @@ void die_if_bad_username(const char* name) FAST_FUNC; | |||
| 1057 | #else | 1059 | #else |
| 1058 | #define die_if_bad_username(name) ((void)(name)) | 1060 | #define die_if_bad_username(name) ((void)(name)) |
| 1059 | #endif | 1061 | #endif |
| 1062 | /* | ||
| 1063 | * Returns (-1) terminated malloced result of getgroups(). | ||
| 1064 | * Reallocs group_array (useful for repeated calls). | ||
| 1065 | * ngroups is an initial size of array. It is rounded up to 32 for realloc. | ||
| 1066 | * ngroups is updated on return. | ||
| 1067 | * ngroups can be NULL: bb_getgroups(NULL, NULL) is valid usage. | ||
| 1068 | * Dies on errors (on Linux, only xrealloc can cause this, not internal getgroups call). | ||
| 1069 | */ | ||
| 1070 | gid_t *bb_getgroups(int *ngroups, gid_t *group_array) FAST_FUNC; | ||
| 1060 | 1071 | ||
| 1061 | #if ENABLE_FEATURE_UTMP | 1072 | #if ENABLE_FEATURE_UTMP |
| 1062 | void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname); | 1073 | void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname); |
| @@ -1132,7 +1143,7 @@ int spawn_and_wait(char **argv) FAST_FUNC; | |||
| 1132 | int run_nofork_applet(int applet_no, char **argv) FAST_FUNC; | 1143 | int run_nofork_applet(int applet_no, char **argv) FAST_FUNC; |
| 1133 | #ifndef BUILD_INDIVIDUAL | 1144 | #ifndef BUILD_INDIVIDUAL |
| 1134 | extern int find_applet_by_name(const char *name) FAST_FUNC; | 1145 | extern int find_applet_by_name(const char *name) FAST_FUNC; |
| 1135 | extern void run_applet_no_and_exit(int a, char **argv) NORETURN FAST_FUNC; | 1146 | extern void run_applet_no_and_exit(int a, const char *name, char **argv) NORETURN FAST_FUNC; |
| 1136 | #endif | 1147 | #endif |
| 1137 | 1148 | ||
| 1138 | /* Helpers for daemonization. | 1149 | /* Helpers for daemonization. |
