diff options
author | Denys Vlasenko | 2009-11-13 09:08:27 +0100 |
---|---|---|
committer | Denys Vlasenko | 2009-11-13 09:08:27 +0100 |
commit | 6331cf059ccfdf35f4e5a505cbae885094cc41b0 (patch) | |
tree | ccb4b4f0d96d9636861a75f7fc6c97b8b15bd306 /libbb | |
parent | f4fee418ae9f5308b4d32bc8d4e618f779f3203f (diff) | |
download | busybox-6331cf059ccfdf35f4e5a505cbae885094cc41b0.zip busybox-6331cf059ccfdf35f4e5a505cbae885094cc41b0.tar.gz |
*: use "can't" instead of "cannot"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/copy_file.c | 40 | ||||
-rw-r--r-- | libbb/kernel_version.c | 2 | ||||
-rw-r--r-- | libbb/make_directory.c | 2 | ||||
-rw-r--r-- | libbb/remove_file.c | 10 | ||||
-rw-r--r-- | libbb/run_shell.c | 2 | ||||
-rw-r--r-- | libbb/selinux_common.c | 2 | ||||
-rw-r--r-- | libbb/xconnect.c | 4 |
7 files changed, 31 insertions, 31 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c index ae70cbc..ff29885 100644 --- a/libbb/copy_file.c +++ b/libbb/copy_file.c @@ -30,12 +30,12 @@ static int ask_and_unlink(const char *dest, int flags) #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 @@ -56,12 +56,12 @@ static int ask_and_unlink(const char *dest, int flags) 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) */ @@ -90,13 +90,13 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) * 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 { @@ -114,14 +114,14 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) 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; } } @@ -166,13 +166,13 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) 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; } } @@ -204,7 +204,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) 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; @@ -222,7 +222,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) 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; } } @@ -257,7 +257,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) 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; } } @@ -318,7 +318,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) 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 */ @@ -345,12 +345,12 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) 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 */ @@ -360,7 +360,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) || 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 { @@ -380,13 +380,13 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) 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; diff --git a/libbb/kernel_version.c b/libbb/kernel_version.c index 937d2db..cc23712 100644 --- a/libbb/kernel_version.c +++ b/libbb/kernel_version.c @@ -24,7 +24,7 @@ int FAST_FUNC get_linux_version_code(void) int i, r; if (uname(&name) == -1) { - bb_perror_msg("cannot get system information"); + bb_perror_msg("can't get system information"); return 0; } diff --git a/libbb/make_directory.c b/libbb/make_directory.c index 391493c..a4ad599 100644 --- a/libbb/make_directory.c +++ b/libbb/make_directory.c @@ -93,6 +93,6 @@ int FAST_FUNC bb_make_directory(char *path, long mode, int flags) *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; } diff --git a/libbb/remove_file.c b/libbb/remove_file.c index 8b14f07..da14885 100644 --- a/libbb/remove_file.c +++ b/libbb/remove_file.c @@ -17,11 +17,11 @@ int FAST_FUNC remove_file(const char *path, int flags) 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; @@ -63,7 +63,7 @@ int FAST_FUNC remove_file(const char *path, int flags) } if (closedir(dp) < 0) { - bb_perror_msg("cannot close '%s'", path); + bb_perror_msg("can't close '%s'", path); return -1; } @@ -74,7 +74,7 @@ int FAST_FUNC remove_file(const char *path, int flags) } if (rmdir(path) < 0) { - bb_perror_msg("cannot remove '%s'", path); + bb_perror_msg("can't remove '%s'", path); return -1; } @@ -94,7 +94,7 @@ int FAST_FUNC remove_file(const char *path, int flags) } if (unlink(path) < 0) { - bb_perror_msg("cannot remove '%s'", path); + bb_perror_msg("can't remove '%s'", path); return -1; } diff --git a/libbb/run_shell.c b/libbb/run_shell.c index 2ccb3a1..de7b92a 100644 --- a/libbb/run_shell.c +++ b/libbb/run_shell.c @@ -86,5 +86,5 @@ void FAST_FUNC run_shell(const char *shell, int loginshell, const char *command, 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); } diff --git a/libbb/selinux_common.c b/libbb/selinux_common.c index 275a761..7b56967 100644 --- a/libbb/selinux_common.c +++ b/libbb/selinux_common.c @@ -36,7 +36,7 @@ void FAST_FUNC setfscreatecon_or_die(security_context_t scontext) 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); } } diff --git a/libbb/xconnect.c b/libbb/xconnect.c index a184669..f018ca9 100644 --- a/libbb/xconnect.c +++ b/libbb/xconnect.c @@ -63,9 +63,9 @@ void FAST_FUNC xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen) 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"); } } |