From 57af0cce3ed6f555bb40132d667e8b10d41855ca Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 3 Nov 2009 10:37:36 -0500 Subject: [PATCH] Made some aesthetic changes to the code that sets the defaults that were a result of the code review. Signed-off-by: Steve Dickson --- utils/mount/network.c | 8 ++++---- utils/mount/stropts.c | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/utils/mount/network.c b/utils/mount/network.c index d4ecbc9..7b1152a 100644 --- a/utils/mount/network.c +++ b/utils/mount/network.c @@ -172,9 +172,9 @@ static const unsigned long probe_mnt3_first[] = { 0, }; -inline const unsigned int *set_default_proto(void); +static const unsigned int *nfs_default_proto(void); #ifdef MOUNT_CONFIG -inline const unsigned int *set_default_proto() +static const unsigned int *nfs_default_proto() { extern unsigned long config_default_proto; /* @@ -187,7 +187,7 @@ inline const unsigned int *set_default_proto() return probe_tcp_first; } #else -inline const unsigned int *set_default_proto() +static const unsigned int *nfs_default_proto() { return probe_tcp_first; } @@ -633,7 +633,7 @@ static int nfs_probe_nfsport(const struct sockaddr *sap, const socklen_t salen, if (nfs_mount_data_version >= 4) { const unsigned int *probe_proto; - probe_proto = set_default_proto(); + probe_proto = nfs_default_proto(); return nfs_probe_port(sap, salen, pmap, probe_nfs3_first, probe_proto); diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c index 709f0ff..3a2a237 100644 --- a/utils/mount/stropts.c +++ b/utils/mount/stropts.c @@ -93,9 +93,10 @@ struct nfsmount_info { child; /* forked bg child? */ }; -inline void set_default_version(struct nfsmount_info *mi); #ifdef MOUNT_CONFIG -inline void set_default_version(struct nfsmount_info *mi) +static void nfs_default_version(struct nfsmount_info *mi); + +static void nfs_default_version(struct nfsmount_info *mi) { extern unsigned long config_default_vers; /* @@ -108,7 +109,7 @@ inline void set_default_version(struct nfsmount_info *mi) } } #else -inline void set_default_version(struct nfsmount_info *mi) {} +inline void nfs_default_version(struct nfsmount_info *mi) {} #endif /* MOUNT_CONFIG */ /* @@ -276,6 +277,7 @@ static int nfs_append_sloppy_option(struct mount_options *options) return 0; return 1; } + /* * Set up mandatory non-version specific NFS mount options. * @@ -306,7 +308,7 @@ static int nfs_validate_options(struct nfsmount_info *mi) * If enabled, see if the default version was * set in the config file */ - set_default_version(mi); + nfs_default_version(mi); if (!nfs_append_sloppy_option(mi->options)) return 0; -- 2.39.2