diff -ur util-linux-2.11q/mount/mount.8 util-linux-2.11q-nores/mount/mount.8 --- util-linux-2.11q/mount/mount.8 Thu Apr 4 11:18:47 2002 +++ util-linux-2.11q-nores/mount/mount.8 Thu Apr 25 10:22:02 2002 @@ -1118,7 +1118,8 @@ .BR ac , .BR tcp , .BR udp , -.BR lock . +.BR lock , +.BR res . For details, see .BR nfs (5). diff -ur util-linux-2.11q/mount/nfs.5 util-linux-2.11q-nores/mount/nfs.5 --- util-linux-2.11q/mount/nfs.5 Sat Sep 29 14:23:33 2001 +++ util-linux-2.11q-nores/mount/nfs.5 Thu Apr 25 10:22:02 2002 @@ -206,6 +206,10 @@ .I udp Mount the NFS filesystem using the UDP protocol. This is the default. +.TP 1.5i +.I nores +Allow non-reserved local ports for mounting. This is only needed +when enormous number of volumes is being mounted simultaneously. .P All of the non-value options have corresponding nooption forms. For example, nointr means don't allow file operations to be diff -ur util-linux-2.11q/mount/nfs_mount4.h util-linux-2.11q-nores/mount/nfs_mount4.h --- util-linux-2.11q/mount/nfs_mount4.h Sat Oct 14 07:20:51 2000 +++ util-linux-2.11q-nores/mount/nfs_mount4.h Thu Apr 25 10:22:02 2002 @@ -51,4 +51,5 @@ #define NFS_MOUNT_KERBEROS 0x0100 /* 3 */ #define NFS_MOUNT_NONLM 0x0200 /* 3 */ #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ +#define NFS_MOUNT_NORES 0x0800 /* ? */ diff -ur util-linux-2.11q/mount/nfsmount.c util-linux-2.11q-nores/mount/nfsmount.c --- util-linux-2.11q/mount/nfsmount.c Fri Apr 5 03:35:53 2002 +++ util-linux-2.11q-nores/mount/nfsmount.c Thu Apr 25 10:22:02 2002 @@ -216,7 +216,7 @@ struct stat statbuf; char *s; int port, mountport, proto, bg, soft, intr; - int posix, nocto, noac, nolock, broken_suid; + int posix, nocto, noac, nolock, broken_suid, nores; int retry, tcp; int mountprog, mountvers, nfsprog, nfsvers; int retval; @@ -316,6 +316,7 @@ nocto = 0; nolock = 0; broken_suid = 0; + nores = 0; noac = 0; retry = 10000; /* 10000 minutes ~ 1 week */ tcp = 0; @@ -420,6 +421,8 @@ tcp = val; else if (!strcmp(opt, "udp")) tcp = !val; + else if (!strcmp(opt, "res")) + nores = !val; else if (!strcmp(opt, "lock")) { if (nfs_mount_version >= 3) nolock = !val; @@ -442,7 +445,8 @@ | (intr ? NFS_MOUNT_INTR : 0) | (posix ? NFS_MOUNT_POSIX : 0) | (nocto ? NFS_MOUNT_NOCTO : 0) - | (noac ? NFS_MOUNT_NOAC : 0); + | (noac ? NFS_MOUNT_NOAC : 0) + | (nores ? NFS_MOUNT_NORES : 0); #if NFS_MOUNT_VERSION >= 2 if (nfs_mount_version >= 2) data.flags |= (tcp ? NFS_MOUNT_TCP : 0); @@ -723,7 +727,7 @@ perror(_("nfs socket")); goto fail; } - if (bindresvport(fsock, 0) < 0) { + if (nores == 0 && bindresvport(fsock, 0) < 0) { perror(_("nfs bindresvport")); goto fail; }