mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Don't print the nmount(2) provided error message if it is empty.
This commit is contained in:
parent
72fc1aafe2
commit
f3ee32b285
1 changed files with 4 additions and 1 deletions
|
|
@ -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 a new issue