/* fd can be only < 0 or 0: */
fd = device_open(tty_name, O_RDWR);
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));
if (exit_on_failure)
_exit(EXIT_FAILURE);
ioctl(STDIN_FILENO, TIOCSCTTY, 0 /*only try, don't steal*/);
}
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 */
}
sigprocmask(SIG_SETMASK, &omask, NULL);
if (pid < 0)
- message(L_LOG | L_CONSOLE, "Can't fork");
+ message(L_LOG | L_CONSOLE, "can't fork");
if (pid)
return pid;
/* Now fork off another process to just hang around */
pid = fork();
if (pid < 0) {
- message(L_LOG | L_CONSOLE, "Can't fork");
+ message(L_LOG | L_CONSOLE, "can't fork");
_exit(EXIT_FAILURE);
}
/* Use a temporary process to steal the controlling tty. */
pid = fork();
if (pid < 0) {
- message(L_LOG | L_CONSOLE, "Can't fork");
+ message(L_LOG | L_CONSOLE, "can't fork");
_exit(EXIT_FAILURE);
}
if (pid == 0) {
BB_EXECVP(argv[0], argv);
} else if (enforce > 0) {
/* 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.");
exit(EXIT_FAILURE);
}
f = open(url, O_RDONLY);
if (f < 0) {
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).
* IOW: it is unsafe to call send_headers_and_exit
* if what is SEND_BODY! Can recurse! */
static void fatal_cannot(const char *m1) NORETURN;
static void fatal_cannot(const char *m1)
{
- bb_perror_msg("fatal: cannot %s", m1);
+ bb_perror_msg("fatal: can't %s", m1);
_exit(151);
}
}
static void pause1cannot(const char *m0)
{
- bb_perror_msg(PAUSE"cannot %s", m0);
+ bb_perror_msg(PAUSE"can't %s", m0);
sleep(3);
}
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);
}
fd = open_read("state");
if (fd == -1) {
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));
fd = xopen("state", O_RDONLY|O_NDELAY);
}
prog[2] = ld->processor;
prog[3] = NULL;
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->ppid = pid;
pause2cannot("set mode of processed", ld->name);
ld->fnsave[26] = 'u';
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)
pause2cannot("rename state", ld->name);
if (verbose)
if ((f->d_name[0] == '@') && (strlen(f->d_name) == 27)) {
if (f->d_name[26] == 't') {
if (unlink(f->d_name) == -1)
- warn2("cannot unlink processor leftover", f->d_name);
+ warn2("can't unlink processor leftover", f->d_name);
} else {
++n;
if (strcmp(f->d_name, oldest) < 0)
}
}
if (errno)
- warn2("cannot read directory", ld->name);
+ warn2("can't read directory", ld->name);
closedir(d);
if (ld->nmax && (n > ld->nmax)) {
if (verbose)
bb_error_msg(INFO"delete: %s/%s", ld->name, oldest);
if ((*oldest == '@') && (unlink(oldest) == -1))
- warn2("cannot unlink oldest logfile", ld->name);
+ warn2("can't unlink oldest logfile", ld->name);
}
}
if (strcmp(f->d_name, oldest) < 0)
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);
closedir(d);
errno = ENOSPC;
ld->name, oldest);
errno = 0;
if (unlink(oldest) == -1) {
- warn2("cannot unlink oldest logfile", ld->name);
+ warn2("can't unlink oldest logfile", ld->name);
errno = ENOSPC;
}
while (fchdir(fdwdir) == -1)
ld->fddir = open(fn, O_RDONLY|O_NDELAY);
if (ld->fddir == -1) {
- warn2("cannot open log directory", (char*)fn);
+ warn2("can't open log directory", (char*)fn);
return 0;
}
close_on_exec_on(ld->fddir);
if (fchdir(ld->fddir) == -1) {
logdir_close(ld);
- warn2("cannot change directory", (char*)fn);
+ warn2("can't change directory", (char*)fn);
return 0;
}
ld->fdlock = open("lock", O_WRONLY|O_NDELAY|O_APPEND|O_CREAT, 0600);
|| (lock_exnb(ld->fdlock) == -1)
) {
logdir_close(ld);
- warn2("cannot lock directory", (char*)fn);
+ warn2("can't lock directory", (char*)fn);
while (fchdir(fdwdir) == -1)
pause1cannot("change to initial working directory");
return 0;
} else {
if (errno != ENOENT) {
logdir_close(ld);
- warn2("cannot stat current", ld->name);
+ warn2("can't stat current", ld->name);
while (fchdir(fdwdir) == -1)
pause1cannot("change to initial working directory");
return 0;
if (errno == EINTR)
continue;
if (errno != EAGAIN) {
- warn("cannot read standard input");
+ warn("can't read standard input");
break;
}
/* else: EAGAIN - normal, repeat silently */
xtcsetpgrp(int fd, pid_t 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)");
}
/*
return f;
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:
- 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"));
}
/*
debug_printf_exec("execing '%s'\n", argv[0]);
execvp(argv[0], argv);
- bb_perror_msg("cannot exec '%s'", argv[0]);
+ bb_perror_msg("can't exec '%s'", argv[0]);
_exit(EXIT_FAILURE);
}
/* XXX search through $PATH is missing */
input = fopen(argv[1], "r");
if (!input) {
- bb_error_msg("cannot open '%s'", argv[1]);
+ bb_error_msg("can't open '%s'", argv[1]);
return EXIT_FAILURE;
}
close_on_exec_on(fileno(input));
f = open(s, O_RDONLY);
if (f < 0) {
prs(s);
- err(": cannot open");
+ err(": can't open");
return 1;
}
}
DBGPRINTF3(("FORKEXEC: calling vfork()...\n"));
newpid = vfork();
if (newpid == -1) {
- DBGPRINTF(("FORKEXEC: ERROR, cannot vfork()!\n"));
+ DBGPRINTF(("FORKEXEC: ERROR, can't vfork()!\n"));
return -1;
}
if (iopp) {
if (bltin && bltin != doexec) {
prs(bltin_name);
- err(": cannot redirect shell command");
+ err(": can't redirect shell command");
if (forked)
_exit(-1);
return -1;
/* Builtin in pipe: disallowed */
/* TODO: allow "exec"? */
prs(bltin_name);
- err(": cannot run builtin as part of pipe");
+ err(": can't run builtin as part of pipe");
if (forked)
_exit(-1);
return -1;
if (u < 0) {
prs(cp);
- prs(": cannot ");
+ prs(": can't ");
warn(msg);
return 1;
}
return "not found";
}
exstat = 126; /* mimic bash */
- return "cannot execute";
+ return "can't execute";
}
/*
switch (c) {
case '=':
if (isdigit(*s)) {
- err("cannot use ${...=...} with $n");
+ err("can't use ${...=...} with $n");
gflg = 1;
break;
}
unsigned char size4[4]; /* nr of sectors in partition */
} PACKED;
-static const char unable_to_open[] ALIGN1 = "cannot open %s";
-static const char unable_to_read[] ALIGN1 = "cannot read from %s";
-static const char unable_to_seek[] ALIGN1 = "cannot seek on %s";
+static const char unable_to_open[] ALIGN1 = "can't open %s";
+static const char unable_to_read[] ALIGN1 = "can't read from %s";
+static const char unable_to_seek[] ALIGN1 = "can't seek on %s";
enum label_type {
LABEL_DOS, LABEL_SUN, LABEL_SGI, LABEL_AIX, LABEL_OSF
fp = setmntent(bb_path_mtab_file, "r");
if (!fp) {
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 {
while (getmntent_r(fp, &me, path, PATH_MAX)) {
/* Match fstype if passed */
const char *msg = "%s busy - remounted read-only";
curstat = mount(m->device, zapit, NULL, MS_REMOUNT|MS_RDONLY, NULL);
if (curstat) {
- msg = "cannot remount %s read-only";
+ msg = "can't remount %s read-only";
status = EXIT_FAILURE;
}
bb_error_msg(msg, m->device);
} else {
status = EXIT_FAILURE;
- bb_perror_msg("cannot %sumount %s", (doForce ? "forcibly " : ""), zapit);
+ bb_perror_msg("can't %sumount %s", (doForce ? "forcibly " : ""), zapit);
}
} else {
// De-allocate the loop device. This ioctl should be ignored on