Skip to content

Commit

Permalink
cifs: add addr= mount option alias for ip=
Browse files Browse the repository at this point in the history
When you look in /proc/mounts, the address of the server gets displayed
as "addr=". That's really a better option to use anyway since it's more
generic. What if we eventually want to support non-IP transports? It
also makes CIFS option consistent with the NFS option of the same name.

Begin the migration to that option name by adding an alias for ip=
called addr=.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Jeff Layton authored and Steve French committed Jun 10, 2009
1 parent f0472d0 commit 58f7f68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,8 @@ cifs_parse_mount_options(char *options, const char *devname,
}
strcpy(vol->password, value);
}
} else if (strnicmp(data, "ip", 2) == 0) {
} else if (!strnicmp(data, "ip", 2) ||
!strnicmp(data, "addr", 4)) {
if (!value || !*value) {
vol->UNCip = NULL;
} else if (strnlen(value, INET6_ADDRSTRLEN) <
Expand Down

0 comments on commit 58f7f68

Please sign in to comment.