aboutsummaryrefslogtreecommitdiff
path: root/runit/sv.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-11-13 09:08:27 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-11-13 09:08:27 +0100
commit6331cf059ccfdf35f4e5a505cbae885094cc41b0 (patch)
treeccb4b4f0d96d9636861a75f7fc6c97b8b15bd306 /runit/sv.c
parentf4fee418ae9f5308b4d32bc8d4e618f779f3203f (diff)
downloadbusybox-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/sv.c')
-rw-r--r--runit/sv.c26
1 files changed, 13 insertions, 13 deletions
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)