From 16bda5364478e0b2d00ec3dc0ac534d775ab37bb Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 16 Mar 2007 17:02:42 +1100 Subject: Support -s option to ignore unknown options (sloppy) --- utils/mount/nfs4mount.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'utils/mount/nfs4mount.c') diff --git a/utils/mount/nfs4mount.c b/utils/mount/nfs4mount.c index 717ad56..8aa13c6 100644 --- a/utils/mount/nfs4mount.c +++ b/utils/mount/nfs4mount.c @@ -50,6 +50,7 @@ #endif extern int verbose; +extern int sloppy; char *IDMAPLCK = DEFAULT_DIR "/rpcidmapd"; #define idmapd_check() do { \ @@ -308,7 +309,7 @@ int nfs4mount(const char *spec, const char *node, int *flags, num_flavour = parse_sec(opteq+1, pseudoflavour); if (!num_flavour) goto fail; - } else if (!strcmp(opt, "addr")) { + } else if (!strcmp(opt, "addr") || sloppy) { /* ignore */; } else { printf(_("unknown nfs mount parameter: " @@ -335,7 +336,7 @@ int nfs4mount(const char *spec, const char *node, int *flags, nocto = !val; else if (!strcmp(opt, "ac")) noac = !val; - else { + else if (!sloppy) { printf(_("unknown nfs mount option: " "%s%s\n"), val ? "" : "no", opt); goto fail; -- cgit