|
@@ -531,39 +531,32 @@ static void nfs_show_mountd_netid(struct seq_file *m, struct nfs_server *nfss,
|
|
int showdefaults)
|
|
int showdefaults)
|
|
{
|
|
{
|
|
struct sockaddr *sap = (struct sockaddr *) &nfss->mountd_address;
|
|
struct sockaddr *sap = (struct sockaddr *) &nfss->mountd_address;
|
|
|
|
+ char *proto = NULL;
|
|
|
|
|
|
- seq_printf(m, ",mountproto=");
|
|
|
|
switch (sap->sa_family) {
|
|
switch (sap->sa_family) {
|
|
case AF_INET:
|
|
case AF_INET:
|
|
switch (nfss->mountd_protocol) {
|
|
switch (nfss->mountd_protocol) {
|
|
case IPPROTO_UDP:
|
|
case IPPROTO_UDP:
|
|
- seq_printf(m, RPCBIND_NETID_UDP);
|
|
|
|
|
|
+ proto = RPCBIND_NETID_UDP;
|
|
break;
|
|
break;
|
|
case IPPROTO_TCP:
|
|
case IPPROTO_TCP:
|
|
- seq_printf(m, RPCBIND_NETID_TCP);
|
|
|
|
|
|
+ proto = RPCBIND_NETID_TCP;
|
|
break;
|
|
break;
|
|
- default:
|
|
|
|
- if (showdefaults)
|
|
|
|
- seq_printf(m, "auto");
|
|
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case AF_INET6:
|
|
case AF_INET6:
|
|
switch (nfss->mountd_protocol) {
|
|
switch (nfss->mountd_protocol) {
|
|
case IPPROTO_UDP:
|
|
case IPPROTO_UDP:
|
|
- seq_printf(m, RPCBIND_NETID_UDP6);
|
|
|
|
|
|
+ proto = RPCBIND_NETID_UDP6;
|
|
break;
|
|
break;
|
|
case IPPROTO_TCP:
|
|
case IPPROTO_TCP:
|
|
- seq_printf(m, RPCBIND_NETID_TCP6);
|
|
|
|
|
|
+ proto = RPCBIND_NETID_TCP6;
|
|
break;
|
|
break;
|
|
- default:
|
|
|
|
- if (showdefaults)
|
|
|
|
- seq_printf(m, "auto");
|
|
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
- default:
|
|
|
|
- if (showdefaults)
|
|
|
|
- seq_printf(m, "auto");
|
|
|
|
}
|
|
}
|
|
|
|
+ if (proto || showdefaults)
|
|
|
|
+ seq_printf(m, ",mountproto=%s", proto ?: "auto");
|
|
}
|
|
}
|
|
|
|
|
|
static void nfs_show_mountd_options(struct seq_file *m, struct nfs_server *nfss,
|
|
static void nfs_show_mountd_options(struct seq_file *m, struct nfs_server *nfss,
|