]> git.decadent.org.uk Git - nfs-utils.git/blob - debian/patches/13-preserve-explicit-port-2049.patch
Merge branch 'upstream'
[nfs-utils.git] / debian / patches / 13-preserve-explicit-port-2049.patch
1 From: Ben Hutchings <ben@decadent.org.uk>
2 Subject: [PATCH] mount.nfs: Preserve any explicit port=2049 option
3
4 This addresses Debian bug #582003.
5 --- nfs-utils-1.2.2.orig/utils/mount/stropts.c
6 +++ nfs-utils-1.2.2/utils/mount/stropts.c
7 @@ -434,8 +434,8 @@
8         if (po_append(options, new_option) == PO_FAILED)
9                 return 0;
10  
11 -       po_remove_all(options, "port");
12 -       if (nfs_pmap->pm_port != NFS_PORT) {
13 +       if (po_remove_all(options, "port") == PO_FOUND ||
14 +               nfs_pmap->pm_port != NFS_PORT) {
15                 snprintf(new_option, sizeof(new_option) - 1,
16                          "port=%lu", nfs_pmap->pm_port);
17                 if (po_append(options, new_option) == PO_FAILED)