cifs: add addr= mount option alias for ip=
authorJeff Layton <jlayton@redhat.com>
Wed, 10 Jun 2009 13:57:55 +0000 (09:57 -0400)
committerSteve French <sfrench@us.ibm.com>
Wed, 10 Jun 2009 15:39:14 +0000 (15:39 +0000)
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>
fs/cifs/connect.c

index 10151f8..6298dc3 100644 (file)
@@ -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) <