summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Heinonen <jh@FreeBSD.org>2012-01-20 12:59:12 +0000
committerJaakko Heinonen <jh@FreeBSD.org>2012-01-20 12:59:12 +0000
commitf3ee32b285ef72f3a735f8446919345c385cfe9c (patch)
tree80b1f021dee879962d1a6aa0db9cb49e2ebadcdf
parent72fc1aafe2596cb6b6e6eb4d4eafd1fef14f5bea (diff)
Notes
-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 fd7b529d4bbd..385cd0fb5637 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);