aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h26
1 files changed, 17 insertions, 9 deletions
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)?
363extern const char *bb_mode_string(mode_t mode) FAST_FUNC; 363extern const char *bb_mode_string(mode_t mode) FAST_FUNC;
364extern int is_directory(const char *name, int followLinks) FAST_FUNC; 364extern int is_directory(const char *name, int followLinks) FAST_FUNC;
365enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */ 365enum { /* 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")
384extern int remove_file(const char *path, int flags) FAST_FUNC; 394extern 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
1250extern int find_applet_by_name(const char *name) FAST_FUNC; 1260extern int find_applet_by_name(const char *name) FAST_FUNC;
1251/* Returns only if applet is not found. */
1252extern void run_applet_and_exit(const char *name, char **argv) FAST_FUNC;
1253extern void run_applet_no_and_exit(int a, char **argv) NORETURN FAST_FUNC; 1261extern void run_applet_no_and_exit(int a, char **argv) NORETURN FAST_FUNC;
1254#endif 1262#endif
1255 1263