X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fmount.c;h=7d58ef67ce36a023969d53d8f82769e9ec2e0c1a;hp=6717941621c9b1e622f7b467c2e273a9d69081d3;hb=16bda5364478e0b2d00ec3dc0ac534d775ab37bb;hpb=993ec3f888a28c60d49ae0f8f1aa725b6b618a81 diff --git a/utils/mount/mount.c b/utils/mount/mount.c index 6717941..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"); @@ -295,7 +297,7 @@ int main(int argc, char *argv[]) umount_usage(); exit(1); } - return(nfsumount(argc, argv)); + exit(nfsumount(argc, argv) ? 0 : 1); } if ((argc < 2)) { @@ -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;