name.c (14da17f9c4a880e3418f7f04071df3cb2e8636e8) | name.c (a19189e5535ed8fd191d8989fc39da1637cfa224) |
---|---|
1/* 2 * linux/fs/hpfs/name.c 3 * 4 * Mikulas Patocka (mikulas@artax.karlin.mff.cuni.cz), 1998-1999 5 * 6 * operations with filenames 7 */ 8 --- 42 unchanged lines hidden (view full) --- 51} 52 53unsigned char *hpfs_translate_name(struct super_block *s, unsigned char *from, 54 unsigned len, int lc, int lng) 55{ 56 unsigned char *to; 57 int i; 58 if (hpfs_sb(s)->sb_chk >= 2) if (hpfs_is_name_long(from, len) != lng) { | 1/* 2 * linux/fs/hpfs/name.c 3 * 4 * Mikulas Patocka (mikulas@artax.karlin.mff.cuni.cz), 1998-1999 5 * 6 * operations with filenames 7 */ 8 --- 42 unchanged lines hidden (view full) --- 51} 52 53unsigned char *hpfs_translate_name(struct super_block *s, unsigned char *from, 54 unsigned len, int lc, int lng) 55{ 56 unsigned char *to; 57 int i; 58 if (hpfs_sb(s)->sb_chk >= 2) if (hpfs_is_name_long(from, len) != lng) { |
59 pr_warn("Long name flag mismatch - name "); | 59 pr_err("Long name flag mismatch - name "); |
60 for (i = 0; i < len; i++) 61 pr_cont("%c", from[i]); 62 pr_cont(" misidentified as %s.\n", lng ? "short" : "long"); | 60 for (i = 0; i < len; i++) 61 pr_cont("%c", from[i]); 62 pr_cont(" misidentified as %s.\n", lng ? "short" : "long"); |
63 pr_warn("It's nothing serious. It could happen because of bug in OS/2.\nSet checks=normal to disable this message.\n"); | 63 pr_err("It's nothing serious. It could happen because of bug in OS/2.\nSet checks=normal to disable this message.\n"); |
64 } 65 if (!lc) return from; 66 if (!(to = kmalloc(len, GFP_KERNEL))) { | 64 } 65 if (!lc) return from; 66 if (!(to = kmalloc(len, GFP_KERNEL))) { |
67 pr_warn("can't allocate memory for name conversion buffer\n"); | 67 pr_err("can't allocate memory for name conversion buffer\n"); |
68 return from; 69 } 70 for (i = 0; i < len; i++) to[i] = locase(hpfs_sb(s)->sb_cp_table,from[i]); 71 return to; 72} 73 74int hpfs_compare_names(struct super_block *s, 75 const unsigned char *n1, unsigned l1, --- 38 unchanged lines hidden --- | 68 return from; 69 } 70 for (i = 0; i < len; i++) to[i] = locase(hpfs_sb(s)->sb_cp_table,from[i]); 71 return to; 72} 73 74int hpfs_compare_names(struct super_block *s, 75 const unsigned char *n1, unsigned l1, --- 38 unchanged lines hidden --- |