mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Don't pass empty mount options to nmount(2).
Reviewed by: pjd MFC after: 2 weeks
This commit is contained in:
parent
040b46f5ba
commit
26a8da6632
1 changed files with 4 additions and 2 deletions
|
|
@ -98,8 +98,10 @@ zmount(const char *spec, const char *dir, int mflag, char *fstype,
|
|||
build_iovec(&iov, &iovlen, "fspath", __DECONST(char *, dir),
|
||||
(size_t)-1);
|
||||
build_iovec(&iov, &iovlen, "from", __DECONST(char *, spec), (size_t)-1);
|
||||
for (p = optstr; p != NULL; strsep(&p, ",/ "))
|
||||
build_iovec(&iov, &iovlen, p, NULL, (size_t)-1);
|
||||
for (p = optstr; p != NULL; strsep(&p, ",/ ")) {
|
||||
if (*p != '\0')
|
||||
build_iovec(&iov, &iovlen, p, NULL, (size_t)-1);
|
||||
}
|
||||
rv = nmount(iov, iovlen, 0);
|
||||
free(optstr);
|
||||
return (rv);
|
||||
|
|
|
|||
Loading…
Reference in a new issue