aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2009-04-16 11:21:53 -0400
committerSteve French <sfrench@us.ibm.com>2009-04-16 21:26:50 -0400
commit313fecfa69bbad0a10d3313a50a89d3064f47ce1 (patch)
treebf75ff66a0e629af493b1a6f2d1b6148569b6b4a /fs/cifs
parentf083def68f84b04fe3f97312498911afce79609e (diff)
cifs: add cFYI messages with some of the saved strings from ssetup/tcon
...to make it easier to find problems in this area in the future. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/connect.c5
-rw-r--r--fs/cifs/sess.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 1a93604d98f..4a04ecdc1b7 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3757,11 +3757,14 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
3757 kfree(tcon->nativeFileSystem); 3757 kfree(tcon->nativeFileSystem);
3758 tcon->nativeFileSystem = 3758 tcon->nativeFileSystem =
3759 kzalloc((4 * length) + 2, GFP_KERNEL); 3759 kzalloc((4 * length) + 2, GFP_KERNEL);
3760 if (tcon->nativeFileSystem) 3760 if (tcon->nativeFileSystem) {
3761 cifs_strfromUCS_le( 3761 cifs_strfromUCS_le(
3762 tcon->nativeFileSystem, 3762 tcon->nativeFileSystem,
3763 (__le16 *) bcc_ptr, 3763 (__le16 *) bcc_ptr,
3764 length, nls_codepage); 3764 length, nls_codepage);
3765 cFYI(1, ("nativeFileSystem=%s",
3766 tcon->nativeFileSystem));
3767 }
3765 bcc_ptr += (2 * length) + 2; 3768 bcc_ptr += (2 * length) + 2;
3766 } 3769 }
3767 /* else do not bother copying these information fields*/ 3770 /* else do not bother copying these information fields*/
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 70d04d08293..c652c73760d 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -311,8 +311,10 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft,
311 kfree(ses->serverOS); 311 kfree(ses->serverOS);
312 /* UTF-8 string will not grow more than four times as big as UCS-16 */ 312 /* UTF-8 string will not grow more than four times as big as UCS-16 */
313 ses->serverOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL); 313 ses->serverOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL);
314 if (ses->serverOS != NULL) 314 if (ses->serverOS != NULL) {
315 cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp); 315 cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp);
316 cFYI(1, ("serverOS=%s", ses->serverOS));
317 }
316 data += 2 * (len + 1); 318 data += 2 * (len + 1);
317 words_left -= len + 1; 319 words_left -= len + 1;
318 320
@@ -327,6 +329,7 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft,
327 if (ses->serverNOS != NULL) { 329 if (ses->serverNOS != NULL) {
328 cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len, 330 cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len,
329 nls_cp); 331 nls_cp);
332 cFYI(1, ("serverNOS=%s", ses->serverNOS));
330 if (strncmp(ses->serverNOS, "NT LAN Manager 4", 16) == 0) { 333 if (strncmp(ses->serverNOS, "NT LAN Manager 4", 16) == 0) {
331 cFYI(1, ("NT4 server")); 334 cFYI(1, ("NT4 server"));
332 ses->flags |= CIFS_SES_NT4; 335 ses->flags |= CIFS_SES_NT4;
@@ -343,9 +346,11 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft,
343 346
344 kfree(ses->serverDomain); 347 kfree(ses->serverDomain);
345 ses->serverDomain = kzalloc((4 * len) + 2, GFP_KERNEL); 348 ses->serverDomain = kzalloc((4 * len) + 2, GFP_KERNEL);
346 if (ses->serverDomain != NULL) 349 if (ses->serverDomain != NULL) {
347 cifs_strfromUCS_le(ses->serverDomain, (__le16 *)data, len, 350 cifs_strfromUCS_le(ses->serverDomain, (__le16 *)data, len,
348 nls_cp); 351 nls_cp);
352 cFYI(1, ("serverDomain=%s", ses->serverDomain));
353 }
349 data += 2 * (len + 1); 354 data += 2 * (len + 1);
350 words_left -= len + 1; 355 words_left -= len + 1;
351 356