diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-11-23 14:46:56 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-11-23 14:46:56 +0100 |
commit | af3f42011628585cd5c8f5c1fd4b43f2e370a23d (patch) | |
tree | 125ee16d5080008fcf459ad55d91af1dcd488ef9 /coreutils/touch.c | |
parent | 5b966c6180c139fba6846d632fd9bc0c34a8e1bc (diff) | |
download | busybox-w32-af3f42011628585cd5c8f5c1fd4b43f2e370a23d.tar.gz busybox-w32-af3f42011628585cd5c8f5c1fd4b43f2e370a23d.tar.bz2 busybox-w32-af3f42011628585cd5c8f5c1fd4b43f2e370a23d.zip |
Convert all coreutils/* applets to "new style" applet definitions
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/touch.c')
-rw-r--r-- | coreutils/touch.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/coreutils/touch.c b/coreutils/touch.c index 293a96890..92d5a718a 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c | |||
@@ -6,19 +6,12 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | |||
10 | /* BB_AUDIT SUSv3 _NOT_ compliant -- options -a, -m not supported. */ | ||
11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/touch.html */ | ||
12 | |||
13 | /* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org) | 9 | /* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org) |
14 | * | 10 | * |
15 | * Previous version called open() and then utime(). While this will be | 11 | * Previous version called open() and then utime(). While this will be |
16 | * be necessary to implement -r and -t, it currently only makes things bigger. | 12 | * be necessary to implement -r and -t, it currently only makes things bigger. |
17 | * Also, exiting on a failure was a bug. All args should be processed. | 13 | * Also, exiting on a failure was a bug. All args should be processed. |
18 | */ | 14 | */ |
19 | |||
20 | #include "libbb.h" | ||
21 | |||
22 | //config:config TOUCH | 15 | //config:config TOUCH |
23 | //config: bool "touch" | 16 | //config: bool "touch" |
24 | //config: default y | 17 | //config: default y |
@@ -45,6 +38,9 @@ | |||
45 | 38 | ||
46 | //kbuild:lib-$(CONFIG_TOUCH) += touch.o | 39 | //kbuild:lib-$(CONFIG_TOUCH) += touch.o |
47 | 40 | ||
41 | /* BB_AUDIT SUSv3 _NOT_ compliant -- options -a, -m not supported. */ | ||
42 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/touch.html */ | ||
43 | |||
48 | //usage:#define touch_trivial_usage | 44 | //usage:#define touch_trivial_usage |
49 | //usage: "[-c]" IF_FEATURE_TOUCH_SUSV3(" [-d DATE] [-t DATE] [-r FILE]") " FILE..." | 45 | //usage: "[-c]" IF_FEATURE_TOUCH_SUSV3(" [-d DATE] [-t DATE] [-r FILE]") " FILE..." |
50 | //usage:#define touch_full_usage "\n\n" | 46 | //usage:#define touch_full_usage "\n\n" |
@@ -66,8 +62,6 @@ | |||
66 | //usage: "$ ls -l /tmp/foo\n" | 62 | //usage: "$ ls -l /tmp/foo\n" |
67 | //usage: "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n" | 63 | //usage: "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n" |
68 | 64 | ||
69 | /* This is a NOFORK applet. Be very careful! */ | ||
70 | |||
71 | /* coreutils implements: | 65 | /* coreutils implements: |
72 | * -a change only the access time | 66 | * -a change only the access time |
73 | * -c, --no-create | 67 | * -c, --no-create |
@@ -85,6 +79,8 @@ | |||
85 | * change the specified time: WORD is access, atime, or use | 79 | * change the specified time: WORD is access, atime, or use |
86 | */ | 80 | */ |
87 | 81 | ||
82 | #include "libbb.h" | ||
83 | |||
88 | int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 84 | int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
89 | int touch_main(int argc UNUSED_PARAM, char **argv) | 85 | int touch_main(int argc UNUSED_PARAM, char **argv) |
90 | { | 86 | { |