diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-18 22:04:09 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-18 22:04:09 +0000 |
commit | 89f0b3486dfea233e6000f9af95b39a3ea7fd96e (patch) | |
tree | fc0d65e0d33b5b526b0d44d4c4da8143be3b53b1 /libbb/remove_file.c | |
parent | 61126ab30a90b74e45a79ccb97074ab71afa6054 (diff) | |
download | busybox-w32-89f0b3486dfea233e6000f9af95b39a3ea7fd96e.tar.gz busybox-w32-89f0b3486dfea233e6000f9af95b39a3ea7fd96e.tar.bz2 busybox-w32-89f0b3486dfea233e6000f9af95b39a3ea7fd96e.zip |
rodata cleanup. "unable to" == "cannot". -300 bytes
Diffstat (limited to 'libbb/remove_file.c')
-rw-r--r-- | libbb/remove_file.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libbb/remove_file.c b/libbb/remove_file.c index 509aa6a6d..ab159a481 100644 --- a/libbb/remove_file.c +++ b/libbb/remove_file.c | |||
@@ -25,7 +25,7 @@ int remove_file(const char *path, int flags) | |||
25 | 25 | ||
26 | if (lstat(path, &path_stat) < 0) { | 26 | if (lstat(path, &path_stat) < 0) { |
27 | if (errno != ENOENT) { | 27 | if (errno != ENOENT) { |
28 | bb_perror_msg("unable to stat `%s'", path); | 28 | bb_perror_msg("cannot stat '%s'", path); |
29 | return -1; | 29 | return -1; |
30 | } | 30 | } |
31 | 31 | ||
@@ -34,7 +34,7 @@ int remove_file(const char *path, int flags) | |||
34 | 34 | ||
35 | if (!path_exists) { | 35 | if (!path_exists) { |
36 | if (!(flags & FILEUTILS_FORCE)) { | 36 | if (!(flags & FILEUTILS_FORCE)) { |
37 | bb_perror_msg("cannot remove `%s'", path); | 37 | bb_perror_msg("cannot remove '%s'", path); |
38 | return -1; | 38 | return -1; |
39 | } | 39 | } |
40 | return 0; | 40 | return 0; |
@@ -53,7 +53,7 @@ int remove_file(const char *path, int flags) | |||
53 | if ((!(flags & FILEUTILS_FORCE) && access(path, W_OK) < 0 && | 53 | if ((!(flags & FILEUTILS_FORCE) && access(path, W_OK) < 0 && |
54 | isatty(0)) || | 54 | isatty(0)) || |
55 | (flags & FILEUTILS_INTERACTIVE)) { | 55 | (flags & FILEUTILS_INTERACTIVE)) { |
56 | fprintf(stderr, "%s: descend into directory `%s'? ", applet_name, | 56 | fprintf(stderr, "%s: descend into directory '%s'? ", applet_name, |
57 | path); | 57 | path); |
58 | if (!bb_ask_confirmation()) | 58 | if (!bb_ask_confirmation()) |
59 | return 0; | 59 | return 0; |
@@ -75,18 +75,18 @@ int remove_file(const char *path, int flags) | |||
75 | } | 75 | } |
76 | 76 | ||
77 | if (closedir(dp) < 0) { | 77 | if (closedir(dp) < 0) { |
78 | bb_perror_msg("unable to close `%s'", path); | 78 | bb_perror_msg("cannot close '%s'", path); |
79 | return -1; | 79 | return -1; |
80 | } | 80 | } |
81 | 81 | ||
82 | if (flags & FILEUTILS_INTERACTIVE) { | 82 | if (flags & FILEUTILS_INTERACTIVE) { |
83 | fprintf(stderr, "%s: remove directory `%s'? ", applet_name, path); | 83 | fprintf(stderr, "%s: remove directory '%s'? ", applet_name, path); |
84 | if (!bb_ask_confirmation()) | 84 | if (!bb_ask_confirmation()) |
85 | return status; | 85 | return status; |
86 | } | 86 | } |
87 | 87 | ||
88 | if (rmdir(path) < 0) { | 88 | if (rmdir(path) < 0) { |
89 | bb_perror_msg("unable to remove `%s'", path); | 89 | bb_perror_msg("cannot remove '%s'", path); |
90 | return -1; | 90 | return -1; |
91 | } | 91 | } |
92 | 92 | ||
@@ -96,13 +96,13 @@ int remove_file(const char *path, int flags) | |||
96 | !S_ISLNK(path_stat.st_mode) && | 96 | !S_ISLNK(path_stat.st_mode) && |
97 | isatty(0)) || | 97 | isatty(0)) || |
98 | (flags & FILEUTILS_INTERACTIVE)) { | 98 | (flags & FILEUTILS_INTERACTIVE)) { |
99 | fprintf(stderr, "%s: remove `%s'? ", applet_name, path); | 99 | fprintf(stderr, "%s: remove '%s'? ", applet_name, path); |
100 | if (!bb_ask_confirmation()) | 100 | if (!bb_ask_confirmation()) |
101 | return 0; | 101 | return 0; |
102 | } | 102 | } |
103 | 103 | ||
104 | if (unlink(path) < 0) { | 104 | if (unlink(path) < 0) { |
105 | bb_perror_msg("unable to remove `%s'", path); | 105 | bb_perror_msg("cannot remove '%s'", path); |
106 | return -1; | 106 | return -1; |
107 | } | 107 | } |
108 | 108 | ||