diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2011-09-14 13:25:19 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2011-09-14 14:25:40 -0400 |
commit | 80936369ba84e161c324116658e074c830dcaf55 (patch) | |
tree | 3b26b496a0f43514b0dfafee90f02df01abbd8bb /utils/mount | |
parent | f07eb99180aa933366d6ec4ed9422a12d23a17b8 (diff) | |
download | nfs-utils-80936369ba84e161c324116658e074c830dcaf55.tar.gz nfs-utils-80936369ba84e161c324116658e074c830dcaf55.tar.xz nfs-utils-80936369ba84e161c324116658e074c830dcaf55.zip |
mount.nfs: Preserve any explicit port=2049 option
If NFS port (2049) is supplied explicitly, don't ignore this setting
by requesting it to portmapper again.
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mount')
-rw-r--r-- | utils/mount/stropts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c index 7a2edab..314a806 100644 --- a/utils/mount/stropts.c +++ b/utils/mount/stropts.c @@ -437,8 +437,8 @@ static int nfs_construct_new_options(struct mount_options *options, if (po_append(options, new_option) == PO_FAILED) return 0; - po_remove_all(options, "port"); - if (nfs_pmap->pm_port != NFS_PORT) { + if(po_remove_all(options, "port") == PO_FOUND || + nfs_pmap->pm_port != NFS_PORT) { snprintf(new_option, sizeof(new_option) - 1, "port=%lu", nfs_pmap->pm_port); if (po_append(options, new_option) == PO_FAILED) |