From 7a92dbf8cc01ed3b32c124d8f23348a39b992b54 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Fri, 3 Aug 2007 13:24:05 -0400 Subject: [PATCH] mount.nfs: restore bg argument to nfsmount() and nfs4mount() To enable background mounting again, restore the "bg" argument to nfsmount() and nfs4mount() that was recently removed. Signed-off-by: Chuck Lever Signed-off-by: Neil Brown --- utils/mount/mount.c | 6 ++++-- utils/mount/nfs4_mount.h | 2 +- utils/mount/nfs4mount.c | 2 +- utils/mount/nfs_mount.h | 2 +- utils/mount/nfsmount.c | 4 ++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/utils/mount/mount.c b/utils/mount/mount.c index a7ad035..9ac817c 100644 --- a/utils/mount/mount.c +++ b/utils/mount/mount.c @@ -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); diff --git a/utils/mount/nfs4_mount.h b/utils/mount/nfs4_mount.h index 00581fd..b03792e 100644 --- a/utils/mount/nfs4_mount.h +++ b/utils/mount/nfs4_mount.h @@ -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 diff --git a/utils/mount/nfs4mount.c b/utils/mount/nfs4mount.c index 8f95ab7..c4e8bfb 100644 --- a/utils/mount/nfs4mount.c +++ b/utils/mount/nfs4mount.c @@ -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]; diff --git a/utils/mount/nfs_mount.h b/utils/mount/nfs_mount.h index dcce370..7df8fb2 100644 --- a/utils/mount/nfs_mount.h +++ b/utils/mount/nfs_mount.h @@ -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 */ diff --git a/utils/mount/nfsmount.c b/utils/mount/nfsmount.c index 7befbee..5839482 100644 --- a/utils/mount/nfsmount.c +++ b/utils/mount/nfsmount.c @@ -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, }; -- 2.39.2