*: use "can't" instead of "cannot"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -73,7 +73,7 @@ struct globals {
|
||||
|
||||
static void fatal2_cannot(const char *m1, const char *m2)
|
||||
{
|
||||
bb_perror_msg_and_die("%s: fatal: cannot %s%s", svdir, m1, m2);
|
||||
bb_perror_msg_and_die("%s: fatal: can't %s%s", svdir, m1, m2);
|
||||
/* was exiting 100 */
|
||||
}
|
||||
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)
|
||||
}
|
||||
static void warn2_cannot(const char *m1, const char *m2)
|
||||
{
|
||||
warn3x("cannot ", m1, m2);
|
||||
warn3x("can't ", m1, m2);
|
||||
}
|
||||
#if ENABLE_FEATURE_RUNSVDIR_LOG
|
||||
static void warnx(const char *m1)
|
||||
@@ -256,14 +256,14 @@ int runsvdir_main(int argc UNUSED_PARAM, char **argv)
|
||||
if (rploglen < 7) {
|
||||
warnx("log must have at least seven characters");
|
||||
} else if (piped_pair(logpipe)) {
|
||||
warnx("cannot create pipe for log");
|
||||
warnx("can't create pipe for log");
|
||||
} else {
|
||||
close_on_exec_on(logpipe.rd);
|
||||
close_on_exec_on(logpipe.wr);
|
||||
ndelay_on(logpipe.rd);
|
||||
ndelay_on(logpipe.wr);
|
||||
if (dup2(logpipe.wr, 2) == -1) {
|
||||
warnx("cannot set filedescriptor for log");
|
||||
warnx("can't set filedescriptor for log");
|
||||
} else {
|
||||
pfd[0].fd = logpipe.rd;
|
||||
pfd[0].events = POLLIN;
|
||||
|
26
runit/sv.c
26
runit/sv.c
@@ -228,13 +228,13 @@ static int svstatus_get(void)
|
||||
: failx("runsv not running");
|
||||
return 0;
|
||||
}
|
||||
warn("cannot open supervise/ok");
|
||||
warn("can't open supervise/ok");
|
||||
return -1;
|
||||
}
|
||||
close(fd);
|
||||
fd = open_read("supervise/status");
|
||||
if (fd == -1) {
|
||||
warn("cannot open supervise/status");
|
||||
warn("can't open supervise/status");
|
||||
return -1;
|
||||
}
|
||||
r = read(fd, &svstatus, 20);
|
||||
@@ -243,11 +243,11 @@ static int svstatus_get(void)
|
||||
case 20:
|
||||
break;
|
||||
case -1:
|
||||
warn("cannot read supervise/status");
|
||||
warn("can't read supervise/status");
|
||||
return -1;
|
||||
default:
|
||||
errno = 0;
|
||||
warn("cannot read supervise/status: bad format");
|
||||
warn("can't read supervise/status: bad format");
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
@@ -263,7 +263,7 @@ static unsigned svstatus_print(const char *m)
|
||||
|
||||
if (stat("down", &s) == -1) {
|
||||
if (errno != ENOENT) {
|
||||
bb_perror_msg(WARN"cannot stat %s/down", *service);
|
||||
bb_perror_msg(WARN"can't stat %s/down", *service);
|
||||
return 0;
|
||||
}
|
||||
normallyup = 1;
|
||||
@@ -303,7 +303,7 @@ static int status(const char *unused UNUSED_PARAM)
|
||||
r = svstatus_print(*service);
|
||||
if (chdir("log") == -1) {
|
||||
if (errno != ENOENT) {
|
||||
printf("; log: "WARN"cannot change to log service directory: %s",
|
||||
printf("; log: "WARN"can't change to log service directory: %s",
|
||||
strerror(errno));
|
||||
}
|
||||
} else if (svstatus_get()) {
|
||||
@@ -322,7 +322,7 @@ static int checkscript(void)
|
||||
|
||||
if (stat("check", &s) == -1) {
|
||||
if (errno == ENOENT) return 1;
|
||||
bb_perror_msg(WARN"cannot stat %s/check", *service);
|
||||
bb_perror_msg(WARN"can't stat %s/check", *service);
|
||||
return 0;
|
||||
}
|
||||
/* if (!(s.st_mode & S_IXUSR)) return 1; */
|
||||
@@ -330,11 +330,11 @@ static int checkscript(void)
|
||||
prog[1] = NULL;
|
||||
pid = spawn(prog);
|
||||
if (pid <= 0) {
|
||||
bb_perror_msg(WARN"cannot %s child %s/check", "run", *service);
|
||||
bb_perror_msg(WARN"can't %s child %s/check", "run", *service);
|
||||
return 0;
|
||||
}
|
||||
while (safe_waitpid(pid, &w, 0) == -1) {
|
||||
bb_perror_msg(WARN"cannot %s child %s/check", "wait for", *service);
|
||||
bb_perror_msg(WARN"can't %s child %s/check", "wait for", *service);
|
||||
return 0;
|
||||
}
|
||||
return WEXITSTATUS(w) == 0;
|
||||
@@ -400,7 +400,7 @@ static int control(const char *a)
|
||||
fd = open_write("supervise/control");
|
||||
if (fd == -1) {
|
||||
if (errno != ENODEV)
|
||||
warn("cannot open supervise/control");
|
||||
warn("can't open supervise/control");
|
||||
else
|
||||
*a == 'x' ? ok("runsv not running") : failx("runsv not running");
|
||||
return -1;
|
||||
@@ -409,7 +409,7 @@ static int control(const char *a)
|
||||
r = write(fd, a, l);
|
||||
close(fd);
|
||||
if (r != l) {
|
||||
warn("cannot write to supervise/control");
|
||||
warn("can't write to supervise/control");
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
@@ -541,7 +541,7 @@ int sv_main(int argc UNUSED_PARAM, char **argv)
|
||||
}
|
||||
if (chdir(x) == -1) {
|
||||
chdir_failed_0:
|
||||
fail("cannot change to service directory");
|
||||
fail("can't change to service directory");
|
||||
goto nullify_service_0;
|
||||
}
|
||||
if (act && (act(acts) == -1)) {
|
||||
@@ -569,7 +569,7 @@ int sv_main(int argc UNUSED_PARAM, char **argv)
|
||||
}
|
||||
if (chdir(x) == -1) {
|
||||
chdir_failed:
|
||||
fail("cannot change to service directory");
|
||||
fail("can't change to service directory");
|
||||
goto nullify_service;
|
||||
}
|
||||
if (cbk(acts) != 0)
|
||||
|
Reference in New Issue
Block a user