summaryrefslogtreecommitdiff
path: root/libbb/perror_msg_and_die.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-08-03 14:16:24 +0000
committerDenis Vlasenko2007-08-03 14:16:24 +0000
commit0e2c9fb4e09fb0c5a47ddc74b0ba53238570599e (patch)
treeab1416450c6c339fdbe3422a4e4243e7d2098541 /libbb/perror_msg_and_die.c
parentf223efbcde63c0c01e5b1331f2fc7f1a9c812f20 (diff)
downloadbusybox-0e2c9fb4e09fb0c5a47ddc74b0ba53238570599e.zip
busybox-0e2c9fb4e09fb0c5a47ddc74b0ba53238570599e.tar.gz
mount: print errno on NFS error (again)
Diffstat (limited to 'libbb/perror_msg_and_die.c')
-rw-r--r--libbb/perror_msg_and_die.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libbb/perror_msg_and_die.c b/libbb/perror_msg_and_die.c
index 3a06b65..90f56e0 100644
--- a/libbb/perror_msg_and_die.c
+++ b/libbb/perror_msg_and_die.c
@@ -14,7 +14,11 @@ void bb_perror_msg_and_die(const char *s, ...)
va_list p;
va_start(p, s);
- bb_vperror_msg(s, p);
+ /* Guard against "<error message>: Success" */
+ if (!errno)
+ bb_verror_msg(s, p, NULL);
+ else
+ bb_vperror_msg(s, p);
va_end(p);
xfunc_die();
}