diff options
author | Steve French <sfrench@us.ibm.com> | 2009-04-30 13:45:10 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-04-30 13:45:10 -0400 |
commit | d185cda7712fd1d9e349174639d76eadc66679be (patch) | |
tree | 6f72704ac0d107b0d53f7ee0be7ddb4d2b34e552 /fs/cifs/cifs_unicode.c | |
parent | 5c2503a8e339fbc82f49d5706c5a4ad650dd9711 (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/cifs_unicode.c')
-rw-r--r-- | fs/cifs/cifs_unicode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c index 2a879cff3a40..6382720acf7c 100644 --- a/fs/cifs/cifs_unicode.c +++ b/fs/cifs/cifs_unicode.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * fs/cifs/cifs_unicode.c | 2 | * fs/cifs/cifs_unicode.c |
3 | * | 3 | * |
4 | * Copyright (c) International Business Machines Corp., 2000,2005 | 4 | * Copyright (c) International Business Machines Corp., 2000,2009 |
5 | * Modified by Steve French (sfrench@us.ibm.com) | 5 | * Modified by Steve French (sfrench@us.ibm.com) |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -244,7 +244,7 @@ cifs_strtoUCS(__le16 *to, const char *from, int len, | |||
244 | } | 244 | } |
245 | 245 | ||
246 | /* | 246 | /* |
247 | * cifs_strndup - copy a string from wire format to the local codepage | 247 | * cifs_strndup_from_ucs - copy a string from wire format to the local codepage |
248 | * @src - source string | 248 | * @src - source string |
249 | * @maxlen - don't walk past this many bytes in the source string | 249 | * @maxlen - don't walk past this many bytes in the source string |
250 | * @is_unicode - is this a unicode string? | 250 | * @is_unicode - is this a unicode string? |
@@ -255,7 +255,7 @@ cifs_strtoUCS(__le16 *to, const char *from, int len, | |||
255 | * error. | 255 | * error. |
256 | */ | 256 | */ |
257 | char * | 257 | char * |
258 | cifs_strndup(const char *src, const int maxlen, const bool is_unicode, | 258 | cifs_strndup_from_ucs(const char *src, const int maxlen, const bool is_unicode, |
259 | const struct nls_table *codepage) | 259 | const struct nls_table *codepage) |
260 | { | 260 | { |
261 | int len; | 261 | int len; |