diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/bb_archive.h | 8 | ||||
-rw-r--r-- | include/libbb.h | 26 |
2 files changed, 21 insertions, 13 deletions
diff --git a/include/bb_archive.h b/include/bb_archive.h index 03f174839..9bbf59bb8 100644 --- a/include/bb_archive.h +++ b/include/bb_archive.h | |||
@@ -221,7 +221,7 @@ void dealloc_bunzip(bunzip_data *bd) FAST_FUNC; | |||
221 | 221 | ||
222 | /* Meaning and direction (input/output) of the fields are transformer-specific */ | 222 | /* Meaning and direction (input/output) of the fields are transformer-specific */ |
223 | typedef struct transformer_state_t { | 223 | typedef struct transformer_state_t { |
224 | smallint check_signature; /* most often referenced member */ | 224 | smallint signature_skipped; /* most often referenced member */ |
225 | 225 | ||
226 | IF_DESKTOP(long long) int FAST_FUNC (*xformer)(struct transformer_state_t *xstate); | 226 | IF_DESKTOP(long long) int FAST_FUNC (*xformer)(struct transformer_state_t *xstate); |
227 | USE_FOR_NOMMU(const char *xformer_prog;) | 227 | USE_FOR_NOMMU(const char *xformer_prog;) |
@@ -262,11 +262,11 @@ int bbunpack(char **argv, | |||
262 | void check_errors_in_children(int signo); | 262 | void check_errors_in_children(int signo); |
263 | #if BB_MMU | 263 | #if BB_MMU |
264 | void fork_transformer(int fd, | 264 | void fork_transformer(int fd, |
265 | int check_signature, | 265 | int signature_skipped, |
266 | IF_DESKTOP(long long) int FAST_FUNC (*transformer)(transformer_state_t *xstate) | 266 | IF_DESKTOP(long long) int FAST_FUNC (*transformer)(transformer_state_t *xstate) |
267 | ) FAST_FUNC; | 267 | ) FAST_FUNC; |
268 | #define fork_transformer_with_sig(fd, transformer, transform_prog) fork_transformer((fd), 1, (transformer)) | 268 | #define fork_transformer_with_sig(fd, transformer, transform_prog) fork_transformer((fd), 0, (transformer)) |
269 | #define fork_transformer_with_no_sig(fd, transformer) fork_transformer((fd), 0, (transformer)) | 269 | #define fork_transformer_with_no_sig(fd, transformer) fork_transformer((fd), 1, (transformer)) |
270 | #else | 270 | #else |
271 | void fork_transformer(int fd, const char *transform_prog) FAST_FUNC; | 271 | void fork_transformer(int fd, const char *transform_prog) FAST_FUNC; |
272 | #define fork_transformer_with_sig(fd, transformer, transform_prog) fork_transformer((fd), (transform_prog)) | 272 | #define fork_transformer_with_sig(fd, transformer, transform_prog) fork_transformer((fd), (transform_prog)) |
diff --git a/include/libbb.h b/include/libbb.h index 9402bb04b..6db03d2df 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -362,7 +362,7 @@ extern char *strrstr(const char *haystack, const char *needle) FAST_FUNC; | |||
362 | //TODO: supply a pointer to char[11] buffer (avoid statics)? | 362 | //TODO: supply a pointer to char[11] buffer (avoid statics)? |
363 | extern const char *bb_mode_string(mode_t mode) FAST_FUNC; | 363 | extern const char *bb_mode_string(mode_t mode) FAST_FUNC; |
364 | extern int is_directory(const char *name, int followLinks) FAST_FUNC; | 364 | extern int is_directory(const char *name, int followLinks) FAST_FUNC; |
365 | enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */ | 365 | enum { /* cp.c, mv.c, install.c depend on these values. CAREFUL when changing them! */ |
366 | FILEUTILS_PRESERVE_STATUS = 1 << 0, /* -p */ | 366 | FILEUTILS_PRESERVE_STATUS = 1 << 0, /* -p */ |
367 | FILEUTILS_DEREFERENCE = 1 << 1, /* !-d */ | 367 | FILEUTILS_DEREFERENCE = 1 << 1, /* !-d */ |
368 | FILEUTILS_RECUR = 1 << 2, /* -R */ | 368 | FILEUTILS_RECUR = 1 << 2, /* -R */ |
@@ -372,15 +372,25 @@ enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */ | |||
372 | FILEUTILS_MAKE_SOFTLINK = 1 << 6, /* -s */ | 372 | FILEUTILS_MAKE_SOFTLINK = 1 << 6, /* -s */ |
373 | FILEUTILS_DEREF_SOFTLINK = 1 << 7, /* -L */ | 373 | FILEUTILS_DEREF_SOFTLINK = 1 << 7, /* -L */ |
374 | FILEUTILS_DEREFERENCE_L0 = 1 << 8, /* -H */ | 374 | FILEUTILS_DEREFERENCE_L0 = 1 << 8, /* -H */ |
375 | /* -a = -pdR (mapped in cp.c) */ | ||
376 | /* -r = -dR (mapped in cp.c) */ | ||
377 | /* -P = -d (mapped in cp.c) */ | ||
378 | FILEUTILS_VERBOSE = (1 << 12) * ENABLE_FEATURE_VERBOSE, /* -v */ | ||
379 | FILEUTILS_UPDATE = 1 << 13, /* -u */ | ||
375 | #if ENABLE_SELINUX | 380 | #if ENABLE_SELINUX |
376 | FILEUTILS_PRESERVE_SECURITY_CONTEXT = 1 << 9, /* -c */ | 381 | FILEUTILS_PRESERVE_SECURITY_CONTEXT = 1 << 14, /* -c */ |
377 | FILEUTILS_SET_SECURITY_CONTEXT = 1 << 10, | ||
378 | #endif | 382 | #endif |
379 | FILEUTILS_IGNORE_CHMOD_ERR = 1 << 11, | 383 | FILEUTILS_RMDEST = 1 << (15 - !ENABLE_SELINUX), /* --remove-destination */ |
380 | /* -v */ | 384 | /* |
381 | FILEUTILS_VERBOSE = (1 << 12) * ENABLE_FEATURE_VERBOSE, | 385 | * Hole. cp may have some bits set here, |
386 | * they should not affect remove_file()/copy_file() | ||
387 | */ | ||
388 | #if ENABLE_SELINUX | ||
389 | FILEUTILS_SET_SECURITY_CONTEXT = 1 << 30, | ||
390 | #endif | ||
391 | FILEUTILS_IGNORE_CHMOD_ERR = 1 << 31, | ||
382 | }; | 392 | }; |
383 | #define FILEUTILS_CP_OPTSTR "pdRfilsLH" IF_SELINUX("c") | 393 | #define FILEUTILS_CP_OPTSTR "pdRfilsLHarPvu" IF_SELINUX("c") |
384 | extern int remove_file(const char *path, int flags) FAST_FUNC; | 394 | extern int remove_file(const char *path, int flags) FAST_FUNC; |
385 | /* NB: without FILEUTILS_RECUR in flags, it will basically "cat" | 395 | /* NB: without FILEUTILS_RECUR in flags, it will basically "cat" |
386 | * the source, not copy (unless "source" is a directory). | 396 | * the source, not copy (unless "source" is a directory). |
@@ -1248,8 +1258,6 @@ const struct hwtype *get_hwntype(int type) FAST_FUNC; | |||
1248 | 1258 | ||
1249 | #ifndef BUILD_INDIVIDUAL | 1259 | #ifndef BUILD_INDIVIDUAL |
1250 | extern int find_applet_by_name(const char *name) FAST_FUNC; | 1260 | extern int find_applet_by_name(const char *name) FAST_FUNC; |
1251 | /* Returns only if applet is not found. */ | ||
1252 | extern void run_applet_and_exit(const char *name, char **argv) FAST_FUNC; | ||
1253 | extern void run_applet_no_and_exit(int a, char **argv) NORETURN FAST_FUNC; | 1261 | extern void run_applet_no_and_exit(int a, char **argv) NORETURN FAST_FUNC; |
1254 | #endif | 1262 | #endif |
1255 | 1263 | ||