mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-14 22:32:30 +01:00
Don't print the nmount(2) provided error message if it is empty.
This commit is contained in:
parent
72fc1aafe2
commit
f3ee32b285
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230377
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user