summaryrefslogtreecommitdiffstats
path: root/sbin/mount/mount_fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/mount/mount_fs.c')
-rw-r--r--sbin/mount/mount_fs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/mount/mount_fs.c b/sbin/mount/mount_fs.c
index fd7b529..385cd0f 100644
--- a/sbin/mount/mount_fs.c
+++ b/sbin/mount/mount_fs.c
@@ -129,7 +129,10 @@ mount_fs(const char *vfstype, int argc, char *argv[])
build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg));
if (nmount(iov, iovlen, mntflags) == -1) {
- warn("%s: %s", dev, errmsg);
+ if (*errmsg != '\0')
+ warn("%s: %s", dev, errmsg);
+ else
+ warn("%s", dev);
return (1);
}
return (0);
OpenPOWER on IntegriCloud