Re: [PATCH] cifs: add addr= mount option alias for ip=

Steve French <[email protected]>
Newsgroups gmane.linux.file-systems.cifs
Message-ID <[email protected]>
merged

On Wed, Jun 10, 2009 at 8:57 AM, Jeff Layton<[email protected]> 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 <[email protected]>
> ---
>  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
>
>



-- 
Thanks,

Steve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.