aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/sess.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2009-04-30 13:45:10 -0400
committerSteve French <sfrench@us.ibm.com>2009-04-30 13:45:10 -0400
commitd185cda7712fd1d9e349174639d76eadc66679be (patch)
tree6f72704ac0d107b0d53f7ee0be7ddb4d2b34e552 /fs/cifs/sess.c
parent5c2503a8e339fbc82f49d5706c5a4ad650dd9711 (diff)
[CIFS] rename cifs_strndup to cifs_strndup_from_ucs
In most cases, cifs_strndup is converting from Unicode (UCS2 / UTF-32) to the configured local code page for the Linux mount (usually UTF8), so Jeff suggested that to make it more clear that cifs_strndup is doing a conversion not just memory allocation and copy, rename the function to including "from_ucs" (ie Unicode) Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/sess.c')
-rw-r--r--fs/cifs/sess.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 93022dc9babb..2bcff17047ab 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * SMB/CIFS session setup handling routines 4 * SMB/CIFS session setup handling routines
5 * 5 *
6 * Copyright (c) International Business Machines Corp., 2006, 2007 6 * Copyright (c) International Business Machines Corp., 2006, 2009
7 * Author(s): Steve French (sfrench@us.ibm.com) 7 * Author(s): Steve French (sfrench@us.ibm.com)
8 * 8 *
9 * This library is free software; you can redistribute it and/or modify 9 * This library is free software; you can redistribute it and/or modify
@@ -300,7 +300,7 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses,
300 } 300 }
301 301
302 kfree(ses->serverOS); 302 kfree(ses->serverOS);
303 ses->serverOS = cifs_strndup(data, bleft, true, nls_cp); 303 ses->serverOS = cifs_strndup_from_ucs(data, bleft, true, nls_cp);
304 cFYI(1, ("serverOS=%s", ses->serverOS)); 304 cFYI(1, ("serverOS=%s", ses->serverOS));
305 len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2; 305 len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2;
306 data += len; 306 data += len;
@@ -309,7 +309,7 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses,
309 return; 309 return;
310 310
311 kfree(ses->serverNOS); 311 kfree(ses->serverNOS);
312 ses->serverNOS = cifs_strndup(data, bleft, true, nls_cp); 312 ses->serverNOS = cifs_strndup_from_ucs(data, bleft, true, nls_cp);
313 cFYI(1, ("serverNOS=%s", ses->serverNOS)); 313 cFYI(1, ("serverNOS=%s", ses->serverNOS));
314 len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2; 314 len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2;
315 data += len; 315 data += len;
@@ -318,7 +318,7 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses,
318 return; 318 return;
319 319
320 kfree(ses->serverDomain); 320 kfree(ses->serverDomain);
321 ses->serverDomain = cifs_strndup(data, bleft, true, nls_cp); 321 ses->serverDomain = cifs_strndup_from_ucs(data, bleft, true, nls_cp);
322 cFYI(1, ("serverDomain=%s", ses->serverDomain)); 322 cFYI(1, ("serverDomain=%s", ses->serverDomain));
323 323
324 return; 324 return;