shrink the code a bit
[oweals/busybox.git] / util-linux / nfsmount.c
index 842fa03512e95b5a09562f2b7acb764fc3ef855a..e9d6dc6354309b6b84391cda61cd780ea8c04a99 100644 (file)
 #include <rpc/pmap_clnt.h>
 #include "nfsmount.h"
 
+/* This is just a warning of a common mistake.  Possibly this should be a
+ *  * uclibc faq entry rather than in busybox... */
+#if ENABLE_FEATURE_MOUNT_NFS && defined(__UCLIBC__) && ! defined(__UCLIBC_HAS_RPC__)
+#error "You need to build uClibc with UCLIBC_HAS_RPC for NFS support."
+#endif
+
 
 /*
  * NFS stats. The good thing with these values is that NFSv3 errors are
@@ -145,11 +151,11 @@ static const int MS_NODIRATIME = 2048;    /* Do not update directory access time
 #define NFS_MOUNT_VERSION 4
 
 struct nfs2_fh {
-        char                    data[32];
+       char                    data[32];
 };
 struct nfs3_fh {
-        unsigned short          size;
-        unsigned char           data[64];
+       unsigned short          size;
+       unsigned char           data[64];
 };
 
 struct nfs_mount_data {
@@ -681,7 +687,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
                                       mountprog,
                                       mountvers,
                                       proto,
-                                      mountport);
+                                      mountport);
 
                        /* contact the mount daemon via TCP */
                        mount_server_addr.sin_port = htons(pm_mnt->pm_port);
@@ -804,7 +810,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
 
        if (tcp) {
                if (nfs_mount_version < 3) {
-                       printf(_("NFS over TCP is not supported.\n"));
+                       printf(_("NFS over TCP is not supported.\n"));
                        goto fail;
                }
                fsock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);