summaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2009-04-30 19:45:10 +0200
committerSteve French <sfrench@us.ibm.com>2009-04-30 19:45:10 +0200
commitd185cda7712fd1d9e349174639d76eadc66679be (patch)
tree6f72704ac0d107b0d53f7ee0be7ddb4d2b34e552 /fs/cifs/connect.c
parentAdded loop check when mounting DFS tree. (diff)
downloadlinux-d185cda7712fd1d9e349174639d76eadc66679be.tar.xz
linux-d185cda7712fd1d9e349174639d76eadc66679be.zip
[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/connect.c')
-rw-r--r--fs/cifs/connect.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 7e5d4fda4936..39f5362e2cb5 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1,7 +1,7 @@
/*
* fs/cifs/connect.c
*
- * Copyright (C) International Business Machines Corp., 2002,2008
+ * Copyright (C) International Business Machines Corp., 2002,2009
* Author(s): Steve French (sfrench@us.ibm.com)
*
* This library is free software; you can redistribute it and/or modify
@@ -3463,7 +3463,8 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
strncpy(tcon->treeName, tree, MAX_TREE_SIZE);
/* mostly informational -- no need to fail on error here */
- tcon->nativeFileSystem = cifs_strndup(bcc_ptr, bytes_left,
+ tcon->nativeFileSystem = cifs_strndup_from_ucs(bcc_ptr,
+ bytes_left,
smb_buffer->Flags2 &
SMBFLG2_UNICODE,
nls_codepage);