*: merge some common strings
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 23 Mar 2010 15:25:17 +0000 (16:25 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 23 Mar 2010 15:25:17 +0000 (16:25 +0100)
   text   data    bss    dec    hexfilename
 838650   8009      0 846659  ceb43busybox_old
 838519   8009      0 846528  ceac0busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
22 files changed:
coreutils/chmod.c
coreutils/install.c
e2fsprogs/fsck.c
e2fsprogs/old_e2fsprogs/util.c
findutils/find.c
libbb/run_shell.c
miscutils/makedevs.c
miscutils/microcom.c
miscutils/time.c
modutils/modprobe-small.c
modutils/modprobe.c
networking/ifplugd.c
networking/libiproute/ipaddress.c
networking/libiproute/iproute.c
networking/udhcp/dhcpd.c
procps/kill.c
selinux/chcon.c
selinux/runcon.c
shell/hush.c
util-linux/mdev.c
util-linux/mkfs_minix.c
util-linux/mount.c

index 9c1c76047c5d1c73f82132c1e37080b6c12ce169..c04201eecfae0f7d1b503591bac94bc250a679e2 100644 (file)
@@ -50,7 +50,7 @@ static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, void
        newmode = statbuf->st_mode;
 
        if (!bb_parse_mode((char *)param, &newmode))
-               bb_error_msg_and_die("invalid mode: %s", (char *)param);
+               bb_error_msg_and_die("invalid mode '%s'", (char *)param);
 
        if (chmod(fileName, newmode) == 0) {
                if (OPT_VERBOSE
index 803afe6173a9ae01a9fd5bd9802f8b9b87dd49f7..ab9feffaf105c54b157c3b05113ef9304db91a70 100644 (file)
@@ -50,7 +50,7 @@ static void setdefaultfilecon(const char *path)
 
        if (lsetfilecon(path, scontext) < 0) {
                if (errno != ENOTSUP) {
-                       bb_perror_msg("warning: failed to change context"
+                       bb_perror_msg("warning: can't change context"
                                        " of %s to %s", path, scontext);
                }
        }
index 3ec5b3643b7ae1a2ae59680fb31c6f0a6a049256..0192f3cdb5603a9189944d6b2a7b25122db53773 100644 (file)
@@ -307,7 +307,7 @@ static void load_fs_info(const char *filename)
 
        fstab = setmntent(filename, "r");
        if (!fstab) {
-               bb_perror_msg("can't read %s", filename);
+               bb_perror_msg("can't read '%s'", filename);
                return;
        }
 
index 326492d499f884cd8afd7f1b4acb7873f0ecdf4d..64cca05a7175d87700c2eec7c85c3bcfa4c410e9 100644 (file)
@@ -35,7 +35,7 @@ void check_plausibility(const char *device, int force)
        if (force)
                return;
        if (val == -1)
-               bb_perror_msg_and_die("can't 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();
index f45abbe367894eb26ad3e6f3b150346f3ce393c5..0b06938dac2db40b388b7762d479b258ae9f184f 100644 (file)
@@ -756,7 +756,7 @@ static action*** parse_params(char **argv)
                        arg1 = plus_minus_num(arg1);
                        ap->perm_mask = 0;
                        if (!bb_parse_mode(arg1, &ap->perm_mask))
-                               bb_error_msg_and_die("invalid mode: %s", arg1);
+                               bb_error_msg_and_die("invalid mode '%s'", arg1);
                }
 #endif
 #if ENABLE_FEATURE_FIND_MTIME
index de7b92ab2c1447dd852dcfdc50a9523ea3fdecc7..6f98bd695b57e69d8fa75447d86e4c8612edcc84 100644 (file)
@@ -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("can't run %s", shell);
+       bb_perror_msg_and_die("can't run '%s'", shell);
 }
index be080552b76d652bd8fce635bca2be2410918cb5..abf50577002151214e97ffa36294f3694a8bef2a 100644 (file)
@@ -63,7 +63,7 @@ int makedevs_main(int argc, char **argv)
                /* if mode != S_IFCHR and != S_IFBLK,
                 * third param in mknod() ignored */
                if (mknod(nodname, mode, makedev(Smajor, Sminor)))
-                       bb_perror_msg("can't create %s", nodname);
+                       bb_perror_msg("can't create '%s'", nodname);
 
                /*if (nodname == basedev)*/ /* ex. /dev/hda - to /dev/hda1 ... */
                        nodname = buf;
index 0fb51d2e8f67d65e7857d98616a3334804eff40f..78863d49ff3f43e5a6a20d6900a811ef61a75655 100644 (file)
@@ -64,7 +64,7 @@ int microcom_main(int argc UNUSED_PARAM, char **argv)
        if (sfd < 0) {
                // device already locked -> bail out
                if (errno == EEXIST)
-                       bb_perror_msg_and_die("can't create %s", device_lock_file);
+                       bb_perror_msg_and_die("can't create '%s'", device_lock_file);
                // can't create lock -> don't care
                if (ENABLE_FEATURE_CLEAN_UP)
                        free(device_lock_file);
index 5ea0f064b1d15144208dfd935e31f97acdf9fff7..6946c863fb8084d70f6e428400e350293af8705e 100644 (file)
@@ -380,7 +380,7 @@ static void run_command(char *const *cmd, resource_t *resp)
                   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("can't 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).  */
index 53b7c94685e8029f629b46f6020bf77152f4f5e0..cf22b94713cd0f57c48e15a7723901c878a10e65 100644 (file)
@@ -402,7 +402,7 @@ static void write_out_dep_bb(int fd)
 
        if (rename(DEPFILE_BB".new", DEPFILE_BB) != 0) {
  err:
-               bb_perror_msg("can't create %s", DEPFILE_BB);
+               bb_perror_msg("can't create '%s'", DEPFILE_BB);
                unlink(DEPFILE_BB".new");
        } else {
  ok:
index f511bc2edf74db77fe1735249ed344e4822fc75c..69b9e4687f6612132619468ac718be2c6b10177a 100644 (file)
@@ -298,7 +298,7 @@ static int do_modprobe(struct module_entry *m)
                                rc = bb_delete_module(m2->modname, O_EXCL);
                                if (rc) {
                                        if (first) {
-                                               bb_error_msg("failed to unload module %s: %s",
+                                               bb_error_msg("can't unload module %s: %s",
                                                        humanly_readable_name(m2),
                                                        moderror(rc));
                                                break;
@@ -328,7 +328,7 @@ static int do_modprobe(struct module_entry *m)
                        rc = 0;
                free(options);
                if (rc) {
-                       bb_error_msg("failed to load module %s (%s): %s",
+                       bb_error_msg("can't load module %s (%s): %s",
                                humanly_readable_name(m2),
                                fn,
                                moderror(rc)
index 62b1355246986532f2968d934fc54c2a2b5cc436..3567dea03a5c89a7317a0f3abe34a79c32a85c3a 100644 (file)
@@ -486,7 +486,7 @@ static smallint detect_link(void)
        if (status == IFSTATUS_ERR
         && G.detect_link_func == detect_link_auto
        ) {
-               bb_error_msg("failed to detect link status");
+               bb_error_msg("can't detect link status");
        }
 
        if (status != G.iface_last_status) {
index af29dd3014e818b5024add34f8c4c3c827a8a74e..daea9dd037cde654bbd4e665551017ee5fa33474 100644 (file)
@@ -194,7 +194,7 @@ static NOINLINE int print_linkinfo(const struct nlmsghdr *n)
 static int flush_update(void)
 {
        if (rtnl_send(G_filter.rth, G_filter.flushb, G_filter.flushp) < 0) {
-               bb_perror_msg("failed to send flush request");
+               bb_perror_msg("can't send flush request");
                return -1;
        }
        G_filter.flushp = 0;
index 68e3c36a09fd2046b8e79291918c3cd0a258c4f8..d771a609b24b21abfc868379af7b39ed2f461790 100644 (file)
@@ -51,7 +51,7 @@ typedef struct filter_t filter_t;
 static int flush_update(void)
 {
        if (rtnl_send(G_filter.rth, G_filter.flushb, G_filter.flushp) < 0) {
-               bb_perror_msg("failed to send flush request");
+               bb_perror_msg("can't send flush request");
                return -1;
        }
        G_filter.flushp = 0;
@@ -846,7 +846,7 @@ static int iproute_get(char **argv)
                        tb[RTA_PREFSRC]->rta_type = RTA_SRC;
                        r->rtm_src_len = 8*RTA_PAYLOAD(tb[RTA_PREFSRC]);
                } else if (!tb[RTA_SRC]) {
-                       bb_error_msg_and_die("failed to connect the route");
+                       bb_error_msg_and_die("can't connect the route");
                }
                if (!odev && tb[RTA_OIF]) {
                        tb[RTA_OIF]->rta_type = 0;
index 93e06b2379e5ba374584f5eb08933b5ce3c44c5e..795ac48411cb3de3f7811c92f236e5e7bf729b97 100644 (file)
@@ -389,13 +389,13 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv)
 
                switch (udhcp_sp_read(&rfds)) {
                case SIGUSR1:
-                       bb_info_msg("Received SIGUSR1");
+                       bb_info_msg("Received SIGUSR1");
                        write_leases();
                        /* why not just reset the timeout, eh */
                        timeout_end = monotonic_sec() + server_config.auto_time;
                        continue;
                case SIGTERM:
-                       bb_info_msg("Received SIGTERM");
+                       bb_info_msg("Received SIGTERM");
                        goto ret0;
                case 0: /* no signal: read a packet */
                        break;
index e418046e7098ad101e4afcbd24e3cf80fa84a974..1d343edff253e02d205248887be642e3fcc7d71b 100644 (file)
@@ -195,7 +195,7 @@ int kill_main(int argc, char **argv)
                                                continue;
                                        errors++;
                                        if (!quiet)
-                                               bb_perror_msg("can't kill pid %u", (unsigned)*pl);
+                                               bb_perror_msg("can't kill pid %d", (int)*pl);
                                }
                        }
                        free(pidList);
index 4395a7ee4b3b022230ece293e26b3b22fe0310b1..c6be37f442909837dfc087ba5315cba8e3e45cb1 100644 (file)
@@ -90,13 +90,13 @@ static int FAST_FUNC change_filedir_context(
                if ((option_mask32 & OPT_VERBOSE) || ((option_mask32 & OPT_CHANHES) && !fail)) {
                        printf(!fail
                               ? "context of %s changed to %s\n"
-                              : "failed to change context of %s to %s\n",
+                              : "can't change context of %s to %s\n",
                               fname, context_string);
                }
                if (!fail) {
                        rc = TRUE;
                } else if ((option_mask32 & OPT_QUIET) == 0) {
-                       bb_error_msg("failed to change context of %s to %s",
+                       bb_error_msg("can't change context of %s to %s",
                                     fname, context_string);
                }
        } else if (option_mask32 & OPT_VERBOSE) {
index 8472b709082086b4c1e0631865e1bbeae88ae7a2..4afd1116e5d2a2a089e292901452e28b7dfcca6a 100644 (file)
@@ -59,13 +59,13 @@ static context_t runcon_compute_new_context(char *user, char *role, char *type,
        if (!con)
                bb_error_msg_and_die("'%s' is not a valid context", cur_context);
        if (user && context_user_set(con, user))
-               bb_error_msg_and_die("failed to set new user '%s'", user);
+               bb_error_msg_and_die("can't set new user '%s'", user);
        if (type && context_type_set(con, type))
-               bb_error_msg_and_die("failed to set new type '%s'", type);
+               bb_error_msg_and_die("can't set new type '%s'", type);
        if (range && context_range_set(con, range))
-               bb_error_msg_and_die("failed to set new range '%s'", range);
+               bb_error_msg_and_die("can't set new range '%s'", range);
        if (role && context_role_set(con, role))
-               bb_error_msg_and_die("failed to set new role '%s'", role);
+               bb_error_msg_and_die("can't set new role '%s'", role);
 
        return con;
 }
index 048085b3edb7e451f7b3f6ff3cefd0b638cb28ba..9b15efb30c2b3562405bd4861f65034d563e5eea 100644 (file)
@@ -674,7 +674,7 @@ static const struct built_in_command bltins1[] = {
        BLTIN("set"      , builtin_set     , "Set/unset positional parameters"),
        BLTIN("shift"    , builtin_shift   , "Shift positional parameters"),
        BLTIN("trap"     , builtin_trap    , "Trap signals"),
-       BLTIN("type"     , builtin_type    , "Write a description of command type"),
+       BLTIN("type"     , builtin_type    , "Show command type"),
        BLTIN("ulimit"   , shell_builtin_ulimit  , "Control resource limits"),
        BLTIN("umask"    , builtin_umask   , "Set file creation mask"),
        BLTIN("unset"    , builtin_unset   , "Unset variables"),
index 3cee3a66904ba71ee681c1fa7694e0d2dc1919b0..b0efd98b50cf76698cd95f459be29f3f99c4c70c 100644 (file)
@@ -340,7 +340,7 @@ static void make_device(char *path, int delete)
 
                        if (!delete && major >= 0) {
                                if (mknod(node_name, mode | type, makedev(major, minor)) && errno != EEXIST)
-                                       bb_perror_msg("can't create %s", node_name);
+                                       bb_perror_msg("can't create '%s'", node_name);
                                if (major == G.root_major && minor == G.root_minor)
                                        symlink(node_name, "root");
                                if (ENABLE_FEATURE_MDEV_CONF) {
index c6c2036eaef48cd27da61f6c2142852ed32a8501..abfb942265b8cbbda51293d4df0e339908455bbc 100644 (file)
@@ -687,7 +687,7 @@ int mkfs_minix_main(int argc UNUSED_PARAM, char **argv)
 
        xmove_fd(xopen(G.device_name, O_RDWR), dev_fd);
        if (fstat(dev_fd, &statbuf) < 0)
-               bb_error_msg_and_die("can't 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)
 
index e24fc40245b8a00c8de08a22b733b41012fa9f09..8ec3071b19f2e2bc962a51c4187d0cb5f2759598 100644 (file)
@@ -1921,7 +1921,7 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
        }
        fstab = setmntent(fstabname, "r");
        if (!fstab)
-               bb_perror_msg_and_die("can't 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));