From: Jeff Layton Date: Mon, 30 Jul 2007 12:47:38 +0000 (-0400) Subject: [NFS] [PATCH] NFS: show addr=ipaddr in /proc/mounts rather than X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ddc01c0813dc07ca7a2bd32c143a9b54a64915ce;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [NFS] [PATCH] NFS: show addr=ipaddr in /proc/mounts rather than A minor thing, but useful when working with a server with multiple addrs. This looks like it might also be necessary if Miklos' effort to eliminate /etc/mtab ever comes to fruition. When displaying mount options in /proc/mounts, the kernel prints "addr=hostname". This info is redundant since we already have the hostname displayed as part of the "device" section of the mount. This patch changes it to display the IP address to which the socket is connected. Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/super.c b/fs/nfs/super.c index b878528b64c1..42b8c671da35 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -506,8 +506,8 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt) nfs_show_mount_options(m, nfss, 0); - seq_puts(m, ",addr="); - seq_escape(m, nfss->nfs_client->cl_hostname, " \t\n\\"); + seq_printf(m, ",addr="NIPQUAD_FMT, + NIPQUAD(nfss->nfs_client->cl_addr.sin_addr)); return 0; }