aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/netmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/netmisc.c')
-rw-r--r--fs/cifs/netmisc.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index 646e1f06941b..3b5a5ce882b6 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * fs/cifs/netmisc.c 2 * fs/cifs/netmisc.c
3 * 3 *
4 * Copyright (c) International Business Machines Corp., 2002 4 * Copyright (c) International Business Machines Corp., 2002,2008
5 * Author(s): Steve French (sfrench@us.ibm.com) 5 * Author(s): Steve French (sfrench@us.ibm.com)
6 * 6 *
7 * Error mapping routines from Samba libsmb/errormap.c 7 * Error mapping routines from Samba libsmb/errormap.c
@@ -150,9 +150,7 @@ static int canonicalize_unc(char *cp)
150 if (cp[i] == '\\') 150 if (cp[i] == '\\')
151 break; 151 break;
152 if (cp[i] == '/') { 152 if (cp[i] == '/') {
153#ifdef CONFIG_CIFS_DEBUG2 153 cFYI(DBG2, ("change slash to \\ in malformed UNC"));
154 cFYI(1, ("change slash to backslash in malformed UNC"));
155#endif
156 cp[i] = '\\'; 154 cp[i] = '\\';
157 return 1; 155 return 1;
158 } 156 }
@@ -178,9 +176,7 @@ cifs_inet_pton(int address_family, char *cp, void *dst)
178 } else if (address_family == AF_INET6) { 176 } else if (address_family == AF_INET6) {
179 ret = in6_pton(cp, -1 /* len */, dst , '\\', NULL); 177 ret = in6_pton(cp, -1 /* len */, dst , '\\', NULL);
180 } 178 }
181#ifdef CONFIG_CIFS_DEBUG2 179 cFYI(DBG2, ("address conversion returned %d for %s", ret, cp));
182 cFYI(1, ("address conversion returned %d for %s", ret, cp));
183#endif
184 if (ret > 0) 180 if (ret > 0)
185 ret = 1; 181 ret = 1;
186 return ret; 182 return ret;
@@ -253,7 +249,8 @@ static const struct {
253 ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_MIX}, { 249 ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_MIX}, {
254 ERRHRD, ERRgeneral, NT_STATUS_INVALID_QUOTA_LOWER}, { 250 ERRHRD, ERRgeneral, NT_STATUS_INVALID_QUOTA_LOWER}, {
255 ERRHRD, ERRgeneral, NT_STATUS_DISK_CORRUPT_ERROR}, { 251 ERRHRD, ERRgeneral, NT_STATUS_DISK_CORRUPT_ERROR}, {
256 ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_INVALID}, { /* mapping changed since shell does lookup on * and expects file not found */ 252 /* mapping changed since shell does lookup on * expects FileNotFound */
253 ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_INVALID}, {
257 ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_NOT_FOUND}, { 254 ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_NOT_FOUND}, {
258 ERRDOS, ERRalreadyexists, NT_STATUS_OBJECT_NAME_COLLISION}, { 255 ERRDOS, ERRalreadyexists, NT_STATUS_OBJECT_NAME_COLLISION}, {
259 ERRHRD, ERRgeneral, NT_STATUS_HANDLE_NOT_WAITABLE}, { 256 ERRHRD, ERRgeneral, NT_STATUS_HANDLE_NOT_WAITABLE}, {
@@ -820,7 +817,8 @@ map_smb_to_linux_error(struct smb_hdr *smb, int logErr)
820 /* old style errors */ 817 /* old style errors */
821 818
822 /* DOS class smb error codes - map DOS */ 819 /* DOS class smb error codes - map DOS */
823 if (smberrclass == ERRDOS) { /* 1 byte field no need to byte reverse */ 820 if (smberrclass == ERRDOS) {
821 /* 1 byte field no need to byte reverse */
824 for (i = 0; 822 for (i = 0;
825 i < 823 i <
826 sizeof(mapping_table_ERRDOS) / 824 sizeof(mapping_table_ERRDOS) /
@@ -834,7 +832,8 @@ map_smb_to_linux_error(struct smb_hdr *smb, int logErr)
834 } 832 }
835 /* else try next error mapping one to see if match */ 833 /* else try next error mapping one to see if match */
836 } 834 }
837 } else if (smberrclass == ERRSRV) { /* server class of error codes */ 835 } else if (smberrclass == ERRSRV) {
836 /* server class of error codes */
838 for (i = 0; 837 for (i = 0;
839 i < 838 i <
840 sizeof(mapping_table_ERRSRV) / 839 sizeof(mapping_table_ERRSRV) /
@@ -922,8 +921,8 @@ struct timespec cnvrtDosUnixTm(__u16 date, __u16 time)
922{ 921{
923 struct timespec ts; 922 struct timespec ts;
924 int sec, min, days, month, year; 923 int sec, min, days, month, year;
925 SMB_TIME * st = (SMB_TIME *)&time; 924 SMB_TIME *st = (SMB_TIME *)&time;
926 SMB_DATE * sd = (SMB_DATE *)&date; 925 SMB_DATE *sd = (SMB_DATE *)&date;
927 926
928 cFYI(1, ("date %d time %d", date, time)); 927 cFYI(1, ("date %d time %d", date, time));
929 928