diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/include/libbb.h b/include/libbb.h index 3638b7e15..afc053efb 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -223,8 +223,27 @@ extern char *skip_non_whitespace(const char *); | |||
223 | //TODO: supply a pointer to char[11] buffer (avoid statics)? | 223 | //TODO: supply a pointer to char[11] buffer (avoid statics)? |
224 | extern const char *bb_mode_string(mode_t mode); | 224 | extern const char *bb_mode_string(mode_t mode); |
225 | extern int is_directory(const char *name, int followLinks, struct stat *statBuf); | 225 | extern int is_directory(const char *name, int followLinks, struct stat *statBuf); |
226 | enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */ | ||
227 | FILEUTILS_PRESERVE_STATUS = 1, | ||
228 | FILEUTILS_DEREFERENCE = 2, | ||
229 | FILEUTILS_RECUR = 4, | ||
230 | FILEUTILS_FORCE = 8, | ||
231 | FILEUTILS_INTERACTIVE = 0x10, | ||
232 | FILEUTILS_MAKE_HARDLINK = 0x20, | ||
233 | FILEUTILS_MAKE_SOFTLINK = 0x40, | ||
234 | #if ENABLE_SELINUX | ||
235 | FILEUTILS_PRESERVE_SECURITY_CONTEXT = 0x80, | ||
236 | FILEUTILS_SET_SECURITY_CONTEXT = 0x100 | ||
237 | #endif | ||
238 | }; | ||
239 | #define FILEUTILS_CP_OPTSTR "pdRfils" USE_SELINUX("c") | ||
226 | extern int remove_file(const char *path, int flags); | 240 | extern int remove_file(const char *path, int flags); |
241 | /* NB: without FILEUTILS_RECUR in flags, it will basically "cat" | ||
242 | * the source, not copy (unless "source" is a directory). | ||
243 | * This makes "cp /dev/null file" and "install /dev/null file" (!!!) | ||
244 | * work coreutils-compatibly. */ | ||
227 | extern int copy_file(const char *source, const char *dest, int flags); | 245 | extern int copy_file(const char *source, const char *dest, int flags); |
246 | |||
228 | enum { | 247 | enum { |
229 | ACTION_RECURSE = (1 << 0), | 248 | ACTION_RECURSE = (1 << 0), |
230 | ACTION_FOLLOWLINKS = (1 << 1), | 249 | ACTION_FOLLOWLINKS = (1 << 1), |
@@ -1170,21 +1189,6 @@ void *md5_end(void *resbuf, md5_ctx_t *ctx); | |||
1170 | uint32_t *crc32_filltable(uint32_t *tbl256, int endian); | 1189 | uint32_t *crc32_filltable(uint32_t *tbl256, int endian); |
1171 | 1190 | ||
1172 | 1191 | ||
1173 | enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */ | ||
1174 | FILEUTILS_PRESERVE_STATUS = 1, | ||
1175 | FILEUTILS_DEREFERENCE = 2, | ||
1176 | FILEUTILS_RECUR = 4, | ||
1177 | FILEUTILS_FORCE = 8, | ||
1178 | FILEUTILS_INTERACTIVE = 0x10, | ||
1179 | FILEUTILS_MAKE_HARDLINK = 0x20, | ||
1180 | FILEUTILS_MAKE_SOFTLINK = 0x40, | ||
1181 | #if ENABLE_SELINUX | ||
1182 | FILEUTILS_PRESERVE_SECURITY_CONTEXT = 0x80, | ||
1183 | FILEUTILS_SET_SECURITY_CONTEXT = 0x100 | ||
1184 | #endif | ||
1185 | }; | ||
1186 | |||
1187 | #define FILEUTILS_CP_OPTSTR "pdRfils" USE_SELINUX("c") | ||
1188 | extern const char *applet_name; | 1192 | extern const char *applet_name; |
1189 | /* "BusyBox vN.N.N (timestamp or extra_version)" */ | 1193 | /* "BusyBox vN.N.N (timestamp or extra_version)" */ |
1190 | extern const char bb_banner[]; | 1194 | extern const char bb_banner[]; |