diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2003-03-19 09:13:01 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2003-03-19 09:13:01 +0000 |
commit | cad5364599eb5062d59e0c397ed638ddd61a8d5d (patch) | |
tree | a318d0f03aa076c74b576ea45dc543a5669e8e91 /debianutils | |
parent | e01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff) | |
download | busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.bz2 busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.zip |
Major coreutils update.
Diffstat (limited to 'debianutils')
-rw-r--r-- | debianutils/mktemp.c | 2 | ||||
-rw-r--r-- | debianutils/readlink.c | 2 | ||||
-rw-r--r-- | debianutils/run_parts.c | 6 | ||||
-rw-r--r-- | debianutils/start_stop_daemon.c | 22 | ||||
-rw-r--r-- | debianutils/which.c | 2 |
5 files changed, 17 insertions, 17 deletions
diff --git a/debianutils/mktemp.c b/debianutils/mktemp.c index bc47d0af0..9d8de2174 100644 --- a/debianutils/mktemp.c +++ b/debianutils/mktemp.c | |||
@@ -32,7 +32,7 @@ | |||
32 | extern int mktemp_main(int argc, char **argv) | 32 | extern int mktemp_main(int argc, char **argv) |
33 | { | 33 | { |
34 | if (argc != 2 && (argc != 3 || strcmp(argv[1], "-q"))) | 34 | if (argc != 2 && (argc != 3 || strcmp(argv[1], "-q"))) |
35 | show_usage(); | 35 | bb_show_usage(); |
36 | if(mkstemp(argv[argc-1]) < 0) | 36 | if(mkstemp(argv[argc-1]) < 0) |
37 | return EXIT_FAILURE; | 37 | return EXIT_FAILURE; |
38 | (void) puts(argv[argc-1]); | 38 | (void) puts(argv[argc-1]); |
diff --git a/debianutils/readlink.c b/debianutils/readlink.c index da5259038..d8d7e8c2d 100644 --- a/debianutils/readlink.c +++ b/debianutils/readlink.c | |||
@@ -32,7 +32,7 @@ int readlink_main(int argc, char **argv) | |||
32 | /* no options, no getopt */ | 32 | /* no options, no getopt */ |
33 | 33 | ||
34 | if (argc != 2) | 34 | if (argc != 2) |
35 | show_usage(); | 35 | bb_show_usage(); |
36 | 36 | ||
37 | buf = xreadlink(argv[1]); | 37 | buf = xreadlink(argv[1]); |
38 | if (!buf) | 38 | if (!buf) |
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index a6ad81096..a941e1fc8 100644 --- a/debianutils/run_parts.c +++ b/debianutils/run_parts.c | |||
@@ -78,7 +78,7 @@ int run_parts_main(int argc, char **argv) | |||
78 | { | 78 | { |
79 | const unsigned int mask = (unsigned int) strtol(optarg, NULL, 8); | 79 | const unsigned int mask = (unsigned int) strtol(optarg, NULL, 8); |
80 | if (mask > 07777) { | 80 | if (mask > 07777) { |
81 | perror_msg_and_die("bad umask value"); | 81 | bb_perror_msg_and_die("bad umask value"); |
82 | } | 82 | } |
83 | umask(mask); | 83 | umask(mask); |
84 | } | 84 | } |
@@ -90,13 +90,13 @@ int run_parts_main(int argc, char **argv) | |||
90 | args[argcount++] = optarg; | 90 | args[argcount++] = optarg; |
91 | break; | 91 | break; |
92 | default: | 92 | default: |
93 | show_usage(); | 93 | bb_show_usage(); |
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
97 | /* We require exactly one argument: the directory name */ | 97 | /* We require exactly one argument: the directory name */ |
98 | if (optind != (argc - 1)) { | 98 | if (optind != (argc - 1)) { |
99 | show_usage(); | 99 | bb_show_usage(); |
100 | } | 100 | } |
101 | 101 | ||
102 | args[0] = argv[optind]; | 102 | args[0] = argv[optind]; |
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index 576526183..a1c2c21c2 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c | |||
@@ -74,7 +74,7 @@ parse_options(int argc, char * const *argv) | |||
74 | break; | 74 | break; |
75 | case 's': | 75 | case 's': |
76 | if (sscanf(optarg, "%d", &signal_nr) != 1) | 76 | if (sscanf(optarg, "%d", &signal_nr) != 1) |
77 | error_msg_and_die ("-s takes a numeric argument"); | 77 | bb_error_msg_and_die ("-s takes a numeric argument"); |
78 | break; | 78 | break; |
79 | case 'u': | 79 | case 'u': |
80 | userspec = optarg; | 80 | userspec = optarg; |
@@ -86,21 +86,21 @@ parse_options(int argc, char * const *argv) | |||
86 | fork_before_exec = 1; | 86 | fork_before_exec = 1; |
87 | break; | 87 | break; |
88 | default: | 88 | default: |
89 | show_usage(); | 89 | bb_show_usage(); |
90 | } | 90 | } |
91 | } | 91 | } |
92 | 92 | ||
93 | if (start == stop) | 93 | if (start == stop) |
94 | error_msg_and_die ("need one of -S or -K"); | 94 | bb_error_msg_and_die ("need one of -S or -K"); |
95 | 95 | ||
96 | if (!execname && !userspec) | 96 | if (!execname && !userspec) |
97 | error_msg_and_die ("need at least one of -x or -u"); | 97 | bb_error_msg_and_die ("need at least one of -x or -u"); |
98 | 98 | ||
99 | if (!startas) | 99 | if (!startas) |
100 | startas = execname; | 100 | startas = execname; |
101 | 101 | ||
102 | if (start && !startas) | 102 | if (start && !startas) |
103 | error_msg_and_die ("-S needs -x or -a"); | 103 | bb_error_msg_and_die ("-S needs -x or -a"); |
104 | } | 104 | } |
105 | 105 | ||
106 | 106 | ||
@@ -185,7 +185,7 @@ do_procfs(void) | |||
185 | 185 | ||
186 | procdir = opendir("/proc"); | 186 | procdir = opendir("/proc"); |
187 | if (!procdir) | 187 | if (!procdir) |
188 | perror_msg_and_die ("opendir /proc"); | 188 | bb_perror_msg_and_die ("opendir /proc"); |
189 | 189 | ||
190 | foundany = 0; | 190 | foundany = 0; |
191 | while ((entry = readdir(procdir)) != NULL) { | 191 | while ((entry = readdir(procdir)) != NULL) { |
@@ -196,7 +196,7 @@ do_procfs(void) | |||
196 | } | 196 | } |
197 | closedir(procdir); | 197 | closedir(procdir); |
198 | if (!foundany) | 198 | if (!foundany) |
199 | error_msg_and_die ("nothing in /proc - not mounted?"); | 199 | bb_error_msg_and_die ("nothing in /proc - not mounted?"); |
200 | } | 200 | } |
201 | 201 | ||
202 | 202 | ||
@@ -214,7 +214,7 @@ do_stop(void) | |||
214 | else if (userspec) | 214 | else if (userspec) |
215 | sprintf(what, "process(es) owned by `%s'", userspec); | 215 | sprintf(what, "process(es) owned by `%s'", userspec); |
216 | else | 216 | else |
217 | error_msg_and_die ("internal error, please report"); | 217 | bb_error_msg_and_die ("internal error, please report"); |
218 | 218 | ||
219 | if (!found) { | 219 | if (!found) { |
220 | printf("no %s found; none killed.\n", what); | 220 | printf("no %s found; none killed.\n", what); |
@@ -225,7 +225,7 @@ do_stop(void) | |||
225 | p->pid = -p->pid; | 225 | p->pid = -p->pid; |
226 | killed++; | 226 | killed++; |
227 | } else { | 227 | } else { |
228 | perror_msg("warning: failed to kill %d:", p->pid); | 228 | bb_perror_msg("warning: failed to kill %d:", p->pid); |
229 | } | 229 | } |
230 | } | 230 | } |
231 | if (killed) { | 231 | if (killed) { |
@@ -262,10 +262,10 @@ start_stop_daemon_main(int argc, char **argv) | |||
262 | *--argv = startas; | 262 | *--argv = startas; |
263 | if (fork_before_exec) { | 263 | if (fork_before_exec) { |
264 | if (daemon(0, 0) == -1) | 264 | if (daemon(0, 0) == -1) |
265 | perror_msg_and_die ("unable to fork"); | 265 | bb_perror_msg_and_die ("unable to fork"); |
266 | } | 266 | } |
267 | setsid(); | 267 | setsid(); |
268 | execv(startas, argv); | 268 | execv(startas, argv); |
269 | perror_msg_and_die ("unable to start %s", startas); | 269 | bb_perror_msg_and_die ("unable to start %s", startas); |
270 | } | 270 | } |
271 | 271 | ||
diff --git a/debianutils/which.c b/debianutils/which.c index b2af5a8ea..fbcfb371b 100644 --- a/debianutils/which.c +++ b/debianutils/which.c | |||
@@ -34,7 +34,7 @@ extern int which_main(int argc, char **argv) | |||
34 | int i, count=1, found, status = EXIT_SUCCESS; | 34 | int i, count=1, found, status = EXIT_SUCCESS; |
35 | 35 | ||
36 | if (argc <= 1 || **(argv + 1) == '-') | 36 | if (argc <= 1 || **(argv + 1) == '-') |
37 | show_usage(); | 37 | bb_show_usage(); |
38 | argc--; | 38 | argc--; |
39 | 39 | ||
40 | path_list = getenv("PATH"); | 40 | path_list = getenv("PATH"); |