mount.cifs: remove support for "NFS syntax"
Subsystems (2)
PATCH 1/1 mount.cifs: remove support for "NFS syntax"
...as promised for version 6.0.
Cc Scott Lovenberg <[email protected]>
Signed-off-by Jeff Layton <[email protected]>
--- mount.cifs.c | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-)
mount.cifs.c +10 -28
@@ -1232,36 +1232,18 @@ static int parse_unc(const char *unc_name, struct parsed_mount_info *parsed_inforeturn EX_USAGE ; } -/* 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) -* -* FIXME: IPv6 addresses? -*/ - host = unc_name; - share =strchr (host,':' ); -if (!share) { -fprintf (stderr,"mount.cifs: bad UNC (%s)\n" , unc_name); -return EX_USAGE ; - } - hostlen = share - host; - 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.\n" ); - }else { - host = unc_name +2 ; - hostlen =strcspn (host,"/\\" ); -if (!hostlen) { -fprintf (stderr,"mount.cifs: bad UNC (%s)\n" , unc_name); -return EX_USAGE ; - } - share = host + hostlen +1 ; +fprintf (stderr,"mount.cifs: bad UNC (%s)\n" , unc_name); +return EX_USAGE ; + } + + host = unc_name +2 ; + hostlen =strcspn (host,"/\\" ); +if (!hostlen) { +fprintf (stderr,"mount.cifs: bad UNC (%s)\n" , unc_name); +return EX_USAGE ; } + share = host + hostlen +1 ;if (hostlen +1 >sizeof (parsed_info->host)) {fprintf (stderr,"mount.cifs: host portion of UNC too long\n" );
Signature · 1 line
1.7.11.7
A message that is not in the archive (sent off-list or not yet received): 1363949407-6327-1-git-send-email-jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org
Quoted 61 lines · Jeff Layton
...as promised for version 6.0.
Cc Scott Lovenberg <[email protected]>Signed-off-by Jeff Layton <[email protected]>--- mount.cifs.c | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-)mount.cifs.c +10
-29@@ -1232,36 +1232,18 @@ static int parse_unc(const char *unc_name, struct parsed_mount_info *parsed_inforeturn EX_USAGE ; } -/* 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) -* -* FIXME: IPv6 addresses? -*/ - host = unc_name; - share =strchr (host,':' ); -if (!share) { -fprintf (stderr,"mount.cifs: bad UNC (%s)\n" , unc_name); -return EX_USAGE ; - } - hostlen = share - host; - 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.\n" ); - }else { - host = unc_name +2 ; - hostlen =strcspn (host,"/\\" ); -if (!hostlen) { -fprintf (stderr,"mount.cifs: bad UNC (%s)\n" , unc_name); -return EX_USAGE ; - } - share = host + hostlen +1 ; +fprintf (stderr,"mount.cifs: bad UNC (%s)\n" , unc_name); +return EX_USAGE ; + } + + host = unc_name +2 ; + hostlen =strcspn (host,"/\\" ); +if (!hostlen) { +fprintf (stderr,"mount.cifs: bad UNC (%s)\n" , unc_name); +return EX_USAGE ; } + share = host + hostlen +1 ;if (hostlen +1 >sizeof (parsed_info->host)) {fprintf (stderr,"mount.cifs: host portion of UNC too long\n" ); --
Quoted 2 lines
1.7.11.7
+1. Looks good to me.
--
Peace and Blessings,
-Scott.