diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-13 09:08:27 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-13 09:08:27 +0100 |
commit | 6331cf059ccfdf35f4e5a505cbae885094cc41b0 (patch) | |
tree | ccb4b4f0d96d9636861a75f7fc6c97b8b15bd306 /libbb | |
parent | f4fee418ae9f5308b4d32bc8d4e618f779f3203f (diff) | |
download | busybox-w32-6331cf059ccfdf35f4e5a505cbae885094cc41b0.tar.gz busybox-w32-6331cf059ccfdf35f4e5a505cbae885094cc41b0.tar.bz2 busybox-w32-6331cf059ccfdf35f4e5a505cbae885094cc41b0.zip |
*: 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 ae70cbc0a..ff298855d 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) | |||
30 | #if !ENABLE_FEATURE_NON_POSIX_CP | 30 | #if !ENABLE_FEATURE_NON_POSIX_CP |
31 | if (!(flags & (FILEUTILS_FORCE|FILEUTILS_INTERACTIVE))) { | 31 | if (!(flags & (FILEUTILS_FORCE|FILEUTILS_INTERACTIVE))) { |
32 | /* Either it exists, or the *path* doesnt exist */ | 32 | /* Either it exists, or the *path* doesnt exist */ |
33 | bb_perror_msg("cannot create '%s'", dest); | 33 | bb_perror_msg("can't create '%s'", dest); |
34 | return -1; | 34 | return -1; |
35 | } | 35 | } |
36 | #endif | 36 | #endif |
37 | // else: act as if -f is always in effect. | 37 | // else: act as if -f is always in effect. |
38 | // We don't want "cannot create" msg, we want unlink to be done | 38 | // We don't want "can't create" msg, we want unlink to be done |
39 | // (silently unless -i). Why? POSIX cp usually succeeds with | 39 | // (silently unless -i). Why? POSIX cp usually succeeds with |
40 | // O_TRUNC open of existing file, and user is left ignorantly happy. | 40 | // O_TRUNC open of existing file, and user is left ignorantly happy. |
41 | // With above block unconditionally enabled, non-POSIX cp | 41 | // With above block unconditionally enabled, non-POSIX cp |
@@ -56,12 +56,12 @@ static int ask_and_unlink(const char *dest, int flags) | |||
56 | if (e == errno && e == ENOENT) { | 56 | if (e == errno && e == ENOENT) { |
57 | /* e == ENOTDIR is similar: path has non-dir component, | 57 | /* e == ENOTDIR is similar: path has non-dir component, |
58 | * but in this case we don't even reach copy_file() */ | 58 | * but in this case we don't even reach copy_file() */ |
59 | bb_error_msg("cannot create '%s': Path does not exist", dest); | 59 | bb_error_msg("can't create '%s': Path does not exist", dest); |
60 | return -1; /* error */ | 60 | return -1; /* error */ |
61 | } | 61 | } |
62 | #endif | 62 | #endif |
63 | errno = e; /* do not use errno from unlink */ | 63 | errno = e; /* do not use errno from unlink */ |
64 | bb_perror_msg("cannot create '%s'", dest); | 64 | bb_perror_msg("can't create '%s'", dest); |
65 | return -1; /* error */ | 65 | return -1; /* error */ |
66 | } | 66 | } |
67 | return 1; /* ok (to try again) */ | 67 | return 1; /* ok (to try again) */ |
@@ -90,13 +90,13 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) | |||
90 | * Making [sym]links to dangling symlinks works, so... */ | 90 | * Making [sym]links to dangling symlinks works, so... */ |
91 | if (flags & (FILEUTILS_MAKE_SOFTLINK|FILEUTILS_MAKE_HARDLINK)) | 91 | if (flags & (FILEUTILS_MAKE_SOFTLINK|FILEUTILS_MAKE_HARDLINK)) |
92 | goto make_links; | 92 | goto make_links; |
93 | bb_perror_msg("cannot stat '%s'", source); | 93 | bb_perror_msg("can't stat '%s'", source); |
94 | return -1; | 94 | return -1; |
95 | } | 95 | } |
96 | 96 | ||
97 | if (lstat(dest, &dest_stat) < 0) { | 97 | if (lstat(dest, &dest_stat) < 0) { |
98 | if (errno != ENOENT) { | 98 | if (errno != ENOENT) { |
99 | bb_perror_msg("cannot stat '%s'", dest); | 99 | bb_perror_msg("can't stat '%s'", dest); |
100 | return -1; | 100 | return -1; |
101 | } | 101 | } |
102 | } else { | 102 | } else { |
@@ -114,14 +114,14 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) | |||
114 | security_context_t con; | 114 | security_context_t con; |
115 | if (lgetfilecon(source, &con) >= 0) { | 115 | if (lgetfilecon(source, &con) >= 0) { |
116 | if (setfscreatecon(con) < 0) { | 116 | if (setfscreatecon(con) < 0) { |
117 | bb_perror_msg("cannot set setfscreatecon %s", con); | 117 | bb_perror_msg("can't set setfscreatecon %s", con); |
118 | freecon(con); | 118 | freecon(con); |
119 | return -1; | 119 | return -1; |
120 | } | 120 | } |
121 | } else if (errno == ENOTSUP || errno == ENODATA) { | 121 | } else if (errno == ENOTSUP || errno == ENODATA) { |
122 | setfscreatecon_or_die(NULL); | 122 | setfscreatecon_or_die(NULL); |
123 | } else { | 123 | } else { |
124 | bb_perror_msg("cannot lgetfilecon %s", source); | 124 | bb_perror_msg("can't lgetfilecon %s", source); |
125 | return -1; | 125 | return -1; |
126 | } | 126 | } |
127 | } | 127 | } |
@@ -166,13 +166,13 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) | |||
166 | mode |= S_IRWXU; | 166 | mode |= S_IRWXU; |
167 | if (mkdir(dest, mode) < 0) { | 167 | if (mkdir(dest, mode) < 0) { |
168 | umask(saved_umask); | 168 | umask(saved_umask); |
169 | bb_perror_msg("cannot create directory '%s'", dest); | 169 | bb_perror_msg("can't create directory '%s'", dest); |
170 | return -1; | 170 | return -1; |
171 | } | 171 | } |
172 | umask(saved_umask); | 172 | umask(saved_umask); |
173 | /* need stat info for add_to_ino_dev_hashtable */ | 173 | /* need stat info for add_to_ino_dev_hashtable */ |
174 | if (lstat(dest, &dest_stat) < 0) { | 174 | if (lstat(dest, &dest_stat) < 0) { |
175 | bb_perror_msg("cannot stat '%s'", dest); | 175 | bb_perror_msg("can't stat '%s'", dest); |
176 | return -1; | 176 | return -1; |
177 | } | 177 | } |
178 | } | 178 | } |
@@ -204,7 +204,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) | |||
204 | if (!dest_exists | 204 | if (!dest_exists |
205 | && chmod(dest, source_stat.st_mode & ~saved_umask) < 0 | 205 | && chmod(dest, source_stat.st_mode & ~saved_umask) < 0 |
206 | ) { | 206 | ) { |
207 | bb_perror_msg("cannot preserve %s of '%s'", "permissions", dest); | 207 | bb_perror_msg("can't preserve %s of '%s'", "permissions", dest); |
208 | /* retval = -1; - WRONG! copy *WAS* made */ | 208 | /* retval = -1; - WRONG! copy *WAS* made */ |
209 | } | 209 | } |
210 | goto preserve_mode_ugid_time; | 210 | goto preserve_mode_ugid_time; |
@@ -222,7 +222,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) | |||
222 | if (ovr <= 0) | 222 | if (ovr <= 0) |
223 | return ovr; | 223 | return ovr; |
224 | if (lf(source, dest) < 0) { | 224 | if (lf(source, dest) < 0) { |
225 | bb_perror_msg("cannot create link '%s'", dest); | 225 | bb_perror_msg("can't create link '%s'", dest); |
226 | return -1; | 226 | return -1; |
227 | } | 227 | } |
228 | } | 228 | } |
@@ -257,7 +257,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) | |||
257 | if (ovr <= 0) | 257 | if (ovr <= 0) |
258 | return ovr; | 258 | return ovr; |
259 | if (link(link_target, dest) < 0) { | 259 | if (link(link_target, dest) < 0) { |
260 | bb_perror_msg("cannot create link '%s'", dest); | 260 | bb_perror_msg("can't create link '%s'", dest); |
261 | return -1; | 261 | return -1; |
262 | } | 262 | } |
263 | } | 263 | } |
@@ -318,7 +318,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) | |||
318 | retval = -1; | 318 | retval = -1; |
319 | /* Ok, writing side I can understand... */ | 319 | /* Ok, writing side I can understand... */ |
320 | if (close(dst_fd) < 0) { | 320 | if (close(dst_fd) < 0) { |
321 | bb_perror_msg("cannot close '%s'", dest); | 321 | bb_perror_msg("can't close '%s'", dest); |
322 | retval = -1; | 322 | retval = -1; |
323 | } | 323 | } |
324 | /* ...but read size is already checked by bb_copyfd_eof */ | 324 | /* ...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) | |||
345 | int r = symlink(lpath, dest); | 345 | int r = symlink(lpath, dest); |
346 | free(lpath); | 346 | free(lpath); |
347 | if (r < 0) { | 347 | if (r < 0) { |
348 | bb_perror_msg("cannot create symlink '%s'", dest); | 348 | bb_perror_msg("can't create symlink '%s'", dest); |
349 | return -1; | 349 | return -1; |
350 | } | 350 | } |
351 | if (flags & FILEUTILS_PRESERVE_STATUS) | 351 | if (flags & FILEUTILS_PRESERVE_STATUS) |
352 | if (lchown(dest, source_stat.st_uid, source_stat.st_gid) < 0) | 352 | if (lchown(dest, source_stat.st_uid, source_stat.st_gid) < 0) |
353 | bb_perror_msg("cannot preserve %s of '%s'", "ownership", dest); | 353 | bb_perror_msg("can't preserve %s of '%s'", "ownership", dest); |
354 | } | 354 | } |
355 | /* _Not_ jumping to preserve_mode_ugid_time: | 355 | /* _Not_ jumping to preserve_mode_ugid_time: |
356 | * symlinks don't have those */ | 356 | * symlinks don't have those */ |
@@ -360,7 +360,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) | |||
360 | || S_ISSOCK(source_stat.st_mode) || S_ISFIFO(source_stat.st_mode) | 360 | || S_ISSOCK(source_stat.st_mode) || S_ISFIFO(source_stat.st_mode) |
361 | ) { | 361 | ) { |
362 | if (mknod(dest, source_stat.st_mode, source_stat.st_rdev) < 0) { | 362 | if (mknod(dest, source_stat.st_mode, source_stat.st_rdev) < 0) { |
363 | bb_perror_msg("cannot create '%s'", dest); | 363 | bb_perror_msg("can't create '%s'", dest); |
364 | return -1; | 364 | return -1; |
365 | } | 365 | } |
366 | } else { | 366 | } else { |
@@ -380,13 +380,13 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) | |||
380 | times.modtime = source_stat.st_mtime; | 380 | times.modtime = source_stat.st_mtime; |
381 | /* BTW, utimes sets usec-precision time - just FYI */ | 381 | /* BTW, utimes sets usec-precision time - just FYI */ |
382 | if (utime(dest, ×) < 0) | 382 | if (utime(dest, ×) < 0) |
383 | bb_perror_msg("cannot preserve %s of '%s'", "times", dest); | 383 | bb_perror_msg("can't preserve %s of '%s'", "times", dest); |
384 | if (chown(dest, source_stat.st_uid, source_stat.st_gid) < 0) { | 384 | if (chown(dest, source_stat.st_uid, source_stat.st_gid) < 0) { |
385 | source_stat.st_mode &= ~(S_ISUID | S_ISGID); | 385 | source_stat.st_mode &= ~(S_ISUID | S_ISGID); |
386 | bb_perror_msg("cannot preserve %s of '%s'", "ownership", dest); | 386 | bb_perror_msg("can't preserve %s of '%s'", "ownership", dest); |
387 | } | 387 | } |
388 | if (chmod(dest, source_stat.st_mode) < 0) | 388 | if (chmod(dest, source_stat.st_mode) < 0) |
389 | bb_perror_msg("cannot preserve %s of '%s'", "permissions", dest); | 389 | bb_perror_msg("can't preserve %s of '%s'", "permissions", dest); |
390 | } | 390 | } |
391 | 391 | ||
392 | return retval; | 392 | return retval; |
diff --git a/libbb/kernel_version.c b/libbb/kernel_version.c index 937d2dbfb..cc237120d 100644 --- a/libbb/kernel_version.c +++ b/libbb/kernel_version.c | |||
@@ -24,7 +24,7 @@ int FAST_FUNC get_linux_version_code(void) | |||
24 | int i, r; | 24 | int i, r; |
25 | 25 | ||
26 | if (uname(&name) == -1) { | 26 | if (uname(&name) == -1) { |
27 | bb_perror_msg("cannot get system information"); | 27 | bb_perror_msg("can't get system information"); |
28 | return 0; | 28 | return 0; |
29 | } | 29 | } |
30 | 30 | ||
diff --git a/libbb/make_directory.c b/libbb/make_directory.c index 391493cda..a4ad59975 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) | |||
93 | *s = c; | 93 | *s = c; |
94 | } /* while (1) */ | 94 | } /* while (1) */ |
95 | 95 | ||
96 | bb_perror_msg("cannot %s directory '%s'", fail_msg, path); | 96 | bb_perror_msg("can't %s directory '%s'", fail_msg, path); |
97 | return -1; | 97 | return -1; |
98 | } | 98 | } |
diff --git a/libbb/remove_file.c b/libbb/remove_file.c index 8b14f07c9..da1488544 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) | |||
17 | 17 | ||
18 | if (lstat(path, &path_stat) < 0) { | 18 | if (lstat(path, &path_stat) < 0) { |
19 | if (errno != ENOENT) { | 19 | if (errno != ENOENT) { |
20 | bb_perror_msg("cannot stat '%s'", path); | 20 | bb_perror_msg("can't stat '%s'", path); |
21 | return -1; | 21 | return -1; |
22 | } | 22 | } |
23 | if (!(flags & FILEUTILS_FORCE)) { | 23 | if (!(flags & FILEUTILS_FORCE)) { |
24 | bb_perror_msg("cannot remove '%s'", path); | 24 | bb_perror_msg("can't remove '%s'", path); |
25 | return -1; | 25 | return -1; |
26 | } | 26 | } |
27 | return 0; | 27 | return 0; |
@@ -63,7 +63,7 @@ int FAST_FUNC remove_file(const char *path, int flags) | |||
63 | } | 63 | } |
64 | 64 | ||
65 | if (closedir(dp) < 0) { | 65 | if (closedir(dp) < 0) { |
66 | bb_perror_msg("cannot close '%s'", path); | 66 | bb_perror_msg("can't close '%s'", path); |
67 | return -1; | 67 | return -1; |
68 | } | 68 | } |
69 | 69 | ||
@@ -74,7 +74,7 @@ int FAST_FUNC remove_file(const char *path, int flags) | |||
74 | } | 74 | } |
75 | 75 | ||
76 | if (rmdir(path) < 0) { | 76 | if (rmdir(path) < 0) { |
77 | bb_perror_msg("cannot remove '%s'", path); | 77 | bb_perror_msg("can't remove '%s'", path); |
78 | return -1; | 78 | return -1; |
79 | } | 79 | } |
80 | 80 | ||
@@ -94,7 +94,7 @@ int FAST_FUNC remove_file(const char *path, int flags) | |||
94 | } | 94 | } |
95 | 95 | ||
96 | if (unlink(path) < 0) { | 96 | if (unlink(path) < 0) { |
97 | bb_perror_msg("cannot remove '%s'", path); | 97 | bb_perror_msg("can't remove '%s'", path); |
98 | return -1; | 98 | return -1; |
99 | } | 99 | } |
100 | 100 | ||
diff --git a/libbb/run_shell.c b/libbb/run_shell.c index 2ccb3a12c..de7b92ab2 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, | |||
86 | freecon(current_sid); | 86 | freecon(current_sid); |
87 | #endif | 87 | #endif |
88 | execv(shell, (char **) args); | 88 | execv(shell, (char **) args); |
89 | bb_perror_msg_and_die("cannot run %s", shell); | 89 | bb_perror_msg_and_die("can't run %s", shell); |
90 | } | 90 | } |
diff --git a/libbb/selinux_common.c b/libbb/selinux_common.c index 275a761d2..7b5696754 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) | |||
36 | if (setfscreatecon(scontext) < 0) { | 36 | if (setfscreatecon(scontext) < 0) { |
37 | /* Can be NULL. All known printf implementations | 37 | /* Can be NULL. All known printf implementations |
38 | * display "(null)", "<null>" etc */ | 38 | * display "(null)", "<null>" etc */ |
39 | bb_perror_msg_and_die("cannot set default " | 39 | bb_perror_msg_and_die("can't set default " |
40 | "file creation context to %s", scontext); | 40 | "file creation context to %s", scontext); |
41 | } | 41 | } |
42 | } | 42 | } |
diff --git a/libbb/xconnect.c b/libbb/xconnect.c index a18466935..f018ca9d9 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) | |||
63 | close(s); | 63 | close(s); |
64 | if (s_addr->sa_family == AF_INET) | 64 | if (s_addr->sa_family == AF_INET) |
65 | bb_perror_msg_and_die("%s (%s)", | 65 | bb_perror_msg_and_die("%s (%s)", |
66 | "cannot connect to remote host", | 66 | "can't connect to remote host", |
67 | inet_ntoa(((struct sockaddr_in *)s_addr)->sin_addr)); | 67 | inet_ntoa(((struct sockaddr_in *)s_addr)->sin_addr)); |
68 | bb_perror_msg_and_die("cannot connect to remote host"); | 68 | bb_perror_msg_and_die("can't connect to remote host"); |
69 | } | 69 | } |
70 | } | 70 | } |
71 | 71 | ||