diff mbox

[linux-cifs-client] cifs: add addr= mount option alias for ip=

Message ID 1244642276-24398-2-git-send-email-jlayton@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeff Layton June 10, 2009, 1:57 p.m. UTC
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(-)

Comments

Steve French June 10, 2009, 3:39 p.m. UTC | #1
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 mbox

Patch

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) <