aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-12-22 15:44:23 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-12-22 15:44:23 +0000
commit94e3365b8f8eead46ec0b494ce513b7915fb6c04 (patch)
tree1d7c8325f6f7625a3f95ee3931931f8894396b67
parent88adfcd17863361a827551a572f993e43356eefc (diff)
downloadbusybox-w32-94e3365b8f8eead46ec0b494ce513b7915fb6c04.tar.gz
busybox-w32-94e3365b8f8eead46ec0b494ce513b7915fb6c04.tar.bz2
busybox-w32-94e3365b8f8eead46ec0b494ce513b7915fb6c04.zip
perror_nomsg: don't print extra colon
losetup: print name of loop device in error messages
-rw-r--r--libbb/verror_msg.c6
-rw-r--r--scripts/defconfig2
-rw-r--r--util-linux/losetup.c6
3 files changed, 8 insertions, 6 deletions
diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c
index e51003134..dbd8323e4 100644
--- a/libbb/verror_msg.c
+++ b/libbb/verror_msg.c
@@ -45,8 +45,10 @@ void bb_verror_msg(const char *s, va_list p, const char* strerr)
45 msg[applet_len - 2] = ':'; 45 msg[applet_len - 2] = ':';
46 msg[applet_len - 1] = ' '; 46 msg[applet_len - 1] = ' ';
47 if (strerr) { 47 if (strerr) {
48 msg[used++] = ':'; 48 if (s[0]) { /* not perror_nomsg? */
49 msg[used++] = ' '; 49 msg[used++] = ':';
50 msg[used++] = ' ';
51 }
50 strcpy(&msg[used], strerr); 52 strcpy(&msg[used], strerr);
51 used += strerr_len; 53 used += strerr_len;
52 } 54 }
diff --git a/scripts/defconfig b/scripts/defconfig
index 0550e43e4..3aacaac64 100644
--- a/scripts/defconfig
+++ b/scripts/defconfig
@@ -305,7 +305,7 @@ CONFIG_ED=y
305CONFIG_PATCH=y 305CONFIG_PATCH=y
306CONFIG_SED=y 306CONFIG_SED=y
307CONFIG_VI=y 307CONFIG_VI=y
308CONFIG_FEATURE_VI_MAX_LEN=1024 308CONFIG_FEATURE_VI_MAX_LEN=4096
309CONFIG_FEATURE_VI_COLON=y 309CONFIG_FEATURE_VI_COLON=y
310CONFIG_FEATURE_VI_YANKMARK=y 310CONFIG_FEATURE_VI_YANKMARK=y
311CONFIG_FEATURE_VI_SEARCH=y 311CONFIG_FEATURE_VI_SEARCH=y
diff --git a/util-linux/losetup.c b/util-linux/losetup.c
index a9ecfd58b..d521b7b88 100644
--- a/util-linux/losetup.c
+++ b/util-linux/losetup.c
@@ -37,14 +37,14 @@ int losetup_main(int argc, char **argv)
37 if (argc != 1) 37 if (argc != 1)
38 bb_show_usage(); 38 bb_show_usage();
39 if (del_loop(argv[0])) 39 if (del_loop(argv[0]))
40 bb_perror_nomsg_and_die(); 40 bb_simple_perror_msg_and_die(argv[0]);
41 return EXIT_SUCCESS; 41 return EXIT_SUCCESS;
42 } 42 }
43 43
44 if (argc == 2) { 44 if (argc == 2) {
45 /* -o or no option */ 45 /* -o or no option */
46 if (set_loop(&argv[0], argv[1], offset) < 0) 46 if (set_loop(&argv[0], argv[1], offset) < 0)
47 bb_perror_nomsg_and_die(); 47 bb_simple_perror_msg_and_die(argv[0]);
48 return EXIT_SUCCESS; 48 return EXIT_SUCCESS;
49 } 49 }
50 50
@@ -52,7 +52,7 @@ int losetup_main(int argc, char **argv)
52 /* -o or no option */ 52 /* -o or no option */
53 s = query_loop(argv[0]); 53 s = query_loop(argv[0]);
54 if (!s) 54 if (!s)
55 bb_perror_nomsg_and_die(); 55 bb_simple_perror_msg_and_die(argv[0]);
56 printf("%s: %s\n", argv[0], s); 56 printf("%s: %s\n", argv[0], s);
57 if (ENABLE_FEATURE_CLEAN_UP) 57 if (ENABLE_FEATURE_CLEAN_UP)
58 free(s); 58 free(s);