- fix spelling

This commit is contained in:
Bernhard Reutner-Fischer 2008-07-21 13:46:54 +00:00
parent e1e5174942
commit a53de7f7c2
9 changed files with 41 additions and 41 deletions

View File

@ -276,7 +276,7 @@ static void open_stdio_to_tty(const char* tty_name, int exit_on_failure)
/* fd can be only < 0 or 0: */ /* fd can be only < 0 or 0: */
fd = device_open(tty_name, O_RDWR); fd = device_open(tty_name, O_RDWR);
if (fd) { if (fd) {
message(L_LOG | L_CONSOLE, "Can't open %s: %s", message(L_LOG | L_CONSOLE, "can't open %s: %s",
tty_name, strerror(errno)); tty_name, strerror(errno));
if (exit_on_failure) if (exit_on_failure)
_exit(EXIT_FAILURE); _exit(EXIT_FAILURE);
@ -336,7 +336,7 @@ static void init_exec(const char *command)
ioctl(STDIN_FILENO, TIOCSCTTY, 0 /*only try, don't steal*/); ioctl(STDIN_FILENO, TIOCSCTTY, 0 /*only try, don't steal*/);
} }
BB_EXECVP(cmd[0] + dash, cmd); BB_EXECVP(cmd[0] + dash, cmd);
message(L_LOG | L_CONSOLE, "Cannot run '%s': %s", cmd[0], strerror(errno)); message(L_LOG | L_CONSOLE, "cannot run '%s': %s", cmd[0], strerror(errno));
/* returns if execvp fails */ /* returns if execvp fails */
} }
@ -357,7 +357,7 @@ static pid_t run(const struct init_action *a)
sigprocmask(SIG_SETMASK, &omask, NULL); sigprocmask(SIG_SETMASK, &omask, NULL);
if (pid < 0) if (pid < 0)
message(L_LOG | L_CONSOLE, "Can't fork"); message(L_LOG | L_CONSOLE, "can't fork");
if (pid) if (pid)
return pid; return pid;
@ -391,7 +391,7 @@ static pid_t run(const struct init_action *a)
/* Now fork off another process to just hang around */ /* Now fork off another process to just hang around */
pid = fork(); pid = fork();
if (pid < 0) { if (pid < 0) {
message(L_LOG | L_CONSOLE, "Can't fork"); message(L_LOG | L_CONSOLE, "can't fork");
_exit(EXIT_FAILURE); _exit(EXIT_FAILURE);
} }
@ -412,7 +412,7 @@ static pid_t run(const struct init_action *a)
/* Use a temporary process to steal the controlling tty. */ /* Use a temporary process to steal the controlling tty. */
pid = fork(); pid = fork();
if (pid < 0) { if (pid < 0) {
message(L_LOG | L_CONSOLE, "Can't fork"); message(L_LOG | L_CONSOLE, "can't fork");
_exit(EXIT_FAILURE); _exit(EXIT_FAILURE);
} }
if (pid == 0) { if (pid == 0) {
@ -879,7 +879,7 @@ int init_main(int argc UNUSED_PARAM, char **argv)
BB_EXECVP(argv[0], argv); BB_EXECVP(argv[0], argv);
} else if (enforce > 0) { } else if (enforce > 0) {
/* SELinux in enforcing mode but load_policy failed */ /* SELinux in enforcing mode but load_policy failed */
message(L_CONSOLE, "Cannot load SELinux Policy. " message(L_CONSOLE, "cannot load SELinux Policy. "
"Machine is in enforcing mode. Halting now."); "Machine is in enforcing mode. Halting now.");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }

View File

@ -1568,7 +1568,7 @@ static void send_file_and_exit(const char *url, int what)
f = open(url, O_RDONLY); f = open(url, O_RDONLY);
if (f < 0) { if (f < 0) {
if (DEBUG) if (DEBUG)
bb_perror_msg("cannot open '%s'", url); bb_perror_msg("can't open '%s'", url);
/* Error pages are sent by using send_file_and_exit(SEND_BODY). /* Error pages are sent by using send_file_and_exit(SEND_BODY).
* IOW: it is unsafe to call send_headers_and_exit * IOW: it is unsafe to call send_headers_and_exit
* if what is SEND_BODY! Can recurse! */ * if what is SEND_BODY! Can recurse! */

View File

@ -179,7 +179,7 @@ struct globals {
static void fatal_cannot(const char *m1) NORETURN; static void fatal_cannot(const char *m1) NORETURN;
static void fatal_cannot(const char *m1) static void fatal_cannot(const char *m1)
{ {
bb_perror_msg("fatal: cannot %s", m1); bb_perror_msg("fatal: can't %s", m1);
_exit(151); _exit(151);
} }

View File

@ -145,12 +145,12 @@ static void pause_nomem(void)
} }
static void pause1cannot(const char *m0) static void pause1cannot(const char *m0)
{ {
bb_perror_msg(PAUSE"cannot %s", m0); bb_perror_msg(PAUSE"can't %s", m0);
sleep(3); sleep(3);
} }
static void pause2cannot(const char *m0, const char *m1) static void pause2cannot(const char *m0, const char *m1)
{ {
bb_perror_msg(PAUSE"cannot %s %s", m0, m1); bb_perror_msg(PAUSE"can't %s %s", m0, m1);
sleep(3); sleep(3);
} }
@ -246,7 +246,7 @@ static void processorstart(struct logdir *ld)
fd = open_read("state"); fd = open_read("state");
if (fd == -1) { if (fd == -1) {
if (errno != ENOENT) if (errno != ENOENT)
bb_perror_msg_and_die(FATAL"cannot %s processor %s", "open state for", ld->name); bb_perror_msg_and_die(FATAL"can't %s processor %s", "open state for", ld->name);
close(xopen("state", O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT)); close(xopen("state", O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT));
fd = xopen("state", O_RDONLY|O_NDELAY); fd = xopen("state", O_RDONLY|O_NDELAY);
} }
@ -260,7 +260,7 @@ static void processorstart(struct logdir *ld)
prog[2] = ld->processor; prog[2] = ld->processor;
prog[3] = NULL; prog[3] = NULL;
execv("/bin/sh", prog); execv("/bin/sh", prog);
bb_perror_msg_and_die(FATAL"cannot %s processor %s", "run", ld->name); bb_perror_msg_and_die(FATAL"can't %s processor %s", "run", ld->name);
} }
ld->fnsave[26] = sv_ch; /* ...restore */ ld->fnsave[26] = sv_ch; /* ...restore */
ld->ppid = pid; ld->ppid = pid;
@ -300,7 +300,7 @@ static unsigned processorstop(struct logdir *ld)
pause2cannot("set mode of processed", ld->name); pause2cannot("set mode of processed", ld->name);
ld->fnsave[26] = 'u'; ld->fnsave[26] = 'u';
if (unlink(ld->fnsave) == -1) if (unlink(ld->fnsave) == -1)
bb_error_msg(WARNING"cannot unlink: %s/%s", ld->name, ld->fnsave); bb_error_msg(WARNING"can't unlink: %s/%s", ld->name, ld->fnsave);
while (rename("newstate", "state") == -1) while (rename("newstate", "state") == -1)
pause2cannot("rename state", ld->name); pause2cannot("rename state", ld->name);
if (verbose) if (verbose)
@ -325,7 +325,7 @@ static void rmoldest(struct logdir *ld)
if ((f->d_name[0] == '@') && (strlen(f->d_name) == 27)) { if ((f->d_name[0] == '@') && (strlen(f->d_name) == 27)) {
if (f->d_name[26] == 't') { if (f->d_name[26] == 't') {
if (unlink(f->d_name) == -1) if (unlink(f->d_name) == -1)
warn2("cannot unlink processor leftover", f->d_name); warn2("can't unlink processor leftover", f->d_name);
} else { } else {
++n; ++n;
if (strcmp(f->d_name, oldest) < 0) if (strcmp(f->d_name, oldest) < 0)
@ -335,14 +335,14 @@ static void rmoldest(struct logdir *ld)
} }
} }
if (errno) if (errno)
warn2("cannot read directory", ld->name); warn2("can't read directory", ld->name);
closedir(d); closedir(d);
if (ld->nmax && (n > ld->nmax)) { if (ld->nmax && (n > ld->nmax)) {
if (verbose) if (verbose)
bb_error_msg(INFO"delete: %s/%s", ld->name, oldest); bb_error_msg(INFO"delete: %s/%s", ld->name, oldest);
if ((*oldest == '@') && (unlink(oldest) == -1)) if ((*oldest == '@') && (unlink(oldest) == -1))
warn2("cannot unlink oldest logfile", ld->name); warn2("can't unlink oldest logfile", ld->name);
} }
} }
@ -451,7 +451,7 @@ static int buffer_pwrite(int n, char *s, unsigned len)
if (strcmp(f->d_name, oldest) < 0) if (strcmp(f->d_name, oldest) < 0)
memcpy(oldest, f->d_name, 27); memcpy(oldest, f->d_name, 27);
} }
if (errno) warn2("cannot read directory, want remove old logfile", if (errno) warn2("can't read directory, want remove old logfile",
ld->name); ld->name);
closedir(d); closedir(d);
errno = ENOSPC; errno = ENOSPC;
@ -461,7 +461,7 @@ static int buffer_pwrite(int n, char *s, unsigned len)
ld->name, oldest); ld->name, oldest);
errno = 0; errno = 0;
if (unlink(oldest) == -1) { if (unlink(oldest) == -1) {
warn2("cannot unlink oldest logfile", ld->name); warn2("can't unlink oldest logfile", ld->name);
errno = ENOSPC; errno = ENOSPC;
} }
while (fchdir(fdwdir) == -1) while (fchdir(fdwdir) == -1)
@ -518,13 +518,13 @@ static unsigned logdir_open(struct logdir *ld, const char *fn)
ld->fddir = open(fn, O_RDONLY|O_NDELAY); ld->fddir = open(fn, O_RDONLY|O_NDELAY);
if (ld->fddir == -1) { if (ld->fddir == -1) {
warn2("cannot open log directory", (char*)fn); warn2("can't open log directory", (char*)fn);
return 0; return 0;
} }
close_on_exec_on(ld->fddir); close_on_exec_on(ld->fddir);
if (fchdir(ld->fddir) == -1) { if (fchdir(ld->fddir) == -1) {
logdir_close(ld); logdir_close(ld);
warn2("cannot change directory", (char*)fn); warn2("can't change directory", (char*)fn);
return 0; return 0;
} }
ld->fdlock = open("lock", O_WRONLY|O_NDELAY|O_APPEND|O_CREAT, 0600); ld->fdlock = open("lock", O_WRONLY|O_NDELAY|O_APPEND|O_CREAT, 0600);
@ -532,7 +532,7 @@ static unsigned logdir_open(struct logdir *ld, const char *fn)
|| (lock_exnb(ld->fdlock) == -1) || (lock_exnb(ld->fdlock) == -1)
) { ) {
logdir_close(ld); logdir_close(ld);
warn2("cannot lock directory", (char*)fn); warn2("can't lock directory", (char*)fn);
while (fchdir(fdwdir) == -1) while (fchdir(fdwdir) == -1)
pause1cannot("change to initial working directory"); pause1cannot("change to initial working directory");
return 0; return 0;
@ -651,7 +651,7 @@ static unsigned logdir_open(struct logdir *ld, const char *fn)
} else { } else {
if (errno != ENOENT) { if (errno != ENOENT) {
logdir_close(ld); logdir_close(ld);
warn2("cannot stat current", ld->name); warn2("can't stat current", ld->name);
while (fchdir(fdwdir) == -1) while (fchdir(fdwdir) == -1)
pause1cannot("change to initial working directory"); pause1cannot("change to initial working directory");
return 0; return 0;
@ -754,7 +754,7 @@ static int buffer_pread(/*int fd, */char *s, unsigned len)
if (errno == EINTR) if (errno == EINTR)
continue; continue;
if (errno != EAGAIN) { if (errno != EAGAIN) {
warn("cannot read standard input"); warn("can't read standard input");
break; break;
} }
/* else: EAGAIN - normal, repeat silently */ /* else: EAGAIN - normal, repeat silently */

View File

@ -3534,7 +3534,7 @@ static void
xtcsetpgrp(int fd, pid_t pgrp) xtcsetpgrp(int fd, pid_t pgrp)
{ {
if (tcsetpgrp(fd, pgrp)) if (tcsetpgrp(fd, pgrp))
ash_msg_and_raise_error("cannot set tty process group (%m)"); ash_msg_and_raise_error("can't set tty process group (%m)");
} }
/* /*
@ -4844,9 +4844,9 @@ openredirect(union node *redir)
return f; return f;
ecreate: ecreate:
ash_msg_and_raise_error("cannot create %s: %s", fname, errmsg(errno, "nonexistent directory")); ash_msg_and_raise_error("can't create %s: %s", fname, errmsg(errno, "nonexistent directory"));
eopen: eopen:
ash_msg_and_raise_error("cannot open %s: %s", fname, errmsg(errno, "no such file")); ash_msg_and_raise_error("can't open %s: %s", fname, errmsg(errno, "no such file"));
} }
/* /*

View File

@ -1466,7 +1466,7 @@ static void pseudo_exec_argv(char **ptrs2free, char **argv)
debug_printf_exec("execing '%s'\n", argv[0]); debug_printf_exec("execing '%s'\n", argv[0]);
execvp(argv[0], argv); execvp(argv[0], argv);
bb_perror_msg("cannot exec '%s'", argv[0]); bb_perror_msg("can't exec '%s'", argv[0]);
_exit(EXIT_FAILURE); _exit(EXIT_FAILURE);
} }
@ -4425,7 +4425,7 @@ static int builtin_source(char **argv)
/* XXX search through $PATH is missing */ /* XXX search through $PATH is missing */
input = fopen(argv[1], "r"); input = fopen(argv[1], "r");
if (!input) { if (!input) {
bb_error_msg("cannot open '%s'", argv[1]); bb_error_msg("can't open '%s'", argv[1]);
return EXIT_FAILURE; return EXIT_FAILURE;
} }
close_on_exec_on(fileno(input)); close_on_exec_on(fileno(input));

View File

@ -1268,7 +1268,7 @@ static int newfile(char *s)
f = open(s, O_RDONLY); f = open(s, O_RDONLY);
if (f < 0) { if (f < 0) {
prs(s); prs(s);
err(": cannot open"); err(": can't open");
return 1; return 1;
} }
} }
@ -2770,7 +2770,7 @@ static int forkexec(struct op *t, int *pin, int *pout, int no_fork, char **wp)
DBGPRINTF3(("FORKEXEC: calling vfork()...\n")); DBGPRINTF3(("FORKEXEC: calling vfork()...\n"));
newpid = vfork(); newpid = vfork();
if (newpid == -1) { if (newpid == -1) {
DBGPRINTF(("FORKEXEC: ERROR, cannot vfork()!\n")); DBGPRINTF(("FORKEXEC: ERROR, can't vfork()!\n"));
return -1; return -1;
} }
@ -2820,7 +2820,7 @@ static int forkexec(struct op *t, int *pin, int *pout, int no_fork, char **wp)
if (iopp) { if (iopp) {
if (bltin && bltin != doexec) { if (bltin && bltin != doexec) {
prs(bltin_name); prs(bltin_name);
err(": cannot redirect shell command"); err(": can't redirect shell command");
if (forked) if (forked)
_exit(-1); _exit(-1);
return -1; return -1;
@ -2840,7 +2840,7 @@ static int forkexec(struct op *t, int *pin, int *pout, int no_fork, char **wp)
/* Builtin in pipe: disallowed */ /* Builtin in pipe: disallowed */
/* TODO: allow "exec"? */ /* TODO: allow "exec"? */
prs(bltin_name); prs(bltin_name);
err(": cannot run builtin as part of pipe"); err(": can't run builtin as part of pipe");
if (forked) if (forked)
_exit(-1); _exit(-1);
return -1; return -1;
@ -2955,7 +2955,7 @@ static int iosetup(struct ioword *iop, int pipein, int pipeout)
if (u < 0) { if (u < 0) {
prs(cp); prs(cp);
prs(": cannot "); prs(": can't ");
warn(msg); warn(msg);
return 1; return 1;
} }
@ -3110,7 +3110,7 @@ static const char *rexecve(char *c, char **v, char **envp)
return "not found"; return "not found";
} }
exstat = 126; /* mimic bash */ exstat = 126; /* mimic bash */
return "cannot execute"; return "can't execute";
} }
/* /*
@ -3996,7 +3996,7 @@ static int dollar(int quoted)
switch (c) { switch (c) {
case '=': case '=':
if (isdigit(*s)) { if (isdigit(*s)) {
err("cannot use ${...=...} with $n"); err("can't use ${...=...} with $n");
gflg = 1; gflg = 1;
break; break;
} }

View File

@ -83,9 +83,9 @@ struct partition {
unsigned char size4[4]; /* nr of sectors in partition */ unsigned char size4[4]; /* nr of sectors in partition */
} PACKED; } PACKED;
static const char unable_to_open[] ALIGN1 = "cannot open %s"; static const char unable_to_open[] ALIGN1 = "can't open %s";
static const char unable_to_read[] ALIGN1 = "cannot read from %s"; static const char unable_to_read[] ALIGN1 = "can't read from %s";
static const char unable_to_seek[] ALIGN1 = "cannot seek on %s"; static const char unable_to_seek[] ALIGN1 = "can't seek on %s";
enum label_type { enum label_type {
LABEL_DOS, LABEL_SUN, LABEL_SGI, LABEL_AIX, LABEL_OSF LABEL_DOS, LABEL_SUN, LABEL_SGI, LABEL_AIX, LABEL_OSF

View File

@ -69,7 +69,7 @@ int umount_main(int argc UNUSED_PARAM, char **argv)
fp = setmntent(bb_path_mtab_file, "r"); fp = setmntent(bb_path_mtab_file, "r");
if (!fp) { if (!fp) {
if (opt & OPT_ALL) if (opt & OPT_ALL)
bb_error_msg_and_die("cannot open %s", bb_path_mtab_file); bb_error_msg_and_die("can't open %s", bb_path_mtab_file);
} else { } else {
while (getmntent_r(fp, &me, path, PATH_MAX)) { while (getmntent_r(fp, &me, path, PATH_MAX)) {
/* Match fstype if passed */ /* Match fstype if passed */
@ -132,13 +132,13 @@ int umount_main(int argc UNUSED_PARAM, char **argv)
const char *msg = "%s busy - remounted read-only"; const char *msg = "%s busy - remounted read-only";
curstat = mount(m->device, zapit, NULL, MS_REMOUNT|MS_RDONLY, NULL); curstat = mount(m->device, zapit, NULL, MS_REMOUNT|MS_RDONLY, NULL);
if (curstat) { if (curstat) {
msg = "cannot remount %s read-only"; msg = "can't remount %s read-only";
status = EXIT_FAILURE; status = EXIT_FAILURE;
} }
bb_error_msg(msg, m->device); bb_error_msg(msg, m->device);
} else { } else {
status = EXIT_FAILURE; status = EXIT_FAILURE;
bb_perror_msg("cannot %sumount %s", (doForce ? "forcibly " : ""), zapit); bb_perror_msg("can't %sumount %s", (doForce ? "forcibly " : ""), zapit);
} }
} else { } else {
// De-allocate the loop device. This ioctl should be ignored on // De-allocate the loop device. This ioctl should be ignored on