diff --git a/lib/libshare/os/freebsd/nfs.c b/lib/libshare/os/freebsd/nfs.c index d9fc66106369..dbfc86f2a36b 100644 --- a/lib/libshare/os/freebsd/nfs.c +++ b/lib/libshare/os/freebsd/nfs.c @@ -85,7 +85,9 @@ translate_opts(const char *shareopts, FILE *out) strlcpy(oldopts, shareopts, sizeof (oldopts)); newopts[0] = '\0'; s = oldopts; - while ((o = strsep(&s, "-, ")) != NULL) { + while ((o = strsep(&s, ", ")) != NULL) { + if (o[0] == '-') + o++; if (o[0] == '\0') continue; for (i = 0; i < ARRAY_SIZE(known_opts); ++i) {