mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00: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
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),
|
||||
(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 New Issue
Block a user