/* Create a separate backfile to dpkg */
if (rename("/var/lib/dpkg/status", "/var/lib/dpkg/status.udeb.bak") == -1) {
if (errno != ENOENT)
- bb_error_msg_and_die("cannot create backup status file");
+ bb_error_msg_and_die("can't create backup status file");
/* Its ok if renaming the status file fails because status
* file doesnt exist, maybe we are starting from scratch */
bb_error_msg("no status file found, creating new one");
init_archive_deb_control(archive_handle);
deb_file[deb_count]->control_file = deb_extract_control_file_to_buffer(archive_handle, control_list);
if (deb_file[deb_count]->control_file == NULL) {
- bb_error_msg_and_die("cannot extract control file");
+ bb_error_msg_and_die("can't extract control file");
}
deb_file[deb_count]->filename = xstrdup(argv[0]);
package_num = fill_package_struct(deb_file[deb_count]->control_file);
if (sizeof(statbuf->st_size) > 4
&& statbuf->st_size > (off_t)0777777777777LL
) {
- bb_error_msg_and_die("cannot store file '%s' "
+ bb_error_msg_and_die("can't store file '%s' "
"of size %"OFF_FMT"d, aborting",
fileName, statbuf->st_size);
}
/* Store the stat info for the tarball's file, so
* can avoid including the tarball into itself.... */
if (fstat(tbInfo.tarFd, &tbInfo.statBuf) < 0)
- bb_perror_msg_and_die("cannot stat tar file");
+ bb_perror_msg_and_die("can't stat tar file");
#if ENABLE_FEATURE_SEAMLESS_GZ || ENABLE_FEATURE_SEAMLESS_BZ2
if (gzip)
/* if setting time, set it */
if ((opt & OPT_SET) && stime(&tm) < 0) {
- bb_perror_msg("cannot set date");
+ bb_perror_msg("can't set date");
}
}
}
} else if (n < 0) { /* error in get_groups() */
if (!ENABLE_DESKTOP)
- bb_error_msg_and_die("cannot get groups");
+ bb_error_msg_and_die("can't get groups");
else
return EXIT_FAILURE;
}
if (errno != ENOENT) {
#if ENABLE_FEATURE_VERBOSE_CP_MESSAGE
if (errno == ENOTDIR) {
- bb_error_msg("cannot stat '%s': Path has non-directory component", fn);
+ bb_error_msg("can't stat '%s': Path has non-directory component", fn);
return -1;
}
#endif
- bb_perror_msg("cannot stat '%s'", fn);
+ bb_perror_msg("can't stat '%s'", fn);
return -1;
}
return 0;
}
/*
if (fclose_if_not_stdin(pre_computed_stream) == EOF) {
- bb_perror_msg_and_die("cannot close file %s", file_ptr);
+ bb_perror_msg_and_die("can't close file %s", file_ptr);
}
*/
} else {
if (errno != EXDEV
|| (source_exists = cp_mv_stat2(*argv, &source_stat, lstat)) < 1
) {
- bb_perror_msg("cannot rename '%s'", *argv);
+ bb_perror_msg("can't rename '%s'", *argv);
} else {
static const char fmt[] ALIGN1 =
- "cannot overwrite %sdirectory with %sdirectory";
+ "can't overwrite %sdirectory with %sdirectory";
if (dest_exists) {
if (dest_exists == 3) {
}
}
if (unlink(dest) < 0) {
- bb_perror_msg("cannot remove '%s'", dest);
+ bb_perror_msg("can't remove '%s'", dest);
goto RET_1;
}
}
}
if (n_skip)
- bb_error_msg_and_die("cannot skip past end of combined input");
+ bb_error_msg_and_die("can't skip past end of combined input");
}
const char *base = bb_get_last_path_component_strip(*argv);
if (DOT_OR_DOTDOT(base)) {
- bb_error_msg("cannot remove '.' or '..'");
+ bb_error_msg("can't remove '.' or '..'");
} else if (remove_file(*argv, flags) >= 0) {
continue;
}
}
#endif
if (statfs(filename, &statfsbuf) != 0) {
- bb_perror_msg("cannot read file system information for '%s'", filename);
+ bb_perror_msg("can't read file system information for '%s'", filename);
return 0;
}
}
#endif
if ((option_mask32 & OPT_DEREFERENCE ? stat : lstat) (filename, &statbuf) != 0) {
- bb_perror_msg("cannot stat '%s'", filename);
+ bb_perror_msg("can't stat '%s'", filename);
return 0;
}
}
#endif
execvp(startas, argv);
- bb_perror_msg_and_die("cannot start %s", startas);
+ bb_perror_msg_and_die("can't start %s", startas);
}
fstab = setmntent(filename, "r");
if (!fstab) {
- bb_perror_msg("cannot read %s", filename);
+ bb_perror_msg("can't read %s", filename);
return;
}
exit(1);
}
if (blkid_get_cache(&cache, bb_dev_null) < 0) {
- fprintf(stderr, "cannot get blkid cache\n");
+ fprintf(stderr, "Can't get blkid cache\n");
exit(1);
}
/* Cannot proceed without a root inode. */
{ PR_3_NO_ROOT_INODE_ABORT,
- N_("Cannot proceed without a @r.\n"),
+ N_("can't proceed without a @r.\n"),
PROMPT_NONE, PR_FATAL },
/* Internal error: couldn't find dir_info */
printf(_("%s is mounted. "), ctx->filesystem_name);
if (!ctx->interactive)
- bb_error_msg_and_die(_("cannot continue, aborting"));
+ bb_error_msg_and_die(_("can't continue, aborting"));
printf(_("\n\n\007\007\007\007WARNING!!! "
"Running e2fsck on a mounted filesystem may cause\n"
"SEVERE filesystem damage.\007\007\007\n\n"));
* happen, unless the hardware or
* device driver is being bogus.
*/
- bb_error_msg(_("cannot set superblock flags on %s"), ctx->device_name);
+ bb_error_msg(_("can't set superblock flags on %s"), ctx->device_name);
bb_error_msg_and_die(0);
}
retval = e2fsck_run_ext3_journal(ctx);
s = find_fsck(fs->type);
if (s == NULL) {
if (wanted)
- bb_error_msg("cannot check %s: fsck.%s not found",
+ bb_error_msg("can't check %s: fsck.%s not found",
fs->device, fs->type);
return 1;
}
* /proc/partitions isn't found.
*/
if (access("/proc/partitions", R_OK) < 0) {
- bb_perror_msg_and_die("cannot open /proc/partitions "
+ bb_perror_msg_and_die("can't open /proc/partitions "
"(is /proc mounted?)");
}
/*
"must be root to scan for matching filesystems: %s\n", arg);
else
bb_error_msg_and_die(
- "cannot find matching filesystem: %s", arg);
+ "can't find matching filesystem: %s", arg);
}
devices[num_devices++] = dev ? dev : string_copy(arg);
continue;
mke2fs_verbose("Running command: %s\n", buf);
f = popen(buf, "r");
if (!f) {
- bb_perror_msg_and_die("cannot run '%s'", buf);
+ bb_perror_msg_and_die("can't run '%s'", buf);
}
retval = ext2fs_read_bb_FILE(fs, f, bb_list, invalid_block);
pclose(f);
retval = zero_blocks(fs, start, blocks - start,
NULL, &ret_blk, NULL);
- mke2fs_warning_msg(retval, "cannot zero block %u at end of filesystem", ret_blk);
+ mke2fs_warning_msg(retval, "can't zero block %u at end of filesystem", ret_blk);
write_inode_tables(fs);
create_root_dir(fs);
create_lost_and_found(fs);
ts.tm_mday = 0;
#endif
if (ts.tm_mday == 0) {
- bb_error_msg_and_die("Cannot parse date/time specifier: %s", str);
+ bb_error_msg_and_die("can't parse date/time specifier: %s", str);
}
return mktime(&ts);
}
}
retval = ext2fs_check_if_mounted(device_name, &mount_flags);
if (retval)
- bb_error_msg_and_die("cannot determine if %s is mounted", device_name);
+ bb_error_msg_and_die("can't determine if %s is mounted", device_name);
/* Normally we only need to write out the superblock */
fs->flags |= EXT2_FLAG_SUPER_ONLY;
if (force)
return;
if (val == -1)
- bb_perror_msg_and_die("cannot stat %s", device);
+ bb_perror_msg_and_die("can't stat %s", device);
if (!S_ISBLK(s.st_mode)) {
printf("%s is not a block special device.\n", device);
proceed_question();
retval = ext2fs_check_if_mounted(device, &mount_flags);
if (retval) {
- bb_error_msg("cannot determine if %s is mounted", device);
+ bb_error_msg("can't determine if %s is mounted", device);
return;
}
if (mount_flags & EXT2_MF_MOUNTED) {
EXT2_FLAG_JOURNAL_DEV_OK, 0,
fs->blocksize, io_ptr, &jfs);
if (retval)
- bb_error_msg_and_die("cannot journal device %s", journal_device);
+ bb_error_msg_and_die("can't journal device %s", journal_device);
if (!quiet)
printf("Adding journal to device %s: ", journal_device);
fflush(stdout);
retval = ext2fs_add_journal_inode(fs, journal_blocks,
journal_flags);
if (retval)
- bb_error_msg_and_die("cannot create journal");
+ bb_error_msg_and_die("can't create journal");
if (!quiet)
puts("done");
}
*/
nlp = malloc(sizeof(LINE) + lp->len + deltaLen);
if (nlp == NULL) {
- bb_error_msg("cannot get memory for line");
+ bb_error_msg("can't get memory for line");
return;
}
lp = lp->next;
}
- bb_error_msg("cannot find string \"%s\"", str);
+ bb_error_msg("can't find string \"%s\"", str);
return 0;
}
G.outname = xasprintf("%sXXXXXX", argv[i]);
nonstdoutfd = mkstemp(G.outname);
if (-1 == nonstdoutfd)
- bb_perror_msg_and_die("cannot create temp file %s", G.outname);
+ bb_perror_msg_and_die("can't create temp file %s", G.outname);
G.nonstdout = fdopen(nonstdoutfd, "w");
/* Set permissions of output file */
} else if (cnt < size) {
// There was a partial read, shrink unused space text[]
p = text_hole_delete(p + cnt, p + (size - cnt) - 1); // un-do buffer insert
- status_line_bold("cannot read all of file \"%s\"", fn);
+ status_line_bold("can't read all of file \"%s\"", fn);
}
if (cnt >= size)
file_modified++;
n_chars += strlen(*argv) + 1;
}
if (n_max_chars < n_chars) {
- bb_error_msg_and_die("cannot fit single argument within argument list size limit");
+ bb_error_msg_and_die("can't fit single argument within argument list size limit");
}
n_max_chars -= n_chars;
} else {
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, "can't run '%s': %s", cmd[0], strerror(errno));
/* returns if execvp fails */
}
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, "can't load SELinux Policy. "
"Machine is in enforcing mode. Halting now.");
exit(EXIT_FAILURE);
}
#if !ENABLE_FEATURE_NON_POSIX_CP
if (!(flags & (FILEUTILS_FORCE|FILEUTILS_INTERACTIVE))) {
/* Either it exists, or the *path* doesnt exist */
- bb_perror_msg("cannot create '%s'", dest);
+ bb_perror_msg("can't create '%s'", dest);
return -1;
}
#endif
// else: act as if -f is always in effect.
- // We don't want "cannot create" msg, we want unlink to be done
+ // We don't want "can't create" msg, we want unlink to be done
// (silently unless -i). Why? POSIX cp usually succeeds with
// O_TRUNC open of existing file, and user is left ignorantly happy.
// With above block unconditionally enabled, non-POSIX cp
if (e == errno && e == ENOENT) {
/* e == ENOTDIR is similar: path has non-dir component,
* but in this case we don't even reach copy_file() */
- bb_error_msg("cannot create '%s': Path does not exist", dest);
+ bb_error_msg("can't create '%s': Path does not exist", dest);
return -1; /* error */
}
#endif
errno = e; /* do not use errno from unlink */
- bb_perror_msg("cannot create '%s'", dest);
+ bb_perror_msg("can't create '%s'", dest);
return -1; /* error */
}
return 1; /* ok (to try again) */
* Making [sym]links to dangling symlinks works, so... */
if (flags & (FILEUTILS_MAKE_SOFTLINK|FILEUTILS_MAKE_HARDLINK))
goto make_links;
- bb_perror_msg("cannot stat '%s'", source);
+ bb_perror_msg("can't stat '%s'", source);
return -1;
}
if (lstat(dest, &dest_stat) < 0) {
if (errno != ENOENT) {
- bb_perror_msg("cannot stat '%s'", dest);
+ bb_perror_msg("can't stat '%s'", dest);
return -1;
}
} else {
security_context_t con;
if (lgetfilecon(source, &con) >= 0) {
if (setfscreatecon(con) < 0) {
- bb_perror_msg("cannot set setfscreatecon %s", con);
+ bb_perror_msg("can't set setfscreatecon %s", con);
freecon(con);
return -1;
}
} else if (errno == ENOTSUP || errno == ENODATA) {
setfscreatecon_or_die(NULL);
} else {
- bb_perror_msg("cannot lgetfilecon %s", source);
+ bb_perror_msg("can't lgetfilecon %s", source);
return -1;
}
}
mode |= S_IRWXU;
if (mkdir(dest, mode) < 0) {
umask(saved_umask);
- bb_perror_msg("cannot create directory '%s'", dest);
+ bb_perror_msg("can't create directory '%s'", dest);
return -1;
}
umask(saved_umask);
/* need stat info for add_to_ino_dev_hashtable */
if (lstat(dest, &dest_stat) < 0) {
- bb_perror_msg("cannot stat '%s'", dest);
+ bb_perror_msg("can't stat '%s'", dest);
return -1;
}
}
if (!dest_exists
&& chmod(dest, source_stat.st_mode & ~saved_umask) < 0
) {
- bb_perror_msg("cannot preserve %s of '%s'", "permissions", dest);
+ bb_perror_msg("can't preserve %s of '%s'", "permissions", dest);
/* retval = -1; - WRONG! copy *WAS* made */
}
goto preserve_mode_ugid_time;
if (ovr <= 0)
return ovr;
if (lf(source, dest) < 0) {
- bb_perror_msg("cannot create link '%s'", dest);
+ bb_perror_msg("can't create link '%s'", dest);
return -1;
}
}
if (ovr <= 0)
return ovr;
if (link(link_target, dest) < 0) {
- bb_perror_msg("cannot create link '%s'", dest);
+ bb_perror_msg("can't create link '%s'", dest);
return -1;
}
}
retval = -1;
/* Ok, writing side I can understand... */
if (close(dst_fd) < 0) {
- bb_perror_msg("cannot close '%s'", dest);
+ bb_perror_msg("can't close '%s'", dest);
retval = -1;
}
/* ...but read size is already checked by bb_copyfd_eof */
int r = symlink(lpath, dest);
free(lpath);
if (r < 0) {
- bb_perror_msg("cannot create symlink '%s'", dest);
+ bb_perror_msg("can't create symlink '%s'", dest);
return -1;
}
if (flags & FILEUTILS_PRESERVE_STATUS)
if (lchown(dest, source_stat.st_uid, source_stat.st_gid) < 0)
- bb_perror_msg("cannot preserve %s of '%s'", "ownership", dest);
+ bb_perror_msg("can't preserve %s of '%s'", "ownership", dest);
}
/* _Not_ jumping to preserve_mode_ugid_time:
* symlinks don't have those */
|| S_ISSOCK(source_stat.st_mode) || S_ISFIFO(source_stat.st_mode)
) {
if (mknod(dest, source_stat.st_mode, source_stat.st_rdev) < 0) {
- bb_perror_msg("cannot create '%s'", dest);
+ bb_perror_msg("can't create '%s'", dest);
return -1;
}
} else {
times.modtime = source_stat.st_mtime;
/* BTW, utimes sets usec-precision time - just FYI */
if (utime(dest, ×) < 0)
- bb_perror_msg("cannot preserve %s of '%s'", "times", dest);
+ bb_perror_msg("can't preserve %s of '%s'", "times", dest);
if (chown(dest, source_stat.st_uid, source_stat.st_gid) < 0) {
source_stat.st_mode &= ~(S_ISUID | S_ISGID);
- bb_perror_msg("cannot preserve %s of '%s'", "ownership", dest);
+ bb_perror_msg("can't preserve %s of '%s'", "ownership", dest);
}
if (chmod(dest, source_stat.st_mode) < 0)
- bb_perror_msg("cannot preserve %s of '%s'", "permissions", dest);
+ bb_perror_msg("can't preserve %s of '%s'", "permissions", dest);
}
return retval;
int i, r;
if (uname(&name) == -1) {
- bb_perror_msg("cannot get system information");
+ bb_perror_msg("can't get system information");
return 0;
}
*s = c;
} /* while (1) */
- bb_perror_msg("cannot %s directory '%s'", fail_msg, path);
+ bb_perror_msg("can't %s directory '%s'", fail_msg, path);
return -1;
}
if (lstat(path, &path_stat) < 0) {
if (errno != ENOENT) {
- bb_perror_msg("cannot stat '%s'", path);
+ bb_perror_msg("can't stat '%s'", path);
return -1;
}
if (!(flags & FILEUTILS_FORCE)) {
- bb_perror_msg("cannot remove '%s'", path);
+ bb_perror_msg("can't remove '%s'", path);
return -1;
}
return 0;
}
if (closedir(dp) < 0) {
- bb_perror_msg("cannot close '%s'", path);
+ bb_perror_msg("can't close '%s'", path);
return -1;
}
}
if (rmdir(path) < 0) {
- bb_perror_msg("cannot remove '%s'", path);
+ bb_perror_msg("can't remove '%s'", path);
return -1;
}
}
if (unlink(path) < 0) {
- bb_perror_msg("cannot remove '%s'", path);
+ bb_perror_msg("can't remove '%s'", path);
return -1;
}
freecon(current_sid);
#endif
execv(shell, (char **) args);
- bb_perror_msg_and_die("cannot run %s", shell);
+ bb_perror_msg_and_die("can't run %s", shell);
}
if (setfscreatecon(scontext) < 0) {
/* Can be NULL. All known printf implementations
* display "(null)", "<null>" etc */
- bb_perror_msg_and_die("cannot set default "
+ bb_perror_msg_and_die("can't set default "
"file creation context to %s", scontext);
}
}
close(s);
if (s_addr->sa_family == AF_INET)
bb_perror_msg_and_die("%s (%s)",
- "cannot connect to remote host",
+ "can't connect to remote host",
inet_ntoa(((struct sockaddr_in *)s_addr)->sin_addr));
- bb_perror_msg_and_die("cannot connect to remote host");
+ bb_perror_msg_and_die("can't connect to remote host");
}
}
return;
if (get_default_context(username, NULL, user_sid)) {
- bb_error_msg_and_die("cannot get SID for %s", username);
+ bb_error_msg_and_die("can't get SID for %s", username);
}
if (getfilecon(full_tty, &old_tty_sid) < 0) {
bb_perror_msg_and_die("getfilecon(%s) failed", full_tty);
if (!(opt & OPT_lud)) {
if (myuid && !c) { /* passwd starts with '!' */
/* LOGMODE_BOTH */
- bb_error_msg_and_die("cannot change "
+ bb_error_msg_and_die("can't change "
"locked password for %s", name);
}
printf("Changing password for %s\n", name);
}
/* LOGMODE_BOTH */
if (rc < 0)
- bb_error_msg_and_die("cannot update password file %s",
+ bb_error_msg_and_die("can't update password file %s",
filename);
bb_info_msg("Password for %s changed by %s", name, myname);
line->cl_Shell);
line->cl_MailPos = lseek(mailFd, 0, SEEK_CUR);
} else {
- crondlog(ERR20 "cannot create mail file %s for user %s, "
+ crondlog(ERR20 "can't create mail file %s for user %s, "
"discarding output", mailFile, user);
}
}
close(fd);
xrename(new_fname, pas->pw_name);
} else {
- bb_error_msg("cannot create %s/%s",
+ bb_error_msg("can't create %s/%s",
crontab_dir, new_fname);
}
if (tmp_fname)
/* loop */
}
if (fd < 0) {
- bb_error_msg("cannot append to %s/%s",
+ bb_error_msg("can't append to %s/%s",
crontab_dir, CRONUPDATE);
}
return 0;
versus merely warnings if the cast is left off. */
BB_EXECVP(cmd[0], cmd);
xfunc_error_retval = (errno == ENOENT ? 127 : 126);
- bb_error_msg_and_die("cannot run %s", cmd[0]);
+ bb_error_msg_and_die("can't run %s", cmd[0]);
}
/* Have signals kill the child but not self (if possible). */
byte_cnt = sscanf(ethoptarg, "%u.%u.%u.%u",
&passwd[0], &passwd[1], &passwd[2], &passwd[3]);
if (byte_cnt < 4) {
- bb_error_msg("cannot read Wake-On-LAN pass");
+ bb_error_msg("can't read Wake-On-LAN pass");
return 0;
}
// TODO: check invalid numbers >255??
hostinfo = gethostbyaddr((char *) &ipaddr, sizeof(ipaddr), AF_INET);
if (!hostinfo) {
- bb_herror_msg_and_die("cannot find hostname for %s", argv[0]);
+ bb_herror_msg_and_die("can't find hostname for %s", argv[0]);
}
str_tolower(hostinfo->h_name);
bb_error_msg_and_die(bb_msg_requires_arg, "flush");
}
if (filter.family == AF_PACKET) {
- bb_error_msg_and_die("cannot flush link addresses");
+ bb_error_msg_and_die("can't flush link addresses");
}
}
}
if (write(flush_fd, "-1", 2) < 2) {
- bb_perror_msg("cannot flush routing cache");
+ bb_perror_msg("can't flush routing cache");
return;
}
close(flush_fd);
if (filter.tb != -1) {
xrtnl_wilddump_request(&rth, do_ipv6, RTM_GETROUTE);
} else if (rtnl_rtcache_request(&rth, do_ipv6) < 0) {
- bb_perror_msg_and_die("cannot send dump request");
+ bb_perror_msg_and_die("can't send dump request");
}
xrtnl_dump_filter(&rth, print_route, NULL);
}
p->iph.protocol = IPPROTO_IPV6;
} else {
- bb_error_msg_and_die("%s tunnel mode", "cannot guess");
+ bb_error_msg_and_die("%s tunnel mode", "can't guess");
}
} else if (key == ARG_key) {
unsigned uval;
case IPPROTO_IPV6:
return do_add_ioctl(cmd, "sit0", &p);
default:
- bb_error_msg_and_die("cannot determine tunnel mode (ipip, gre or sit)");
+ bb_error_msg_and_die("can't determine tunnel mode (ipip, gre or sit)");
}
}
continue;
type = do_ioctl_get_iftype(name);
if (type == -1) {
- bb_error_msg("cannot get type of [%s]", name);
+ bb_error_msg("can't get type of [%s]", name);
continue;
}
if (type != ARPHRD_TUNNEL && type != ARPHRD_IPGRE && type != ARPHRD_SIT)
status = sendmsg(rtnl->fd, &msg, 0);
if (status < 0) {
- bb_perror_msg("cannot talk to rtnetlink");
+ bb_perror_msg("can't talk to rtnetlink");
goto ret;
}
}
/* out:*/
if (ret <= 0)
- bb_error_msg_and_die("cannot find device \"%s\"", name);
+ bb_error_msg_and_die("can't find device '%s'", name);
return ret;
}
lmac = xmalloc(ETH_ALEN);
ch->mac = ether_aton_r(selector + (strncmp(selector, "mac=", 4) ? 0 : 4), lmac);
if (ch->mac == NULL)
- bb_error_msg_and_die("cannot parse %s", selector);
+ bb_error_msg_and_die("can't parse %s", selector);
#if ENABLE_FEATURE_NAMEIF_EXTENDED
found_selector++;
};
if (strcmp(ifr.ifr_name, ch->ifname) != 0) {
strcpy(ifr.ifr_newname, ch->ifname);
ioctl_or_perror_and_die(ctl_sk, SIOCSIFNAME, &ifr,
- "cannot change ifname %s to %s",
+ "can't change ifname %s to %s",
ifr.ifr_name, ch->ifname);
}
/* Remove list entry of renamed interface */
if (rtnl_dump_request(&rth, obj == OBJ_qdisc ? RTM_GETQDISC :
obj == OBJ_class ? RTM_GETTCLASS : RTM_GETTFILTER,
&msg, sizeof(msg)) < 0)
- bb_simple_perror_msg_and_die("cannot send dump request");
+ bb_simple_perror_msg_and_die("can't send dump request");
xrtnl_dump_filter(&rth, obj == OBJ_qdisc ? print_qdisc :
obj == OBJ_class ? print_class : print_filter,
if (!cert) cert = "./cert.pem";
if (!key) key = cert;
if (matrixSslOpen() < 0)
- fatal("cannot initialize ssl");
+ fatal("can't initialize ssl");
if (matrixSslReadKeys(&keys, cert, key, 0, ca) < 0) {
if (client)
- fatal("cannot read cert, key, or ca file");
- fatal("cannot read cert or key file");
+ fatal("can't read cert, key, or ca file");
+ fatal("can't read cert or key file");
}
if (matrixSslNewSession(&ssl, keys, 0, SSL_FLAGS_SERVER) < 0)
- fatal("cannot create ssl session");
+ fatal("can't create ssl session");
#endif
sig_block(SIGCHLD);
if (opts & OPT_h) {
free_me1 = remote_hostname = xmalloc_sockaddr2host_noport(&remote.u.sa);
if (!remote_hostname) {
- bb_error_msg("cannot look up hostname for %s", remote_addr);
+ bb_error_msg("can't look up hostname for %s", remote_addr);
remote_hostname = remote_addr;
}
}
if (!local_hostname) {
free_me2 = local_hostname = xmalloc_sockaddr2host_noport(&local.u.sa);
if (!local_hostname)
- bb_error_msg_and_die("cannot look up hostname for %s", local_addr);
+ bb_error_msg_and_die("can't look up hostname for %s", local_addr);
}
/* else: local_hostname is not NULL, but is NOT malloced! */
}
}
if (setsockopt_broadcast(s) == -1) {
- bb_perror_msg("cannot enable bcast on raw socket");
+ bb_perror_msg("can't enable bcast on raw socket");
goto ret;
}
/* Create pidfile */
write_pidfile(server_config.pidfile);
- /* if (!..) bb_perror_msg("cannot create pidfile %s", pidfile); */
+ /* if (!..) bb_perror_msg("can't create pidfile %s", pidfile); */
bb_info_msg("%s (v"BB_VER") started", applet_name);
}
}
- bb_error_msg("cannot add option 0x%02x", code);
+ bb_error_msg("can't add option 0x%02x", code);
return 0;
}
{
unsigned char ch = sig; /* use char, avoid dealing with partial writes */
if (write(signal_pipe.wr, &ch, 1) != 1)
- bb_perror_msg("cannot send signal");
+ bb_perror_msg("can't send signal");
}
/* Impossible?
if ((opt & WGET_OPT_CONTINUE) && !fname_out)
- bb_error_msg_and_die("cannot specify continue (-c) without a filename (-O)");
+ bb_error_msg_and_die("can't specify continue (-c) without a filename (-O)");
*/
/* Determine where to start transfer */
continue;
errors++;
if (!quiet)
- bb_perror_msg("cannot kill pid %u", (unsigned)*pl);
+ bb_perror_msg("can't kill pid %u", (unsigned)*pl);
}
}
free(pidList);
bb_error_msg("bad pid '%s'", arg);
errors++;
} else if (kill(pid, signo) != 0) {
- bb_perror_msg("cannot kill pid %d", (int)pid);
+ bb_perror_msg("can't kill pid %d", (int)pid);
errors++;
}
arg = *++argv;
kernel_HZ = get_HZ_by_waiting();
//if (open_read_close("/proc/uptime", buf, sizeof(buf) <= 0)
- // bb_perror_msg_and_die("cannot read %s", "/proc/uptime");
+ // bb_perror_msg_and_die("can't read %s", "/proc/uptime");
//buf[sizeof(buf)-1] = '\0';
///sscanf(buf, "%llu", &seconds_since_boot);
sysinfo(&info);
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)
}
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)
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;
: 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);
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;
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;
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()) {
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; */
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;
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;
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;
}
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)) {
}
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)
}
if (status < 0 && errno != ENODATA) {
if ((option_mask32 & OPT_QUIET) == 0)
- bb_error_msg("cannot obtain security context: %s", fname);
+ bb_error_msg("can't obtain security context: %s", fname);
goto skip;
}
if (file_context == NULL && specified_context == NULL) {
- bb_error_msg("cannot apply partial context to unlabeled file %s", fname);
+ bb_error_msg("can't apply partial context to unlabeled file %s", fname);
goto skip;
}
context = set_security_context_component(file_context,
user, role, type, range);
if (!context) {
- bb_error_msg("cannot compute security context from %s", file_context);
+ bb_error_msg("can't compute security context from %s", file_context);
goto skip;
}
} else {
context_string = context_str(context);
if (!context_string) {
- bb_error_msg("cannot obtain security context in text expression");
+ bb_error_msg("can't obtain security context in text expression");
goto skip;
}
rc = security_get_boolean_names(&names, &len);
if (rc)
- bb_perror_msg_and_die("cannot get boolean names");
+ bb_perror_msg_and_die("can't get boolean names");
if (!len) {
puts("No booleans");
security_context_t cur_context;
if (getcon(&cur_context))
- bb_error_msg_and_die("cannot get current context");
+ bb_error_msg_and_die("can't get current context");
if (compute_trans) {
security_context_t file_context, new_context;
if (getfilecon(command, &file_context) < 0)
- bb_error_msg_and_die("cannot retrieve attributes of '%s'",
+ bb_error_msg_and_die("can't retrieve attributes of '%s'",
command);
if (security_compute_create(cur_context, file_context,
SECCLASS_PROCESS, &new_context))
xlseek(dev_fd, BLOCK_SIZE, SEEK_SET);
if (BLOCK_SIZE != full_write(dev_fd, superblock_buffer, BLOCK_SIZE))
- die("cannot write superblock");
+ die("can't write superblock");
}
static void write_tables(void)
write_superblock();
if (IMAPS * BLOCK_SIZE != write(dev_fd, inode_map, IMAPS * BLOCK_SIZE))
- die("cannot write inode map");
+ die("can't write inode map");
if (ZMAPS * BLOCK_SIZE != write(dev_fd, zone_map, ZMAPS * BLOCK_SIZE))
- die("cannot write zone map");
+ die("can't write zone map");
if (INODE_BUFFER_SIZE != write(dev_fd, inode_buffer, INODE_BUFFER_SIZE))
- die("cannot write inodes");
+ die("can't write inodes");
}
static void get_dirsize(void)
{
xlseek(dev_fd, BLOCK_SIZE, SEEK_SET);
if (BLOCK_SIZE != full_read(dev_fd, superblock_buffer, BLOCK_SIZE))
- die("cannot read superblock");
+ die("can't read superblock");
/* already initialized to:
namelen = 14;
dirsize = 16;
inode_count = xmalloc(INODES + 1);
zone_count = xmalloc(ZONES);
if (IMAPS * BLOCK_SIZE != read(dev_fd, inode_map, IMAPS * BLOCK_SIZE))
- die("cannot read inode map");
+ die("can't read inode map");
if (ZMAPS * BLOCK_SIZE != read(dev_fd, zone_map, ZMAPS * BLOCK_SIZE))
- die("cannot read zone map");
+ die("can't read zone map");
if (INODE_BUFFER_SIZE != read(dev_fd, inode_buffer, INODE_BUFFER_SIZE))
- die("cannot read inodes");
+ die("can't read inodes");
if (NORM_FIRSTZONE != FIRSTZONE) {
printf("warning: firstzone!=norm_firstzone\n");
errors_uncorrected = 1;
ret = shmctl(id, IPC_RMID, NULL);
if (ret) {
- bb_perror_msg("cannot remove id %s", argv[0]);
+ bb_perror_msg("can't remove id %s", argv[0]);
nb_errors++;
}
}
msg_eol = "seek to 0 failed";
xlseek(dev_fd, 0, SEEK_SET);
- msg_eol = "cannot clear boot sector";
+ msg_eol = "can't clear boot sector";
xwrite(dev_fd, G.boot_block_buffer, 512);
msg_eol = "seek to BLOCK_SIZE failed";
xlseek(dev_fd, BLOCK_SIZE, SEEK_SET);
- msg_eol = "cannot write superblock";
+ msg_eol = "can't write superblock";
xwrite(dev_fd, G.superblock_buffer, BLOCK_SIZE);
- msg_eol = "cannot write inode map";
+ msg_eol = "can't write inode map";
xwrite(dev_fd, G.inode_map, SB_IMAPS * BLOCK_SIZE);
- msg_eol = "cannot write zone map";
+ msg_eol = "can't write zone map";
xwrite(dev_fd, G.zone_map, SB_ZMAPS * BLOCK_SIZE);
- msg_eol = "cannot write inodes";
+ msg_eol = "can't write inodes";
xwrite(dev_fd, G.inode_buffer, INODE_BUFFER_SIZE);
msg_eol = "\n";
xmove_fd(xopen(G.device_name, O_RDWR), dev_fd);
if (fstat(dev_fd, &statbuf) < 0)
- bb_error_msg_and_die("cannot stat %s", G.device_name);
+ bb_error_msg_and_die("can't stat %s", G.device_name);
if (!S_ISBLK(statbuf.st_mode))
opt &= ~1; // clear -c (check)
if (errno == EPERM || errno == EACCES)
bb_error_msg(bb_msg_perm_denied_are_you_root);
else
- bb_perror_msg("cannot setup loop device");
+ bb_perror_msg("can't setup loop device");
return errno;
}
}
fstab = setmntent(fstabname, "r");
if (!fstab)
- bb_perror_msg_and_die("cannot read %s", fstabname);
+ bb_perror_msg_and_die("can't read %s", fstabname);
// Loop through entries until we find what we're looking for
memset(mtpair, 0, sizeof(mtpair));
bb_error_msg("current time matches remote time");
else
if (stime(&remote_time) < 0)
- bb_perror_msg_and_die("cannot set time of day");
+ bb_perror_msg_and_die("can't set time of day");
}
if ((flags & 1) == 0)
/* create temporary node to open block device */
unlink(tmp_node);
if (mknod(tmp_node, (S_IFBLK | 0600), devt) != 0)
- bb_perror_msg_and_die("cannot mknod(%s)", tmp_node);
+ bb_perror_msg_and_die("can't mknod(%s)", tmp_node);
id = volume_id_open_node(tmp_node);
unlink(tmp_node);