aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.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/connect.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/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 @@
1/* 1/*
2 * fs/cifs/connect.c 2 * fs/cifs/connect.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 * This library is free software; you can redistribute it and/or modify 7 * This library is free software; you can redistribute it and/or modify
@@ -3463,7 +3463,8 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
3463 strncpy(tcon->treeName, tree, MAX_TREE_SIZE); 3463 strncpy(tcon->treeName, tree, MAX_TREE_SIZE);
3464 3464
3465 /* mostly informational -- no need to fail on error here */ 3465 /* mostly informational -- no need to fail on error here */
3466 tcon->nativeFileSystem = cifs_strndup(bcc_ptr, bytes_left, 3466 tcon->nativeFileSystem = cifs_strndup_from_ucs(bcc_ptr,
3467 bytes_left,
3467 smb_buffer->Flags2 & 3468 smb_buffer->Flags2 &
3468 SMBFLG2_UNICODE, 3469 SMBFLG2_UNICODE,
3469 nls_codepage); 3470 nls_codepage);