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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=221390
@ -98,8 +98,10 @@ zmount(const char *spec, const char *dir, int mflag, char *fstype,
|
|||||||
build_iovec(&iov, &iovlen, "fspath", __DECONST(char *, dir),
|
build_iovec(&iov, &iovlen, "fspath", __DECONST(char *, dir),
|
||||||
(size_t)-1);
|
(size_t)-1);
|
||||||
build_iovec(&iov, &iovlen, "from", __DECONST(char *, spec), (size_t)-1);
|
build_iovec(&iov, &iovlen, "from", __DECONST(char *, spec), (size_t)-1);
|
||||||
for (p = optstr; p != NULL; strsep(&p, ",/ "))
|
for (p = optstr; p != NULL; strsep(&p, ",/ ")) {
|
||||||
build_iovec(&iov, &iovlen, p, NULL, (size_t)-1);
|
if (*p != '\0')
|
||||||
|
build_iovec(&iov, &iovlen, p, NULL, (size_t)-1);
|
||||||
|
}
|
||||||
rv = nmount(iov, iovlen, 0);
|
rv = nmount(iov, iovlen, 0);
|
||||||
free(optstr);
|
free(optstr);
|
||||||
return (rv);
|
return (rv);
|
||||||
|
Loading…
Reference in New Issue
Block a user