diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-12-01 13:06:03 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-12-01 13:06:03 +0100 |
commit | 3f2477e8a89ddadd1dfdd9d990ac8c6fdb8ad4b3 (patch) | |
tree | f672972cbfd8cf87a1c386235fbb5522331d1a89 | |
parent | 631fd5ccd7372e2c09e953cc3c5d0176ee2bc6d2 (diff) | |
download | busybox-w32-3f2477e8a89ddadd1dfdd9d990ac8c6fdb8ad4b3.tar.gz busybox-w32-3f2477e8a89ddadd1dfdd9d990ac8c6fdb8ad4b3.tar.bz2 busybox-w32-3f2477e8a89ddadd1dfdd9d990ac8c6fdb8ad4b3.zip |
touch: fix help text to not show options disabled in .config
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
-rw-r--r-- | coreutils/Config.src | 7 | ||||
-rw-r--r-- | coreutils/Kbuild.src | 1 | ||||
-rw-r--r-- | coreutils/touch.c | 29 | ||||
-rw-r--r-- | include/applets.src.h | 1 | ||||
-rw-r--r-- | include/usage.src.h | 16 |
5 files changed, 29 insertions, 25 deletions
diff --git a/coreutils/Config.src b/coreutils/Config.src index 0eb70af55..c2fd73e59 100644 --- a/coreutils/Config.src +++ b/coreutils/Config.src | |||
@@ -661,13 +661,6 @@ config FEATURE_TEE_USE_BLOCK_IO | |||
661 | help | 661 | help |
662 | Enable this option for a faster tee, at expense of size. | 662 | Enable this option for a faster tee, at expense of size. |
663 | 663 | ||
664 | config TOUCH | ||
665 | bool "touch" | ||
666 | default y | ||
667 | help | ||
668 | touch is used to create or change the access and/or | ||
669 | modification timestamp of specified files. | ||
670 | |||
671 | config TRUE | 664 | config TRUE |
672 | bool "true" | 665 | bool "true" |
673 | default y | 666 | default y |
diff --git a/coreutils/Kbuild.src b/coreutils/Kbuild.src index 630b048df..4ea0fa50a 100644 --- a/coreutils/Kbuild.src +++ b/coreutils/Kbuild.src | |||
@@ -74,7 +74,6 @@ lib-$(CONFIG_SYNC) += sync.o | |||
74 | lib-$(CONFIG_TAC) += tac.o | 74 | lib-$(CONFIG_TAC) += tac.o |
75 | lib-$(CONFIG_TAIL) += tail.o | 75 | lib-$(CONFIG_TAIL) += tail.o |
76 | lib-$(CONFIG_TEE) += tee.o | 76 | lib-$(CONFIG_TEE) += tee.o |
77 | lib-$(CONFIG_TOUCH) += touch.o | ||
78 | lib-$(CONFIG_TRUE) += true.o | 77 | lib-$(CONFIG_TRUE) += true.o |
79 | lib-$(CONFIG_TTY) += tty.o | 78 | lib-$(CONFIG_TTY) += tty.o |
80 | lib-$(CONFIG_UNAME) += uname.o | 79 | lib-$(CONFIG_UNAME) += uname.o |
diff --git a/coreutils/touch.c b/coreutils/touch.c index afff36b4d..352177111 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c | |||
@@ -19,6 +19,35 @@ | |||
19 | 19 | ||
20 | #include "libbb.h" | 20 | #include "libbb.h" |
21 | 21 | ||
22 | //config:config TOUCH | ||
23 | //config: bool "touch" | ||
24 | //config: default y | ||
25 | //config: help | ||
26 | //config: touch is used to create or change the access and/or | ||
27 | //config: modification timestamp of specified files. | ||
28 | |||
29 | //applet:IF_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_DROP, touch)) | ||
30 | |||
31 | //kbuild:lib-$(CONFIG_TOUCH) += touch.o | ||
32 | |||
33 | //usage:#define touch_trivial_usage | ||
34 | //usage: "[-c]" IF_DESKTOP(" [-d DATE] [-r FILE]") " FILE [FILE]..." | ||
35 | //usage:#define touch_full_usage "\n\n" | ||
36 | //usage: "Update the last-modified date on the given FILE[s]\n" | ||
37 | //usage: "\nOptions:" | ||
38 | //usage: "\n -c Don't create files" | ||
39 | //usage: IF_DESKTOP( | ||
40 | //usage: "\n -d DT Date/time to use" | ||
41 | //usage: "\n -r FILE Use FILE's date/time" | ||
42 | //usage: ) | ||
43 | //usage: | ||
44 | //usage:#define touch_example_usage | ||
45 | //usage: "$ ls -l /tmp/foo\n" | ||
46 | //usage: "/bin/ls: /tmp/foo: No such file or directory\n" | ||
47 | //usage: "$ touch /tmp/foo\n" | ||
48 | //usage: "$ ls -l /tmp/foo\n" | ||
49 | //usage: "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n" | ||
50 | |||
22 | /* This is a NOFORK applet. Be very careful! */ | 51 | /* This is a NOFORK applet. Be very careful! */ |
23 | 52 | ||
24 | /* coreutils implements: | 53 | /* coreutils implements: |
diff --git a/include/applets.src.h b/include/applets.src.h index 131fca504..9dd5b6d84 100644 --- a/include/applets.src.h +++ b/include/applets.src.h | |||
@@ -356,7 +356,6 @@ IF_TFTPD(APPLET(tftpd, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | |||
356 | IF_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 356 | IF_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
357 | IF_TIMEOUT(APPLET(timeout, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 357 | IF_TIMEOUT(APPLET(timeout, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
358 | IF_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 358 | IF_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
359 | IF_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_DROP, touch)) | ||
360 | IF_TR(APPLET(tr, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 359 | IF_TR(APPLET(tr, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
361 | IF_TRACEROUTE(APPLET(traceroute, _BB_DIR_USR_BIN, _BB_SUID_MAYBE)) | 360 | IF_TRACEROUTE(APPLET(traceroute, _BB_DIR_USR_BIN, _BB_SUID_MAYBE)) |
362 | IF_TRACEROUTE6(APPLET(traceroute6, _BB_DIR_USR_BIN, _BB_SUID_MAYBE)) | 361 | IF_TRACEROUTE6(APPLET(traceroute6, _BB_DIR_USR_BIN, _BB_SUID_MAYBE)) |
diff --git a/include/usage.src.h b/include/usage.src.h index 7de2c6928..c413fbb91 100644 --- a/include/usage.src.h +++ b/include/usage.src.h | |||
@@ -4005,22 +4005,6 @@ INSERT | |||
4005 | "and display a screenful of them." \ | 4005 | "and display a screenful of them." \ |
4006 | //TODO: add options and keyboard commands | 4006 | //TODO: add options and keyboard commands |
4007 | 4007 | ||
4008 | #define touch_trivial_usage \ | ||
4009 | "[-c] [-d DATE] [-r FILE] FILE [FILE]..." | ||
4010 | #define touch_full_usage "\n\n" \ | ||
4011 | "Update the last-modified date on the given FILE[s]\n" \ | ||
4012 | "\nOptions:" \ | ||
4013 | "\n -c Don't create files" \ | ||
4014 | "\n -d DT Date/time to use" \ | ||
4015 | "\n -r FILE Use FILE's date/time" \ | ||
4016 | |||
4017 | #define touch_example_usage \ | ||
4018 | "$ ls -l /tmp/foo\n" \ | ||
4019 | "/bin/ls: /tmp/foo: No such file or directory\n" \ | ||
4020 | "$ touch /tmp/foo\n" \ | ||
4021 | "$ ls -l /tmp/foo\n" \ | ||
4022 | "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n" | ||
4023 | |||
4024 | #define tr_trivial_usage \ | 4008 | #define tr_trivial_usage \ |
4025 | "[-cds] STRING1 [STRING2]" | 4009 | "[-cds] STRING1 [STRING2]" |
4026 | #define tr_full_usage "\n\n" \ | 4010 | #define tr_full_usage "\n\n" \ |