All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 12/17] mount.nfs: Change *flags to flags
@ 2007-07-16  3:15 Chuck Lever
  2007-07-16  3:57 ` Neil Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever @ 2007-07-16  3:15 UTC (permalink / raw)
  To: neilb; +Cc: nfs

It's not necessary to treat the *flags parameter to nfsmount and nfs4mount
as an output parameter.  Nothing is passed back.  Replace it with a normal
call-by-value.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 utils/mount/mount.c      |    4 ++--
 utils/mount/nfs4_mount.h |    2 +-
 utils/mount/nfs4mount.c  |    4 ++--
 utils/mount/nfs_mount.h  |    2 +-
 utils/mount/nfsmount.c   |    6 +++---
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/utils/mount/mount.c b/utils/mount/mount.c
index bc2e53a..3f869ee 100644
--- a/utils/mount/mount.c
+++ b/utils/mount/mount.c
@@ -467,9 +467,9 @@ int main(int argc, char *argv[])
 		exit(EX_FAIL);
 
 	if (!strcmp(fs_type, "nfs4"))
-		mnt_err = nfs4mount(spec, mount_point, &flags, &extra_opts, 0, fake);
+		mnt_err = nfs4mount(spec, mount_point, flags, &extra_opts, 0, fake);
 	else
-		mnt_err = nfsmount(spec, mount_point, &flags, &extra_opts, 0, fake);
+		mnt_err = nfsmount(spec, mount_point, flags, &extra_opts, 0, fake);
 
 	if (mnt_err)
 		exit(EX_FAIL);
diff --git a/utils/mount/nfs4_mount.h b/utils/mount/nfs4_mount.h
index 921739b..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);
+int nfs4mount(const char *, const char *, int, char **, int, int);
 
 #endif
diff --git a/utils/mount/nfs4mount.c b/utils/mount/nfs4mount.c
index c8fa0de..2c85db9 100644
--- a/utils/mount/nfs4mount.c
+++ b/utils/mount/nfs4mount.c
@@ -167,7 +167,7 @@ static int get_my_ipv4addr(char *ip_addr, int len)
 	return 0;
 }
 
-int nfs4mount(const char *spec, const char *node, int *flags,
+int nfs4mount(const char *spec, const char *node, int flags,
 	      char **extra_opts, int running_bg, int fake)
 {
 	static struct nfs4_mount_data data;
@@ -444,7 +444,7 @@ int nfs4mount(const char *spec, const char *node, int *flags,
 
 	if (!fake) {
 		if (mount(spec, node, "nfs4",
-				*flags & ~(MS_USER|MS_USERS), &data)) {
+				flags & ~(MS_USER|MS_USERS), &data)) {
 			mount_error(spec, node, errno);
 			goto fail;
 		}
diff --git a/utils/mount/nfs_mount.h b/utils/mount/nfs_mount.h
index 169f12e..8c46ce2 100644
--- a/utils/mount/nfs_mount.h
+++ b/utils/mount/nfs_mount.h
@@ -80,6 +80,6 @@ struct nfs_mount_data {
 #define AUTH_GSS_SPKMP		390011
 #endif
 
-int nfsmount(const char *, const char *, int *, char **, int, int);
+int nfsmount(const char *, const char *, int , char **, int, int);
 
 #endif /* _NFS_MOUNT_H */
diff --git a/utils/mount/nfsmount.c b/utils/mount/nfsmount.c
index 4ce8a4e..74b5f93 100644
--- a/utils/mount/nfsmount.c
+++ b/utils/mount/nfsmount.c
@@ -486,7 +486,7 @@ out_bad:
 }
 
 int
-nfsmount(const char *spec, const char *node, int *flags,
+nfsmount(const char *spec, const char *node, int flags,
 	 char **extra_opts, int running_bg, int fake)
 {
 	static char *prev_bg_host;
@@ -618,7 +618,7 @@ nfsmount(const char *spec, const char *node, int *flags,
 
 	data.version = nfs_mount_data_version;
 
-	if (*flags & MS_REMOUNT)
+	if (flags & MS_REMOUNT)
 		goto out_ok;
 
 	/*
@@ -862,7 +862,7 @@ noauth_flavors:
 
 	if (!fake) {
 		if (mount(spec, node, "nfs",
-				*flags & ~(MS_USER|MS_USERS), &data)) {
+				flags & ~(MS_USER|MS_USERS), &data)) {
 			mount_error(spec, node, errno);
 			goto fail;
 		}


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-16  4:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-16  3:15 [PATCH 12/17] mount.nfs: Change *flags to flags Chuck Lever
2007-07-16  3:57 ` Neil Brown
2007-07-16  4:03   ` Chuck Lever

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.