X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fstropts.c;fp=utils%2Fmount%2Fstropts.c;h=ac81616fde125a6820920780d7f7f653816d8cf9;hp=29b1aaac39cff797e607c0350786687bb303bcb4;hb=bc4a0c42570d5620cc1bb32428e16b9c9b5f3863;hpb=1f237ac72e6f563908b350e11fd2bb866c003028 diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c index 29b1aaa..ac81616 100644 --- a/utils/mount/stropts.c +++ b/utils/mount/stropts.c @@ -568,16 +568,18 @@ static int nfs_sys_mount(struct nfsmount_info *mi, struct mount_options *opts) char *options = NULL; int result; + if (mi->fake) + return 1; + if (po_join(opts, &options) == PO_FAILED) { errno = EIO; return 0; } - if (mi->fake) - return 1; - result = mount(mi->spec, mi->node, mi->type, mi->flags & ~(MS_USER|MS_USERS), options); + free(options); + if (verbose && result) { int save = errno; nfs_error(_("%s: mount(2): %s"), progname, strerror(save));