aboutsummaryrefslogtreecommitdiff
path: root/libbb/verror_msg.c
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 /libbb/verror_msg.c
parent88adfcd17863361a827551a572f993e43356eefc (diff)
downloadbusybox-94e3365b8f8eead46ec0b494ce513b7915fb6c04.tar.gz
perror_nomsg: don't print extra colon
losetup: print name of loop device in error messages
Diffstat (limited to 'libbb/verror_msg.c')
-rw-r--r--libbb/verror_msg.c6
1 files changed, 4 insertions, 2 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)
msg[applet_len - 2] = ':';
msg[applet_len - 1] = ' ';
if (strerr) {
- msg[used++] = ':';
- msg[used++] = ' ';
+ if (s[0]) { /* not perror_nomsg? */
+ msg[used++] = ':';
+ msg[used++] = ' ';
+ }
strcpy(&msg[used], strerr);
used += strerr_len;
}