diff options
author | Neil Brown <neilb@suse.de> | 2007-03-16 17:02:42 +1100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-03-16 17:02:42 +1100 |
commit | 16bda5364478e0b2d00ec3dc0ac534d775ab37bb (patch) | |
tree | be9b05dd11f5c88ab2d61a091fe1bdffd45b5077 /utils/mount/mount.c | |
parent | d80e49e559da01cd0b4cb23eb9e2351aca7e2ec5 (diff) | |
download | nfs-utils-16bda5364478e0b2d00ec3dc0ac534d775ab37bb.tar.gz nfs-utils-16bda5364478e0b2d00ec3dc0ac534d775ab37bb.tar.xz nfs-utils-16bda5364478e0b2d00ec3dc0ac534d775ab37bb.zip |
Support -s option to ignore unknown options (sloppy)
Diffstat (limited to 'utils/mount/mount.c')
-rw-r--r-- | utils/mount/mount.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/mount/mount.c b/utils/mount/mount.c index 639ff4b..7d58ef6 100644 --- a/utils/mount/mount.c +++ b/utils/mount/mount.c @@ -43,6 +43,7 @@ char *progname; int nomtab; int verbose; int mounttype; +int sloppy; static struct option longopts[] = { { "fake", 0, 0, 'f' }, @@ -190,6 +191,7 @@ void mount_usage() printf("\t-w\t\tMount file system read-write\n"); printf("\t-f\t\tFake mount, don't actually mount\n"); printf("\t-n\t\tDo not update /etc/mtab\n"); + printf("\t-s\t\tTolerate sloppy mount options rather than failing.\n"); printf("\t-h\t\tPrint this help\n"); printf("\tversion\t\tnfs4 - NFS version 4, nfs - older NFS version supported\n"); printf("\tnfsoptions\tRefer mount.nfs(8) or nfs(5)\n\n"); @@ -311,7 +313,7 @@ int main(int argc, char *argv[]) return 0; } - while ((c = getopt_long (argc - 2, argv + 2, "rt:vVwfno:h", + while ((c = getopt_long (argc - 2, argv + 2, "rt:vVwfno:hs", longopts, NULL)) != -1) { switch (c) { case 'r': @@ -341,6 +343,9 @@ int main(int argc, char *argv[]) else mount_opts = xstrdup(optarg); break; + case 's': + ++sloppy; + break; case 128: /* bind */ mounttype = MS_BIND; break; |