aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-10-08 11:24:44 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-10-08 11:24:44 +0200
commit7f3a2a22569eb8e4c9fcc1c7f4e51fe0c6155dae (patch)
treeca48b19046a8de875054b240f7713a09cb9a5358
parentd60752f8c9be5689a249ad518deb38061d4bc45e (diff)
downloadbusybox-7f3a2a22569eb8e4c9fcc1c7f4e51fe0c6155dae.tar.gz
join some common strings, -400 bytes
function old new delta print_intel_cstates 499 511 +12 file_insert 355 364 +9 dpkg_main 2944 2940 -4 ifenslave_main 645 640 -5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 21/-9) Total: 12 bytes text data bss dec hex filename 937564 932 17676 956172 e970c busybox_old 937164 932 17676 955772 e957c busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/dpkg.c8
-rw-r--r--archival/libarchive/data_extract_to_command.c2
-rw-r--r--debianutils/run_parts.c2
-rw-r--r--editors/vi.c8
-rw-r--r--findutils/xargs.c2
-rw-r--r--miscutils/i2c_tools.c36
-rw-r--r--networking/httpd.c6
-rw-r--r--networking/ifenslave.c8
-rw-r--r--procps/powertop.c4
-rw-r--r--runit/runsv.c4
-rw-r--r--util-linux/mkfs_minix.c10
11 files changed, 45 insertions, 45 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 151f0ca43..df7a0db64 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1151,13 +1151,13 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count
if (result && number_of_alternatives == 0) {
if (root_of_alternatives)
bb_error_msg_and_die(
- "package %s %sdepends on %s, "
- "which cannot be satisfied",
+ "package %s %sdepends on %s, which %s",
name_hashtable[package_node->name],
package_edge->type == EDGE_PRE_DEPENDS ? "pre-" : "",
- name_hashtable[root_of_alternatives->name]);
+ name_hashtable[root_of_alternatives->name],
+ "cannot be satisfied");
bb_error_msg_and_die(
- "package %s %sdepends on %s, which %s\n",
+ "package %s %sdepends on %s, which %s",
name_hashtable[package_node->name],
package_edge->type == EDGE_PRE_DEPENDS ? "pre-" : "",
name_hashtable[package_edge->name],
diff --git a/archival/libarchive/data_extract_to_command.c b/archival/libarchive/data_extract_to_command.c
index 5b32c2ec8..6f5317a0e 100644
--- a/archival/libarchive/data_extract_to_command.c
+++ b/archival/libarchive/data_extract_to_command.c
@@ -118,7 +118,7 @@ void FAST_FUNC data_extract_to_command(archive_handle_t *archive_handle)
bb_error_msg_and_die("'%s' returned status %d",
archive_handle->tar__to_command, WEXITSTATUS(status));
if (WIFSIGNALED(status))
- bb_error_msg_and_die("'%s' terminated on signal %d",
+ bb_error_msg_and_die("'%s' terminated by signal %d",
archive_handle->tar__to_command, WTERMSIG(status));
if (!BB_MMU) {
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c
index 527fae227..dd6fe7d49 100644
--- a/debianutils/run_parts.c
+++ b/debianutils/run_parts.c
@@ -189,7 +189,7 @@ int run_parts_main(int argc UNUSED_PARAM, char **argv)
if (ret < 0)
bb_perror_msg("can't execute '%s'", name);
else /* ret > 0 */
- bb_error_msg("%s exited with code %d", name, ret & 0xff);
+ bb_error_msg("%s: exit status %u", name, ret & 0xff);
if (option_mask32 & OPT_e)
xfunc_die();
diff --git a/editors/vi.c b/editors/vi.c
index 3db597ae1..f355712ab 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -2910,10 +2910,10 @@ static int file_insert(const char *fn, char *p, int initial)
int fd, size;
struct stat statbuf;
- if (p < text || p > end) {
- status_line_bold("Trying to insert file outside of memory");
- return cnt;
- }
+ if (p < text)
+ p = text;
+ if (p > end)
+ p = end;
fd = open(fn, O_RDONLY);
if (fd < 0) {
diff --git a/findutils/xargs.c b/findutils/xargs.c
index 25e47ec89..5870b8a16 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -122,7 +122,7 @@ static int xargs_exec(void)
return 124;
}
if (status >= 0x180) {
- bb_error_msg("%s: terminated by signal %d",
+ bb_error_msg("'%s' terminated by signal %d",
G.args[0], status - 0x180);
return 125;
}
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index 292ff88dd..d77e6bacf 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -358,7 +358,7 @@ static void check_read_funcs(int fd, int mode, int data_addr, int pec)
break;
#endif /* ENABLE_I2CDUMP */
default:
- bb_error_msg_and_die("Programmer goofed!");
+ bb_error_msg_and_die("internal error");
}
check_funcs_test_end(funcs, pec, err);
}
@@ -1022,33 +1022,33 @@ static const struct i2c_func i2c_funcs_tab[] = {
{ .value = I2C_FUNC_I2C,
.name = "I2C" },
{ .value = I2C_FUNC_SMBUS_QUICK,
- .name = "SMBus Quick Command" },
+ .name = "SMBus quick command" },
{ .value = I2C_FUNC_SMBUS_WRITE_BYTE,
- .name = "SMBus Send Byte" },
+ .name = "SMBus send byte" },
{ .value = I2C_FUNC_SMBUS_READ_BYTE,
- .name = "SMBus Receive Byte" },
+ .name = "SMBus receive byte" },
{ .value = I2C_FUNC_SMBUS_WRITE_BYTE_DATA,
- .name = "SMBus Write Byte" },
+ .name = "SMBus write byte" },
{ .value = I2C_FUNC_SMBUS_READ_BYTE_DATA,
- .name = "SMBus Read Byte" },
+ .name = "SMBus read byte" },
{ .value = I2C_FUNC_SMBUS_WRITE_WORD_DATA,
- .name = "SMBus Write Word" },
+ .name = "SMBus write word" },
{ .value = I2C_FUNC_SMBUS_READ_WORD_DATA,
- .name = "SMBus Read Word" },
+ .name = "SMBus read word" },
{ .value = I2C_FUNC_SMBUS_PROC_CALL,
- .name = "SMBus Process Call" },
+ .name = "SMBus process call" },
{ .value = I2C_FUNC_SMBUS_WRITE_BLOCK_DATA,
- .name = "SMBus Block Write" },
+ .name = "SMBus block write" },
{ .value = I2C_FUNC_SMBUS_READ_BLOCK_DATA,
- .name = "SMBus Block Read" },
+ .name = "SMBus block read" },
{ .value = I2C_FUNC_SMBUS_BLOCK_PROC_CALL,
- .name = "SMBus Block Process Call" },
+ .name = "SMBus block process call" },
{ .value = I2C_FUNC_SMBUS_PEC,
.name = "SMBus PEC" },
{ .value = I2C_FUNC_SMBUS_WRITE_I2C_BLOCK,
- .name = "I2C Block Write" },
+ .name = "I2C block write" },
{ .value = I2C_FUNC_SMBUS_READ_I2C_BLOCK,
- .name = "I2C Block Read" },
+ .name = "I2C block read" },
{ .value = 0, .name = NULL }
};
@@ -1251,17 +1251,17 @@ int i2cdetect_main(int argc UNUSED_PARAM, char **argv)
no_support("detection commands");
} else
if (mode == I2CDETECT_MODE_QUICK && !(funcs & I2C_FUNC_SMBUS_QUICK)) {
- no_support("SMBus Quick Write command");
+ no_support("SMBus quick write");
} else
if (mode == I2CDETECT_MODE_READ && !(funcs & I2C_FUNC_SMBUS_READ_BYTE)) {
- no_support("SMBus Receive Byte command");
+ no_support("SMBus receive byte");
}
if (mode == I2CDETECT_MODE_AUTO) {
if (!(funcs & I2C_FUNC_SMBUS_QUICK))
- will_skip("SMBus Quick Write");
+ will_skip("SMBus quick write");
if (!(funcs & I2C_FUNC_SMBUS_READ_BYTE))
- will_skip("SMBus Receive Byte");
+ will_skip("SMBus receive byte");
}
if (!(opts & opt_y))
diff --git a/networking/httpd.c b/networking/httpd.c
index feaaa94d5..00169c36d 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1222,12 +1222,12 @@ static NOINLINE void cgi_io_loop_and_exit(int fromCgi_rd, int toCgi_wr, int post
out_cnt += count;
count = 0;
/* "Status" header format is: "Status: 302 Redirected\r\n" */
- if (out_cnt >= 8 && memcmp(rbuf, "Status: ", 8) == 0) {
+ if (out_cnt >= 7 && memcmp(rbuf, "Status:", 7) == 0) {
/* send "HTTP/1.0 " */
if (full_write(STDOUT_FILENO, HTTP_200, 9) != 9)
break;
- rbuf += 8; /* skip "Status: " */
- count = out_cnt - 8;
+ rbuf += 7; /* skip "Status:" */
+ count = out_cnt - 7;
out_cnt = -1; /* buffering off */
} else if (out_cnt >= 4) {
/* Did CGI add "HTTP"? */
diff --git a/networking/ifenslave.c b/networking/ifenslave.c
index c3be8180b..6b234adee 100644
--- a/networking/ifenslave.c
+++ b/networking/ifenslave.c
@@ -577,8 +577,8 @@ int ifenslave_main(int argc UNUSED_PARAM, char **argv)
/* Can't work with this slave, */
/* remember the error and skip it */
bb_perror_msg(
- "skipping %s: can't get flags",
- slave_ifname);
+ "skipping %s: can't get %s",
+ slave_ifname, "flags");
res = rv;
continue;
}
@@ -595,8 +595,8 @@ int ifenslave_main(int argc UNUSED_PARAM, char **argv)
/* Can't work with this slave, */
/* remember the error and skip it */
bb_perror_msg(
- "skipping %s: can't get settings",
- slave_ifname);
+ "skipping %s: can't get %s",
+ slave_ifname, "settings");
res = rv;
continue;
}
diff --git a/procps/powertop.c b/procps/powertop.c
index 18418100f..ce85f4191 100644
--- a/procps/powertop.c
+++ b/procps/powertop.c
@@ -591,7 +591,7 @@ static NOINLINE void print_intel_cstates(void)
if (!edx || !(ecx & 1))
return;
- printf("Your CPU supports the following C-states: ");
+ printf("Your %s the following C-states: ", "CPU supports");
i = 0;
while (edx) {
if (edx & 7)
@@ -602,7 +602,7 @@ static NOINLINE void print_intel_cstates(void)
bb_putchar('\n');
/* Print BIOS C-States */
- printf("Your BIOS reports the following C-states: ");
+ printf("Your %s the following C-states: ", "BIOS reports");
for (i = 0; i < ARRAY_SIZE(bios_table); i++)
if (bios_table[i])
printf("C%u ", i);
diff --git a/runit/runsv.c b/runit/runsv.c
index d941e897d..94d286059 100644
--- a/runit/runsv.c
+++ b/runit/runsv.c
@@ -114,7 +114,7 @@ struct globals {
static void fatal2_cannot(const char *m1, const char *m2)
{
- bb_perror_msg_and_die("%s: fatal: cannot %s%s", dir, m1, m2);
+ bb_perror_msg_and_die("%s: fatal: can't %s%s", dir, m1, m2);
/* was exiting 111 */
}
static void fatal_cannot(const char *m)
@@ -124,7 +124,7 @@ static void fatal_cannot(const char *m)
}
static void fatal2x_cannot(const char *m1, const char *m2)
{
- bb_error_msg_and_die("%s: fatal: cannot %s%s", dir, m1, m2);
+ bb_error_msg_and_die("%s: fatal: can't %s%s", dir, m1, m2);
/* was exiting 111 */
}
static void warn_cannot(const char *m)
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index d65a5161c..88d797584 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -576,11 +576,11 @@ static void setup_tables(void)
for (i = MINIX_ROOT_INO; i <= SB_INODES; i++)
unmark_inode(i);
G.inode_buffer = xzalloc(INODE_BUFFER_SIZE);
- printf("%ld inodes\n", (long)SB_INODES);
- printf("%ld blocks\n", (long)SB_ZONES);
- printf("Firstdatazone=%ld (%ld)\n", (long)SB_FIRSTZONE, (long)norm_firstzone);
- printf("Zonesize=%d\n", BLOCK_SIZE << SB_ZONE_SIZE);
- printf("Maxsize=%ld\n", (long)SB_MAXSIZE);
+ printf("%lu inodes\n", (unsigned long)SB_INODES);
+ printf("%lu blocks\n", (unsigned long)SB_ZONES);
+ printf("Firstdatazone=%lu (%lu)\n", (unsigned long)SB_FIRSTZONE, (unsigned long)norm_firstzone);
+ printf("Zonesize=%u\n", BLOCK_SIZE << SB_ZONE_SIZE);
+ printf("Maxsize=%lu\n", (unsigned long)SB_MAXSIZE);
}
int mkfs_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;