mount.nfs: restore bg argument to nfsmount() and nfs4mount()
authorChuck Lever <chuck.lever@oracle.com>
Fri, 3 Aug 2007 17:24:05 +0000 (13:24 -0400)
committerNeil Brown <neilb@suse.de>
Fri, 3 Aug 2007 22:27:40 +0000 (08:27 +1000)
To enable background mounting again, restore the "bg" argument to
nfsmount() and nfs4mount() that was recently removed.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
utils/mount/mount.c
utils/mount/nfs4_mount.h
utils/mount/nfs4mount.c
utils/mount/nfs_mount.h
utils/mount/nfsmount.c

index a7ad035..9ac817c 100644 (file)
@@ -493,9 +493,11 @@ int main(int argc, char *argv[])
        }
 
        if (strcmp(fs_type, "nfs4") == 0)
-               mnt_err = nfs4mount(spec, mount_point, flags, &extra_opts, fake);
+               mnt_err = nfs4mount(spec, mount_point, flags,
+                                       &extra_opts, fake, 0);
        else
-               mnt_err = nfsmount(spec, mount_point, flags, &extra_opts, fake);
+               mnt_err = nfsmount(spec, mount_point, flags,
+                                       &extra_opts, fake, 0);
 
        if (mnt_err)
                exit(EX_FAIL);
index 00581fd..b03792e 100644 (file)
@@ -68,6 +68,6 @@ struct nfs4_mount_data {
 #define NFS4_MOUNT_UNSHARED    0x8000  /* 5 */
 #define NFS4_MOUNT_FLAGMASK    0xFFFF
 
-int nfs4mount(const char *, const char *, int, char **, int);
+int nfs4mount(const char *, const char *, int, char **, int, int);
 
 #endif
index 8f95ab7..c4e8bfb 100644 (file)
@@ -166,7 +166,7 @@ static int get_my_ipv4addr(char *ip_addr, int len)
 }
 
 int nfs4mount(const char *spec, const char *node, int flags,
-             char **extra_opts, int fake)
+             char **extra_opts, int fake, int running_bg)
 {
        static struct nfs4_mount_data data;
        static char hostdir[1024];
index dcce370..7df8fb2 100644 (file)
@@ -80,7 +80,7 @@ struct nfs_mount_data {
 #define AUTH_GSS_SPKMP         390011
 #endif
 
-int    nfsmount(const char *, const char *, int , char **, int);
+int    nfsmount(const char *, const char *, int , char **, int, int);
 int    nfsumount(int, char **);
 
 #endif /* _NFS_MOUNT_H */
index 7befbee..5839482 100644 (file)
@@ -488,14 +488,14 @@ out_bad:
 
 int
 nfsmount(const char *spec, const char *node, int flags,
-        char **extra_opts, int fake)
+        char **extra_opts, int fake, int running_bg)
 {
        static char *prev_bg_host;
        char hostdir[1024];
        char *hostname, *dirname, *old_opts, *mounthost = NULL;
        char new_opts[1024], cbuf[1024];
        static struct nfs_mount_data data;
-       int val, running_bg = 0;
+       int val;
        static int doonce = 0;
 
        clnt_addr_t mnt_server = { &mounthost, };