]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/nfsmount.c
mount.nfs - nordirplus option
[nfs-utils.git] / utils / mount / nfsmount.c
index 4049e662ca2d81c16f6049b27b16e058a51fc682..815064a593e4ad917fe18a09124e6d0ee7e53c62 100644 (file)
@@ -293,14 +293,14 @@ int nfs_gethostbyname(const char *hostname, struct sockaddr_in *saddr)
  * instead of reserve ports since reserve ports
  * are not needed for pmap requests.
  */
-static u_short
+u_short
 getport(
        struct sockaddr_in *saddr, 
        u_long prog, 
        u_long vers, 
        u_int prot)
 {
-       u_short port;
+       u_short port = 0;
        int    socket;
        CLIENT *clnt = NULL;
        struct pmap parms;
@@ -800,6 +800,10 @@ parse_options(char *old_opts, struct nfs_mount_data *data,
                                data->flags &= ~NFS_MOUNT_NOACL;
                                if (!val)
                                        data->flags |= NFS_MOUNT_NOACL;
+                       } else if (!strcmp(opt, "rdirplus")) {
+                               data->flags &= ~NFS_MOUNT_NORDIRPLUS;
+                               if (!val)
+                                       data->flags |= NFS_MOUNT_NORDIRPLUS;
 #endif
                        } else {
                        bad_option:
@@ -983,6 +987,7 @@ nfsmount(const char *spec, const char *node, int *flags,
 #endif
 #if NFS_MOUNT_VERSION >= 5
        printf("sec = %u ", data.pseudoflavor);
+       printf("readdirplus = %d ", (data.flags & NFS_MOUNT_NORDIRPLUS) != 0);
 #endif
        printf("\n");
 #endif