]> git.hungrycats.org Git - linux/commitdiff
JFS: Fix non-ascii file name problem
authorDave Kleikamp <shaggy@austin.ibm.com>
Tue, 27 Apr 2004 04:04:53 +0000 (23:04 -0500)
committerDave Kleikamp <shaggy@austin.ibm.com>
Tue, 27 Apr 2004 04:04:53 +0000 (23:04 -0500)
An unintentional sign extention caused non-ascii characters to be
stored incorrectly, leading to inaccessible files.  Changing a
declaration to unsigned char fixes the problem.

fs/jfs/jfs_unicode.c

index ff67b61ceabc2cbbcaceade90205492c3a331138..974077fe124ba250c2e44dde1b3638f86d51fc18 100644 (file)
@@ -78,7 +78,7 @@ int jfs_strfromUCS_le(char *to, const wchar_t * from, /* LITTLE ENDIAN */
  * FUNCTION:   Convert character string to unicode string
  *
  */
-static int jfs_strtoUCS(wchar_t * to, const char *from, int len,
+static int jfs_strtoUCS(wchar_t * to, const unsigned char *from, int len,
                struct nls_table *codepage)
 {
        int charlen;
@@ -92,8 +92,7 @@ static int jfs_strtoUCS(wchar_t * to, const char *from, int len,
                                jfs_err("jfs_strtoUCS: char2uni returned %d.",
                                        charlen);
                                jfs_err("charset = %s, char = 0x%x",
-                                       codepage->charset,
-                                       (unsigned char) *from);
+                                       codepage->charset, *from);
                                return charlen;
                        }
                }