--- /dev/null
+diff -urN util-linux-2.11b.org/mount/nfsmount.c util-linux-2.11b/mount/nfsmount.c
+--- util-linux-2.11b.org/mount/nfsmount.c Wed Mar 21 10:16:36 2001
++++ util-linux-2.11b/mount/nfsmount.c Wed Mar 21 10:22:00 2001
+@@ -138,6 +138,8 @@
+ server_addr->sin_port = PMAPPORT;
+ pmap = pmap_getmaps(server_addr);
+
++ if (!pmap)
++ return NULL;
+ if (version > MAX_NFSPROT)
+ version = MAX_NFSPROT;
+ if (!prog)
+@@ -166,8 +168,6 @@
+ }
+ if (!p.pm_vers)
+ p.pm_vers = MOUNTVERS;
+- if (!p.pm_port)
+- p.pm_port = MOUNTPORT;
+ if (!p.pm_prot)
+ p.pm_prot = IPPROTO_TCP;
+ return &p;
+@@ -574,6 +574,12 @@
+ mountvers,
+ proto,
+ mountport);
++
++ if (pm_mnt == NULL) {
++ fprintf(stderr, _("mount: cannot access portmapper on %s: %s\n"),
++ hostname, strerror (errno));
++ goto fail;
++ }
+
+ /* contact the mount daemon via TCP */
+ mount_server_addr.sin_port = htons(pm_mnt->pm_port);
+diff -urN util-linux-2.11b.org/mount/nfsmount.x util-linux-2.11b/mount/nfsmount.x
+--- util-linux-2.11b.org/mount/nfsmount.x Wed Mar 21 10:16:36 2001
++++ util-linux-2.11b/mount/nfsmount.x Wed Mar 21 10:17:01 2001
+@@ -48,7 +48,6 @@
+ #endif
+ %#include <asm/types.h>
+
+-const MOUNTPORT = 635;
+ const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */
+ const MNTNAMLEN = 255; /* maximum bytes in a name argument */
+ const FHSIZE = 32; /* size in bytes of a file handle */
+diff -urN util-linux-2.11b.org/mount/rpcsvc/nfsmount.h util-linux-2.11b/mount/rpcsvc/nfsmount.h
+--- util-linux-2.11b.org/mount/rpcsvc/nfsmount.h Wed Mar 21 10:16:36 2001
++++ util-linux-2.11b/mount/rpcsvc/nfsmount.h Wed Mar 21 10:17:01 2001
+@@ -50,7 +50,6 @@
+ #ifndef _rpcsvc_mount_h
+ #define _rpcsvc_mount_h
+ #include <asm/types.h>
+-#define MOUNTPORT 635
+ #define MNTPATHLEN 1024
+ #define MNTNAMLEN 255
+ #define FHSIZE 32
+diff -urN util-linux-2.11b.org/mount/rpcsvc/nfsmount.x util-linux-2.11b/mount/rpcsvc/nfsmount.x
+--- util-linux-2.11b.org/mount/rpcsvc/nfsmount.x Wed Mar 21 10:16:36 2001
++++ util-linux-2.11b/mount/rpcsvc/nfsmount.x Wed Mar 21 10:17:01 2001
+@@ -48,7 +48,6 @@
+ #endif
+ %#include <asm/types.h>
+
+-const MOUNTPORT = 635;
+ const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */
+ const MNTNAMLEN = 255; /* maximum bytes in a name argument */
+ const FHSIZE = 32; /* size in bytes of a file handle */
--- /dev/null
+diff -urN util-linux-2.11b.org/mount/nfsmount.c util-linux-2.11b/mount/nfsmount.c
+--- util-linux-2.11b.org/mount/nfsmount.c Wed Mar 21 10:07:38 2001
++++ util-linux-2.11b/mount/nfsmount.c Wed Mar 21 10:13:29 2001
+@@ -724,6 +724,16 @@
+ server_addr.sin_port = PMAPPORT;
+ port = pmap_getport(&server_addr, nfsprog, nfsvers,
+ tcp ? IPPROTO_TCP : IPPROTO_UDP);
++ /* Here we check to see if user is mounting with the tcp
++ * option. If so, and if the portmap returns a '0' for
++ * port (service unavailable), we then exit out notifying
++ * the user, rather than hanging up mount. */
++
++ if (port == 0 && tcp == 1) {
++ perror(_("nfs server reported service unavailable"));
++ goto fail;
++ }
++
+ if (port == 0)
+ port = NFS_PORT;
+ #ifdef NFS_MOUNT_DEBUG