diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-13 09:08:27 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-13 09:08:27 +0100 |
commit | 6331cf059ccfdf35f4e5a505cbae885094cc41b0 (patch) | |
tree | ccb4b4f0d96d9636861a75f7fc6c97b8b15bd306 /runit | |
parent | f4fee418ae9f5308b4d32bc8d4e618f779f3203f (diff) | |
download | busybox-w32-6331cf059ccfdf35f4e5a505cbae885094cc41b0.tar.gz busybox-w32-6331cf059ccfdf35f4e5a505cbae885094cc41b0.tar.bz2 busybox-w32-6331cf059ccfdf35f4e5a505cbae885094cc41b0.zip |
*: use "can't" instead of "cannot"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'runit')
-rw-r--r-- | runit/runsvdir.c | 8 | ||||
-rw-r--r-- | runit/sv.c | 26 |
2 files changed, 17 insertions, 17 deletions
diff --git a/runit/runsvdir.c b/runit/runsvdir.c index 492c2a57b..f6aaeb7d4 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c | |||
@@ -73,7 +73,7 @@ struct globals { | |||
73 | 73 | ||
74 | static void fatal2_cannot(const char *m1, const char *m2) | 74 | static void fatal2_cannot(const char *m1, const char *m2) |
75 | { | 75 | { |
76 | bb_perror_msg_and_die("%s: fatal: cannot %s%s", svdir, m1, m2); | 76 | bb_perror_msg_and_die("%s: fatal: can't %s%s", svdir, m1, m2); |
77 | /* was exiting 100 */ | 77 | /* was exiting 100 */ |
78 | } | 78 | } |
79 | static void warn3x(const char *m1, const char *m2, const char *m3) | 79 | static void warn3x(const char *m1, const char *m2, const char *m3) |
@@ -82,7 +82,7 @@ static void warn3x(const char *m1, const char *m2, const char *m3) | |||
82 | } | 82 | } |
83 | static void warn2_cannot(const char *m1, const char *m2) | 83 | static void warn2_cannot(const char *m1, const char *m2) |
84 | { | 84 | { |
85 | warn3x("cannot ", m1, m2); | 85 | warn3x("can't ", m1, m2); |
86 | } | 86 | } |
87 | #if ENABLE_FEATURE_RUNSVDIR_LOG | 87 | #if ENABLE_FEATURE_RUNSVDIR_LOG |
88 | static void warnx(const char *m1) | 88 | static void warnx(const char *m1) |
@@ -256,14 +256,14 @@ int runsvdir_main(int argc UNUSED_PARAM, char **argv) | |||
256 | if (rploglen < 7) { | 256 | if (rploglen < 7) { |
257 | warnx("log must have at least seven characters"); | 257 | warnx("log must have at least seven characters"); |
258 | } else if (piped_pair(logpipe)) { | 258 | } else if (piped_pair(logpipe)) { |
259 | warnx("cannot create pipe for log"); | 259 | warnx("can't create pipe for log"); |
260 | } else { | 260 | } else { |
261 | close_on_exec_on(logpipe.rd); | 261 | close_on_exec_on(logpipe.rd); |
262 | close_on_exec_on(logpipe.wr); | 262 | close_on_exec_on(logpipe.wr); |
263 | ndelay_on(logpipe.rd); | 263 | ndelay_on(logpipe.rd); |
264 | ndelay_on(logpipe.wr); | 264 | ndelay_on(logpipe.wr); |
265 | if (dup2(logpipe.wr, 2) == -1) { | 265 | if (dup2(logpipe.wr, 2) == -1) { |
266 | warnx("cannot set filedescriptor for log"); | 266 | warnx("can't set filedescriptor for log"); |
267 | } else { | 267 | } else { |
268 | pfd[0].fd = logpipe.rd; | 268 | pfd[0].fd = logpipe.rd; |
269 | pfd[0].events = POLLIN; | 269 | pfd[0].events = POLLIN; |
diff --git a/runit/sv.c b/runit/sv.c index 732c33cea..96ebb749d 100644 --- a/runit/sv.c +++ b/runit/sv.c | |||
@@ -228,13 +228,13 @@ static int svstatus_get(void) | |||
228 | : failx("runsv not running"); | 228 | : failx("runsv not running"); |
229 | return 0; | 229 | return 0; |
230 | } | 230 | } |
231 | warn("cannot open supervise/ok"); | 231 | warn("can't open supervise/ok"); |
232 | return -1; | 232 | return -1; |
233 | } | 233 | } |
234 | close(fd); | 234 | close(fd); |
235 | fd = open_read("supervise/status"); | 235 | fd = open_read("supervise/status"); |
236 | if (fd == -1) { | 236 | if (fd == -1) { |
237 | warn("cannot open supervise/status"); | 237 | warn("can't open supervise/status"); |
238 | return -1; | 238 | return -1; |
239 | } | 239 | } |
240 | r = read(fd, &svstatus, 20); | 240 | r = read(fd, &svstatus, 20); |
@@ -243,11 +243,11 @@ static int svstatus_get(void) | |||
243 | case 20: | 243 | case 20: |
244 | break; | 244 | break; |
245 | case -1: | 245 | case -1: |
246 | warn("cannot read supervise/status"); | 246 | warn("can't read supervise/status"); |
247 | return -1; | 247 | return -1; |
248 | default: | 248 | default: |
249 | errno = 0; | 249 | errno = 0; |
250 | warn("cannot read supervise/status: bad format"); | 250 | warn("can't read supervise/status: bad format"); |
251 | return -1; | 251 | return -1; |
252 | } | 252 | } |
253 | return 1; | 253 | return 1; |
@@ -263,7 +263,7 @@ static unsigned svstatus_print(const char *m) | |||
263 | 263 | ||
264 | if (stat("down", &s) == -1) { | 264 | if (stat("down", &s) == -1) { |
265 | if (errno != ENOENT) { | 265 | if (errno != ENOENT) { |
266 | bb_perror_msg(WARN"cannot stat %s/down", *service); | 266 | bb_perror_msg(WARN"can't stat %s/down", *service); |
267 | return 0; | 267 | return 0; |
268 | } | 268 | } |
269 | normallyup = 1; | 269 | normallyup = 1; |
@@ -303,7 +303,7 @@ static int status(const char *unused UNUSED_PARAM) | |||
303 | r = svstatus_print(*service); | 303 | r = svstatus_print(*service); |
304 | if (chdir("log") == -1) { | 304 | if (chdir("log") == -1) { |
305 | if (errno != ENOENT) { | 305 | if (errno != ENOENT) { |
306 | printf("; log: "WARN"cannot change to log service directory: %s", | 306 | printf("; log: "WARN"can't change to log service directory: %s", |
307 | strerror(errno)); | 307 | strerror(errno)); |
308 | } | 308 | } |
309 | } else if (svstatus_get()) { | 309 | } else if (svstatus_get()) { |
@@ -322,7 +322,7 @@ static int checkscript(void) | |||
322 | 322 | ||
323 | if (stat("check", &s) == -1) { | 323 | if (stat("check", &s) == -1) { |
324 | if (errno == ENOENT) return 1; | 324 | if (errno == ENOENT) return 1; |
325 | bb_perror_msg(WARN"cannot stat %s/check", *service); | 325 | bb_perror_msg(WARN"can't stat %s/check", *service); |
326 | return 0; | 326 | return 0; |
327 | } | 327 | } |
328 | /* if (!(s.st_mode & S_IXUSR)) return 1; */ | 328 | /* if (!(s.st_mode & S_IXUSR)) return 1; */ |
@@ -330,11 +330,11 @@ static int checkscript(void) | |||
330 | prog[1] = NULL; | 330 | prog[1] = NULL; |
331 | pid = spawn(prog); | 331 | pid = spawn(prog); |
332 | if (pid <= 0) { | 332 | if (pid <= 0) { |
333 | bb_perror_msg(WARN"cannot %s child %s/check", "run", *service); | 333 | bb_perror_msg(WARN"can't %s child %s/check", "run", *service); |
334 | return 0; | 334 | return 0; |
335 | } | 335 | } |
336 | while (safe_waitpid(pid, &w, 0) == -1) { | 336 | while (safe_waitpid(pid, &w, 0) == -1) { |
337 | bb_perror_msg(WARN"cannot %s child %s/check", "wait for", *service); | 337 | bb_perror_msg(WARN"can't %s child %s/check", "wait for", *service); |
338 | return 0; | 338 | return 0; |
339 | } | 339 | } |
340 | return WEXITSTATUS(w) == 0; | 340 | return WEXITSTATUS(w) == 0; |
@@ -400,7 +400,7 @@ static int control(const char *a) | |||
400 | fd = open_write("supervise/control"); | 400 | fd = open_write("supervise/control"); |
401 | if (fd == -1) { | 401 | if (fd == -1) { |
402 | if (errno != ENODEV) | 402 | if (errno != ENODEV) |
403 | warn("cannot open supervise/control"); | 403 | warn("can't open supervise/control"); |
404 | else | 404 | else |
405 | *a == 'x' ? ok("runsv not running") : failx("runsv not running"); | 405 | *a == 'x' ? ok("runsv not running") : failx("runsv not running"); |
406 | return -1; | 406 | return -1; |
@@ -409,7 +409,7 @@ static int control(const char *a) | |||
409 | r = write(fd, a, l); | 409 | r = write(fd, a, l); |
410 | close(fd); | 410 | close(fd); |
411 | if (r != l) { | 411 | if (r != l) { |
412 | warn("cannot write to supervise/control"); | 412 | warn("can't write to supervise/control"); |
413 | return -1; | 413 | return -1; |
414 | } | 414 | } |
415 | return 1; | 415 | return 1; |
@@ -541,7 +541,7 @@ int sv_main(int argc UNUSED_PARAM, char **argv) | |||
541 | } | 541 | } |
542 | if (chdir(x) == -1) { | 542 | if (chdir(x) == -1) { |
543 | chdir_failed_0: | 543 | chdir_failed_0: |
544 | fail("cannot change to service directory"); | 544 | fail("can't change to service directory"); |
545 | goto nullify_service_0; | 545 | goto nullify_service_0; |
546 | } | 546 | } |
547 | if (act && (act(acts) == -1)) { | 547 | if (act && (act(acts) == -1)) { |
@@ -569,7 +569,7 @@ int sv_main(int argc UNUSED_PARAM, char **argv) | |||
569 | } | 569 | } |
570 | if (chdir(x) == -1) { | 570 | if (chdir(x) == -1) { |
571 | chdir_failed: | 571 | chdir_failed: |
572 | fail("cannot change to service directory"); | 572 | fail("can't change to service directory"); |
573 | goto nullify_service; | 573 | goto nullify_service; |
574 | } | 574 | } |
575 | if (cbk(acts) != 0) | 575 | if (cbk(acts) != 0) |