aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/include/libbb.h b/include/libbb.h
index fd40ef74c..a21f4204a 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -351,7 +351,7 @@ extern char *strrstr(const char *haystack, const char *needle) FAST_FUNC;
351//TODO: supply a pointer to char[11] buffer (avoid statics)? 351//TODO: supply a pointer to char[11] buffer (avoid statics)?
352extern const char *bb_mode_string(mode_t mode) FAST_FUNC; 352extern const char *bb_mode_string(mode_t mode) FAST_FUNC;
353extern int is_directory(const char *name, int followLinks) FAST_FUNC; 353extern int is_directory(const char *name, int followLinks) FAST_FUNC;
354enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */ 354enum { /* cp.c, mv.c, install.c depend on these values. CAREFUL when changing them! */
355 FILEUTILS_PRESERVE_STATUS = 1 << 0, /* -p */ 355 FILEUTILS_PRESERVE_STATUS = 1 << 0, /* -p */
356 FILEUTILS_DEREFERENCE = 1 << 1, /* !-d */ 356 FILEUTILS_DEREFERENCE = 1 << 1, /* !-d */
357 FILEUTILS_RECUR = 1 << 2, /* -R */ 357 FILEUTILS_RECUR = 1 << 2, /* -R */
@@ -361,15 +361,25 @@ enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */
361 FILEUTILS_MAKE_SOFTLINK = 1 << 6, /* -s */ 361 FILEUTILS_MAKE_SOFTLINK = 1 << 6, /* -s */
362 FILEUTILS_DEREF_SOFTLINK = 1 << 7, /* -L */ 362 FILEUTILS_DEREF_SOFTLINK = 1 << 7, /* -L */
363 FILEUTILS_DEREFERENCE_L0 = 1 << 8, /* -H */ 363 FILEUTILS_DEREFERENCE_L0 = 1 << 8, /* -H */
364 /* -a = -pdR (mapped in cp.c) */
365 /* -r = -dR (mapped in cp.c) */
366 /* -P = -d (mapped in cp.c) */
367 FILEUTILS_VERBOSE = (1 << 12) * ENABLE_FEATURE_VERBOSE, /* -v */
368 FILEUTILS_UPDATE = 1 << 13, /* -u */
364#if ENABLE_SELINUX 369#if ENABLE_SELINUX
365 FILEUTILS_PRESERVE_SECURITY_CONTEXT = 1 << 9, /* -c */ 370 FILEUTILS_PRESERVE_SECURITY_CONTEXT = 1 << 14, /* -c */
366 FILEUTILS_SET_SECURITY_CONTEXT = 1 << 10,
367#endif 371#endif
368 FILEUTILS_IGNORE_CHMOD_ERR = 1 << 11, 372 FILEUTILS_RMDEST = 1 << (15 - !ENABLE_SELINUX), /* --remove-destination */
369 /* -v */ 373 /*
370 FILEUTILS_VERBOSE = (1 << 12) * ENABLE_FEATURE_VERBOSE, 374 * Hole. cp may have some bits set here,
375 * they should not affect remove_file()/copy_file()
376 */
377#if ENABLE_SELINUX
378 FILEUTILS_SET_SECURITY_CONTEXT = 1 << 30,
379#endif
380 FILEUTILS_IGNORE_CHMOD_ERR = 1 << 31,
371}; 381};
372#define FILEUTILS_CP_OPTSTR "pdRfilsLH" IF_SELINUX("c") 382#define FILEUTILS_CP_OPTSTR "pdRfilsLHarPvu" IF_SELINUX("c")
373extern int remove_file(const char *path, int flags) FAST_FUNC; 383extern int remove_file(const char *path, int flags) FAST_FUNC;
374/* NB: without FILEUTILS_RECUR in flags, it will basically "cat" 384/* NB: without FILEUTILS_RECUR in flags, it will basically "cat"
375 * the source, not copy (unless "source" is a directory). 385 * the source, not copy (unless "source" is a directory).