diff --git a/lib/libshare/os/freebsd/nfs.c b/lib/libshare/os/freebsd/nfs.c index b5ce221bb..8a7ee6b35 100644 --- a/lib/libshare/os/freebsd/nfs.c +++ b/lib/libshare/os/freebsd/nfs.c @@ -93,7 +93,9 @@ translate_opts(char *oldopts, FILE *out) return (EOF); 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) {