diff options
author | Jeff Layton <jlayton@redhat.com> | 2009-04-30 06:46:32 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-04-30 15:45:00 +0000 |
commit | 69f801fcaa03be83d58c564f00913b7c172808e4 (patch) | |
tree | 35e359acc85bef8669b001ccb412afb96d256a82 /fs/cifs/cifs_unicode.h | |
parent | 7fabf0c9479fef9fdb9528a5fbdb1cb744a744a4 (diff) |
cifs: add new function to get unicode string length in bytes
Working in units of words means we do a lot of unnecessary conversion back
and forth. Standardize on bytes instead since that's more useful for
allocating buffers and such. Also, remove hostlen_fromUCS since the new
function has a similar purpose.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifs_unicode.h')
-rw-r--r-- | fs/cifs/cifs_unicode.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/cifs_unicode.h b/fs/cifs/cifs_unicode.h index 6aa6533e49f..1857f5ff933 100644 --- a/fs/cifs/cifs_unicode.h +++ b/fs/cifs/cifs_unicode.h @@ -74,6 +74,8 @@ extern struct UniCaseRange UniLowerRange[]; #ifdef __KERNEL__ int cifs_from_ucs2(char *to, const __le16 *from, int tolen, int fromlen, const struct nls_table *codepage, bool mapchar); +int cifs_ucs2_bytes(const __le16 *from, int maxbytes, + const struct nls_table *codepage); int cifs_strfromUCS_le(char *, const __le16 *, int, const struct nls_table *); int cifs_strtoUCS(__le16 *, const char *, int, const struct nls_table *); #endif |