[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>
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 93022dc..2bcff17 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -3,7 +3,7 @@
*
* SMB/CIFS session setup handling routines
*
- * Copyright (c) International Business Machines Corp., 2006, 2007
+ * Copyright (c) International Business Machines Corp., 2006, 2009
* Author(s): Steve French (sfrench@us.ibm.com)
*
* This library is free software; you can redistribute it and/or modify
@@ -300,7 +300,7 @@
}
kfree(ses->serverOS);
- ses->serverOS = cifs_strndup(data, bleft, true, nls_cp);
+ ses->serverOS = cifs_strndup_from_ucs(data, bleft, true, nls_cp);
cFYI(1, ("serverOS=%s", ses->serverOS));
len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2;
data += len;
@@ -309,7 +309,7 @@
return;
kfree(ses->serverNOS);
- ses->serverNOS = cifs_strndup(data, bleft, true, nls_cp);
+ ses->serverNOS = cifs_strndup_from_ucs(data, bleft, true, nls_cp);
cFYI(1, ("serverNOS=%s", ses->serverNOS));
len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2;
data += len;
@@ -318,7 +318,7 @@
return;
kfree(ses->serverDomain);
- ses->serverDomain = cifs_strndup(data, bleft, true, nls_cp);
+ ses->serverDomain = cifs_strndup_from_ucs(data, bleft, true, nls_cp);
cFYI(1, ("serverDomain=%s", ses->serverDomain));
return;