Skip to content

Commit

Permalink
[NFS] [PATCH] NFS: show addr=ipaddr in /proc/mounts rather than
Browse files Browse the repository at this point in the history
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 <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Jeff Layton authored and Trond Myklebust committed Oct 9, 2007
1 parent f8cf367 commit ddc01c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ddc01c0

Please sign in to comment.