]> git.pld-linux.org Git - packages/util-linux.git/commitdiff
updated
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 21 Mar 2001 09:31:11 +0000 (09:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    util-linux-mount-rpc.patch -> 1.1
    util-linux-mount-tcp.patch -> 1.1

util-linux-mount-rpc.patch [new file with mode: 0644]
util-linux-mount-tcp.patch [new file with mode: 0644]

diff --git a/util-linux-mount-rpc.patch b/util-linux-mount-rpc.patch
new file mode 100644 (file)
index 0000000..7c5417c
--- /dev/null
@@ -0,0 +1,67 @@
+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 */
diff --git a/util-linux-mount-tcp.patch b/util-linux-mount-tcp.patch
new file mode 100644 (file)
index 0000000..959f85d
--- /dev/null
@@ -0,0 +1,20 @@
+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
This page took 0.115869 seconds and 4 git commands to generate.