diff mbox

Add warning that NFS syntax is deprecated and will be removed in cifs-utils-6.0.

Message ID 1350583669-12118-2-git-send-email-scott.lovenberg@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Scott Lovenberg Oct. 18, 2012, 6:07 p.m. UTC
From: Scott Lovenberg <scott.lovenberg@gmail.com>

Signed-off-by: Scott Lovenberg <scott.lovenberg@gmail.com>
---
 mount.cifs.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Comments

Jeff Layton Oct. 23, 2012, 7:40 p.m. UTC | #1
On Thu, 18 Oct 2012 14:07:49 -0400
scott.lovenberg@gmail.com wrote:

> From: Scott Lovenberg <scott.lovenberg@gmail.com>
> 
> Signed-off-by: Scott Lovenberg <scott.lovenberg@gmail.com>
> ---
>  mount.cifs.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/mount.cifs.c b/mount.cifs.c
> index 756fce2..061ce32 100644
> --- a/mount.cifs.c
> +++ b/mount.cifs.c
> @@ -1335,6 +1335,7 @@ static int parse_unc(const char *unc_name, struct parsed_mount_info *parsed_info
>  	}
>  
>  	/* Set up "host" and "share" pointers based on UNC format. */
> +	/* TODO: Remove support for NFS syntax as of cifs-utils-6.0. */
>  	if (strncmp(unc_name, "//", 2) && strncmp(unc_name, "\\\\", 2)) {
>  		/*
>  		 * check for nfs syntax (server:/share/prepath)
> @@ -1351,6 +1352,9 @@ static int parse_unc(const char *unc_name, struct parsed_mount_info *parsed_info
>  		share++;
>  		if (*share == '/')
>  			++share;
> +		fprintf(stderr, "WARNING: using NFS syntax for mounting CIFS "
> +			"shares is deprecated and will be removed in cifs-utils"
> +			"-6.0. Please migrate to UNC syntax.");
>  	} else {
>  		host = unc_name + 2;
>  		hostlen = strcspn(host, "/\\");

Merged (with addition of a newline to the end of warning message)...
diff mbox

Patch

diff --git a/mount.cifs.c b/mount.cifs.c
index 756fce2..061ce32 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -1335,6 +1335,7 @@  static int parse_unc(const char *unc_name, struct parsed_mount_info *parsed_info
 	}
 
 	/* Set up "host" and "share" pointers based on UNC format. */
+	/* TODO: Remove support for NFS syntax as of cifs-utils-6.0. */
 	if (strncmp(unc_name, "//", 2) && strncmp(unc_name, "\\\\", 2)) {
 		/*
 		 * check for nfs syntax (server:/share/prepath)
@@ -1351,6 +1352,9 @@  static int parse_unc(const char *unc_name, struct parsed_mount_info *parsed_info
 		share++;
 		if (*share == '/')
 			++share;
+		fprintf(stderr, "WARNING: using NFS syntax for mounting CIFS "
+			"shares is deprecated and will be removed in cifs-utils"
+			"-6.0. Please migrate to UNC syntax.");
 	} else {
 		host = unc_name + 2;
 		hostlen = strcspn(host, "/\\");