Message ID | 1244642276-24398-2-git-send-email-jlayton@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
merged On Wed, Jun 10, 2009 at 8:57 AM, Jeff Layton<jlayton@redhat.com> wrote: > 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> > --- > Â fs/cifs/connect.c | Â Â 3 ++- > Â 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c > index c424156..7a39c22 100644 > --- a/fs/cifs/connect.c > +++ b/fs/cifs/connect.c > @@ -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) < > -- > 1.6.0.6 > >
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index c424156..7a39c22 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -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) <
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> --- fs/cifs/connect.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)