X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fconfigfile.c;h=6f2ee75f11c9c159124f2127914c819f12c9bacf;hp=1dd4159a74b97d1ef48a762c7c9143cb07216f82;hb=12544486ef2de86e4f2dfc920cd2860fb81658d1;hpb=d63f9e0ccb836d592593a9816ccc00a51c903328 diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c index 1dd4159..6f2ee75 100644 --- a/utils/mount/configfile.c +++ b/utils/mount/configfile.c @@ -192,7 +192,8 @@ void free_all(void) } } static char *versions[] = {"v2", "v3", "v4", "vers", "nfsvers", NULL}; -int inline check_vers(char *mopt, char *field) +static int +check_vers(char *mopt, char *field) { int i, found=0; @@ -222,12 +223,15 @@ int inline check_vers(char *mopt, char *field) unsigned long config_default_vers; unsigned long config_default_proto; +extern sa_family_t config_default_family; + /* * Check to see if a default value is being set. * If so, set the appropriate global value which will * be used as the initial value in the server negation. */ -int inline default_value(char *mopt) +static int +default_value(char *mopt) { struct mount_options *options = NULL; int dftlen = strlen("default"); @@ -243,6 +247,10 @@ int inline default_value(char *mopt) xlog_warn("Unable to set default protocol : %s", strerror(errno)); } + if (!nfs_nfs_proto_family(options, &config_default_family)) { + xlog_warn("Unable to set default family : %s", + strerror(errno)); + } } else { xlog_warn("Unable to alloc memory for default protocol"); }