summaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
authorAaro Koskinen2018-02-01 09:29:05 +0100
committerDenys Vlasenko2018-02-01 09:30:59 +0100
commitd15d7a0a4b07a55268546f0d32b6a3ed78a2ac77 (patch)
treec1657aff3ed6cc999f1090930dac9671926b36a8 /include/libbb.h
parentd6f0f03b68fc4cf9ffb8006e192e36f0ebf51ea6 (diff)
downloadbusybox-d15d7a0a4b07a55268546f0d32b6a3ed78a2ac77.zip
busybox-d15d7a0a4b07a55268546f0d32b6a3ed78a2ac77.tar.gz
cp: implement -T
Implement "cp -T". Some Linux kernel Makefiles started using this recently, so allow also building on systems using busybox cp. function old new delta cp_main 360 428 +68 copy_file 1678 1676 -2 packed_usage 32290 32259 -31 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 76/-39) Total: 35 bytes Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 5f25b5d..a938640 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -404,10 +404,11 @@ enum { /* cp.c, mv.c, install.c depend on these values. CAREFUL when changing th
/* -P = -d (mapped in cp.c) */
FILEUTILS_VERBOSE = (1 << 12) * ENABLE_FEATURE_VERBOSE, /* -v */
FILEUTILS_UPDATE = 1 << 13, /* -u */
+ FILEUTILS_NO_TARGET_DIR = 1 << 14, /* -T */
#if ENABLE_SELINUX
- FILEUTILS_PRESERVE_SECURITY_CONTEXT = 1 << 14, /* -c */
+ FILEUTILS_PRESERVE_SECURITY_CONTEXT = 1 << 15, /* -c */
#endif
- FILEUTILS_RMDEST = 1 << (15 - !ENABLE_SELINUX), /* --remove-destination */
+ FILEUTILS_RMDEST = 1 << (16 - !ENABLE_SELINUX), /* --remove-destination */
/*
* Hole. cp may have some bits set here,
* they should not affect remove_file()/copy_file()
@@ -417,7 +418,7 @@ enum { /* cp.c, mv.c, install.c depend on these values. CAREFUL when changing th
#endif
FILEUTILS_IGNORE_CHMOD_ERR = 1 << 31,
};
-#define FILEUTILS_CP_OPTSTR "pdRfilsLHarPvu" IF_SELINUX("c")
+#define FILEUTILS_CP_OPTSTR "pdRfilsLHarPvuT" IF_SELINUX("c")
extern int remove_file(const char *path, int flags) FAST_FUNC;
/* NB: without FILEUTILS_RECUR in flags, it will basically "cat"
* the source, not copy (unless "source" is a directory).