diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-12-22 15:44:23 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-12-22 15:44:23 +0000 |
commit | 94e3365b8f8eead46ec0b494ce513b7915fb6c04 (patch) | |
tree | 1d7c8325f6f7625a3f95ee3931931f8894396b67 | |
parent | 88adfcd17863361a827551a572f993e43356eefc (diff) | |
download | busybox-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.c | 6 | ||||
-rw-r--r-- | scripts/defconfig | 2 | ||||
-rw-r--r-- | util-linux/losetup.c | 6 |
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 | |||
305 | CONFIG_PATCH=y | 305 | CONFIG_PATCH=y |
306 | CONFIG_SED=y | 306 | CONFIG_SED=y |
307 | CONFIG_VI=y | 307 | CONFIG_VI=y |
308 | CONFIG_FEATURE_VI_MAX_LEN=1024 | 308 | CONFIG_FEATURE_VI_MAX_LEN=4096 |
309 | CONFIG_FEATURE_VI_COLON=y | 309 | CONFIG_FEATURE_VI_COLON=y |
310 | CONFIG_FEATURE_VI_YANKMARK=y | 310 | CONFIG_FEATURE_VI_YANKMARK=y |
311 | CONFIG_FEATURE_VI_SEARCH=y | 311 | CONFIG_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); |