aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.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/cifssmb.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/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index dfb8e391d538..df5276e628bf 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * fs/cifs/cifssmb.c 2 * fs/cifs/cifssmb.c
3 * 3 *
4 * Copyright (C) International Business Machines Corp., 2002,2008 4 * Copyright (C) International Business Machines Corp., 2002,2009
5 * Author(s): Steve French (sfrench@us.ibm.com) 5 * Author(s): Steve French (sfrench@us.ibm.com)
6 * 6 *
7 * Contains the routines for constructing the SMB PDUs themselves 7 * Contains the routines for constructing the SMB PDUs themselves
@@ -2457,7 +2457,7 @@ querySymLinkRetry:
2457 le16_to_cpu(pSMBr->t2.DataOffset); 2457 le16_to_cpu(pSMBr->t2.DataOffset);
2458 2458
2459 /* BB FIXME investigate remapping reserved chars here */ 2459 /* BB FIXME investigate remapping reserved chars here */
2460 *symlinkinfo = cifs_strndup(data_start, count, 2460 *symlinkinfo = cifs_strndup_from_ucs(data_start, count,
2461 pSMBr->hdr.Flags2 & 2461 pSMBr->hdr.Flags2 &
2462 SMBFLG2_UNICODE, 2462 SMBFLG2_UNICODE,
2463 nls_codepage); 2463 nls_codepage);
@@ -3965,8 +3965,8 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
3965 /* copy DfsPath */ 3965 /* copy DfsPath */
3966 temp = (char *)ref + le16_to_cpu(ref->DfsPathOffset); 3966 temp = (char *)ref + le16_to_cpu(ref->DfsPathOffset);
3967 max_len = data_end - temp; 3967 max_len = data_end - temp;
3968 node->path_name = cifs_strndup(temp, max_len, is_unicode, 3968 node->path_name = cifs_strndup_from_ucs(temp, max_len,
3969 nls_codepage); 3969 is_unicode, nls_codepage);
3970 if (IS_ERR(node->path_name)) { 3970 if (IS_ERR(node->path_name)) {
3971 rc = PTR_ERR(node->path_name); 3971 rc = PTR_ERR(node->path_name);
3972 node->path_name = NULL; 3972 node->path_name = NULL;
@@ -3976,8 +3976,8 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
3976 /* copy link target UNC */ 3976 /* copy link target UNC */
3977 temp = (char *)ref + le16_to_cpu(ref->NetworkAddressOffset); 3977 temp = (char *)ref + le16_to_cpu(ref->NetworkAddressOffset);
3978 max_len = data_end - temp; 3978 max_len = data_end - temp;
3979 node->node_name = cifs_strndup(temp, max_len, is_unicode, 3979 node->node_name = cifs_strndup_from_ucs(temp, max_len,
3980 nls_codepage); 3980 is_unicode, nls_codepage);
3981 if (IS_ERR(node->node_name)) { 3981 if (IS_ERR(node->node_name)) {
3982 rc = PTR_ERR(node->node_name); 3982 rc = PTR_ERR(node->node_name);
3983 node->node_name = NULL; 3983 node->node_name = NULL;