diff --git a/fs/hfsplus/unicode.c b/fs/hfsplus/unicode.c index d3a142f4518b..418806c27943 100644 --- a/fs/hfsplus/unicode.c +++ b/fs/hfsplus/unicode.c @@ -11,7 +11,6 @@ #include #include - #include #include "hfsplus_fs.h" @@ -22,12 +21,18 @@ static inline u16 case_fold(u16 c) { u16 tmp; - + pr_alert("CASE_FOLD: Input c=0x%04x, c>>8=0x%02x (this is array index!)\n", c, c >> 8); tmp = hfsplus_case_fold_table[c >> 8]; - if (tmp) + pr_alert("CASE_FOLD: table[0x%02x]=0x%04x\n", c >> 8, tmp); + + if (tmp) { + pr_alert("CASE_FOLD: Second lookup: table[0x%04x + 0x%02x]\n",tmp, c & 0xff); tmp = hfsplus_case_fold_table[tmp + (c & 0xff)]; - else + } else { tmp = c; + } + pr_alert("CASE_FOLD: Final result=0x%04x\n", tmp); + return tmp; }