svn commit: r231596 - stable/9/sbin/mount

Jaakko Heinonen jh at FreeBSD.org
Mon Feb 13 19:02:12 UTC 2012


Author: jh
Date: Mon Feb 13 19:02:11 2012
New Revision: 231596
URL: http://svn.freebsd.org/changeset/base/231596

Log:
  MFC r230377:
  
  Don't print the nmount(2) provided error message if it is empty.

Modified:
  stable/9/sbin/mount/mount_fs.c
Directory Properties:
  stable/9/sbin/mount/   (props changed)

Modified: stable/9/sbin/mount/mount_fs.c
==============================================================================
--- stable/9/sbin/mount/mount_fs.c	Mon Feb 13 18:57:36 2012	(r231595)
+++ stable/9/sbin/mount/mount_fs.c	Mon Feb 13 19:02:11 2012	(r231596)
@@ -126,7 +126,10 @@ mount_fs(const char *vfstype, int argc, 
 	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);


More information about the svn-src-all mailing list