diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2005-12-24 14:33:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-10 19:15:34 -0400 |
commit | d02d48d8650bf3e2011f25373dbcf87f3c19f16b (patch) | |
tree | 436d4d5428a7a985cc3465c219897e9be2b6e27e /fs | |
parent | 6ca1584173d0320f47464092eb180a17259cc3f9 (diff) |
[PATCH] isofs endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/isofs/joliet.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/isofs/joliet.c b/fs/isofs/joliet.c index 81a90e170ac3..fb8fe7a9ddc6 100644 --- a/fs/isofs/joliet.c +++ b/fs/isofs/joliet.c | |||
@@ -14,9 +14,9 @@ | |||
14 | * Convert Unicode 16 to UTF-8 or ASCII. | 14 | * Convert Unicode 16 to UTF-8 or ASCII. |
15 | */ | 15 | */ |
16 | static int | 16 | static int |
17 | uni16_to_x8(unsigned char *ascii, u16 *uni, int len, struct nls_table *nls) | 17 | uni16_to_x8(unsigned char *ascii, __be16 *uni, int len, struct nls_table *nls) |
18 | { | 18 | { |
19 | wchar_t *ip, ch; | 19 | __be16 *ip, ch; |
20 | unsigned char *op; | 20 | unsigned char *op; |
21 | 21 | ||
22 | ip = uni; | 22 | ip = uni; |
@@ -24,8 +24,8 @@ uni16_to_x8(unsigned char *ascii, u16 *uni, int len, struct nls_table *nls) | |||
24 | 24 | ||
25 | while ((ch = get_unaligned(ip)) && len) { | 25 | while ((ch = get_unaligned(ip)) && len) { |
26 | int llen; | 26 | int llen; |
27 | ch = be16_to_cpu(ch); | 27 | llen = nls->uni2char(be16_to_cpu(ch), op, NLS_MAX_CHARSET_SIZE); |
28 | if ((llen = nls->uni2char(ch, op, NLS_MAX_CHARSET_SIZE)) > 0) | 28 | if (llen > 0) |
29 | op += llen; | 29 | op += llen; |
30 | else | 30 | else |
31 | *op++ = '?'; | 31 | *op++ = '?'; |
@@ -82,7 +82,7 @@ get_joliet_filename(struct iso_directory_record * de, unsigned char *outname, st | |||
82 | len = wcsntombs_be(outname, de->name, | 82 | len = wcsntombs_be(outname, de->name, |
83 | de->name_len[0] >> 1, PAGE_SIZE); | 83 | de->name_len[0] >> 1, PAGE_SIZE); |
84 | } else { | 84 | } else { |
85 | len = uni16_to_x8(outname, (u16 *) de->name, | 85 | len = uni16_to_x8(outname, (__be16 *) de->name, |
86 | de->name_len[0] >> 1, nls); | 86 | de->name_len[0] >> 1, nls); |
87 | } | 87 | } |
88 | if ((len > 2) && (outname[len-2] == ';') && (outname[len-1] == '1')) { | 88 | if ((len > 2) && (outname[len-2] == ';') && (outname[len-1] == '1')) { |