diff options
| author | Alexey Fisher <bug-track@fisher-privat.net> | 2011-04-12 08:08:38 -0400 |
|---|---|---|
| committer | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2011-04-12 08:12:42 -0400 |
| commit | 869f58c0cdba3ae6880ab6113617e62672198773 (patch) | |
| tree | f66f0c256d42f6a853c219bc0e3c74d6db2173eb | |
| parent | 81ac21d34a91e85b029cd86e2ed5eeae8d7c3cd4 (diff) | |
fat: Replace all printk with fat_msg()
Replace all printk with fat_msg()
Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
| -rw-r--r-- | fs/fat/dir.c | 32 | ||||
| -rw-r--r-- | fs/fat/fatent.c | 4 | ||||
| -rw-r--r-- | fs/fat/inode.c | 67 | ||||
| -rw-r--r-- | fs/fat/misc.c | 6 |
4 files changed, 55 insertions, 54 deletions
diff --git a/fs/fat/dir.c b/fs/fat/dir.c index ee42b9e0b16a..4ad64732cbce 100644 --- a/fs/fat/dir.c +++ b/fs/fat/dir.c | |||
| @@ -98,7 +98,7 @@ next: | |||
| 98 | 98 | ||
| 99 | *bh = sb_bread(sb, phys); | 99 | *bh = sb_bread(sb, phys); |
| 100 | if (*bh == NULL) { | 100 | if (*bh == NULL) { |
| 101 | printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n", | 101 | fat_msg(sb, KERN_ERR, "Directory bread(block %llu) failed", |
| 102 | (llu)phys); | 102 | (llu)phys); |
| 103 | /* skip this block */ | 103 | /* skip this block */ |
| 104 | *pos = (iblock + 1) << sb->s_blocksize_bits; | 104 | *pos = (iblock + 1) << sb->s_blocksize_bits; |
| @@ -136,9 +136,10 @@ static inline int fat_get_entry(struct inode *dir, loff_t *pos, | |||
| 136 | * but ignore that right now. | 136 | * but ignore that right now. |
| 137 | * Ahem... Stack smashing in ring 0 isn't fun. Fixed. | 137 | * Ahem... Stack smashing in ring 0 isn't fun. Fixed. |
| 138 | */ | 138 | */ |
| 139 | static int uni16_to_x8(unsigned char *ascii, const wchar_t *uni, int len, | 139 | static int uni16_to_x8(struct super_block *sb, unsigned char *ascii, |
| 140 | int uni_xlate, struct nls_table *nls) | 140 | const wchar_t *uni, int len, struct nls_table *nls) |
| 141 | { | 141 | { |
| 142 | int uni_xlate = MSDOS_SB(sb)->options.unicode_xlate; | ||
| 142 | const wchar_t *ip; | 143 | const wchar_t *ip; |
| 143 | wchar_t ec; | 144 | wchar_t ec; |
| 144 | unsigned char *op; | 145 | unsigned char *op; |
| @@ -166,23 +167,23 @@ static int uni16_to_x8(unsigned char *ascii, const wchar_t *uni, int len, | |||
| 166 | } | 167 | } |
| 167 | 168 | ||
| 168 | if (unlikely(*ip)) { | 169 | if (unlikely(*ip)) { |
| 169 | printk(KERN_WARNING "FAT: filename was truncated while " | 170 | fat_msg(sb, KERN_WARNING, "filename was truncated while " |
| 170 | "converting."); | 171 | "converting."); |
| 171 | } | 172 | } |
| 172 | 173 | ||
| 173 | *op = 0; | 174 | *op = 0; |
| 174 | return (op - ascii); | 175 | return (op - ascii); |
| 175 | } | 176 | } |
| 176 | 177 | ||
| 177 | static inline int fat_uni_to_x8(struct msdos_sb_info *sbi, const wchar_t *uni, | 178 | static inline int fat_uni_to_x8(struct super_block *sb, const wchar_t *uni, |
| 178 | unsigned char *buf, int size) | 179 | unsigned char *buf, int size) |
| 179 | { | 180 | { |
| 181 | struct msdos_sb_info *sbi = MSDOS_SB(sb); | ||
| 180 | if (sbi->options.utf8) | 182 | if (sbi->options.utf8) |
| 181 | return utf16s_to_utf8s(uni, FAT_MAX_UNI_CHARS, | 183 | return utf16s_to_utf8s(uni, FAT_MAX_UNI_CHARS, |
| 182 | UTF16_HOST_ENDIAN, buf, size); | 184 | UTF16_HOST_ENDIAN, buf, size); |
| 183 | else | 185 | else |
| 184 | return uni16_to_x8(buf, uni, size, sbi->options.unicode_xlate, | 186 | return uni16_to_x8(sb, buf, uni, size, sbi->nls_io); |
| 185 | sbi->nls_io); | ||
| 186 | } | 187 | } |
| 187 | 188 | ||
| 188 | static inline int | 189 | static inline int |
| @@ -419,7 +420,7 @@ parse_record: | |||
| 419 | 420 | ||
| 420 | /* Compare shortname */ | 421 | /* Compare shortname */ |
| 421 | bufuname[last_u] = 0x0000; | 422 | bufuname[last_u] = 0x0000; |
| 422 | len = fat_uni_to_x8(sbi, bufuname, bufname, sizeof(bufname)); | 423 | len = fat_uni_to_x8(sb, bufuname, bufname, sizeof(bufname)); |
| 423 | if (fat_name_match(sbi, name, name_len, bufname, len)) | 424 | if (fat_name_match(sbi, name, name_len, bufname, len)) |
| 424 | goto found; | 425 | goto found; |
| 425 | 426 | ||
| @@ -428,7 +429,7 @@ parse_record: | |||
| 428 | int size = PATH_MAX - FAT_MAX_UNI_SIZE; | 429 | int size = PATH_MAX - FAT_MAX_UNI_SIZE; |
| 429 | 430 | ||
| 430 | /* Compare longname */ | 431 | /* Compare longname */ |
| 431 | len = fat_uni_to_x8(sbi, unicode, longname, size); | 432 | len = fat_uni_to_x8(sb, unicode, longname, size); |
| 432 | if (fat_name_match(sbi, name, name_len, longname, len)) | 433 | if (fat_name_match(sbi, name, name_len, longname, len)) |
| 433 | goto found; | 434 | goto found; |
| 434 | } | 435 | } |
| @@ -545,7 +546,7 @@ parse_record: | |||
| 545 | if (nr_slots) { | 546 | if (nr_slots) { |
| 546 | void *longname = unicode + FAT_MAX_UNI_CHARS; | 547 | void *longname = unicode + FAT_MAX_UNI_CHARS; |
| 547 | int size = PATH_MAX - FAT_MAX_UNI_SIZE; | 548 | int size = PATH_MAX - FAT_MAX_UNI_SIZE; |
| 548 | int len = fat_uni_to_x8(sbi, unicode, longname, size); | 549 | int len = fat_uni_to_x8(sb, unicode, longname, size); |
| 549 | 550 | ||
| 550 | fill_name = longname; | 551 | fill_name = longname; |
| 551 | fill_len = len; | 552 | fill_len = len; |
| @@ -621,7 +622,7 @@ parse_record: | |||
| 621 | 622 | ||
| 622 | if (isvfat) { | 623 | if (isvfat) { |
| 623 | bufuname[j] = 0x0000; | 624 | bufuname[j] = 0x0000; |
| 624 | i = fat_uni_to_x8(sbi, bufuname, bufname, sizeof(bufname)); | 625 | i = fat_uni_to_x8(sb, bufuname, bufname, sizeof(bufname)); |
| 625 | } | 626 | } |
| 626 | if (nr_slots) { | 627 | if (nr_slots) { |
| 627 | /* hack for fat_ioctl_filldir() */ | 628 | /* hack for fat_ioctl_filldir() */ |
| @@ -979,6 +980,7 @@ static int __fat_remove_entries(struct inode *dir, loff_t pos, int nr_slots) | |||
| 979 | 980 | ||
| 980 | int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo) | 981 | int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo) |
| 981 | { | 982 | { |
| 983 | struct super_block *sb = dir->i_sb; | ||
| 982 | struct msdos_dir_entry *de; | 984 | struct msdos_dir_entry *de; |
| 983 | struct buffer_head *bh; | 985 | struct buffer_head *bh; |
| 984 | int err = 0, nr_slots; | 986 | int err = 0, nr_slots; |
| @@ -1013,8 +1015,8 @@ int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo) | |||
| 1013 | */ | 1015 | */ |
| 1014 | err = __fat_remove_entries(dir, sinfo->slot_off, nr_slots); | 1016 | err = __fat_remove_entries(dir, sinfo->slot_off, nr_slots); |
| 1015 | if (err) { | 1017 | if (err) { |
| 1016 | printk(KERN_WARNING | 1018 | fat_msg(sb, KERN_WARNING, |
| 1017 | "FAT: Couldn't remove the long name slots\n"); | 1019 | "Couldn't remove the long name slots"); |
| 1018 | } | 1020 | } |
| 1019 | } | 1021 | } |
| 1020 | 1022 | ||
| @@ -1265,7 +1267,7 @@ int fat_add_entries(struct inode *dir, void *slots, int nr_slots, | |||
| 1265 | if (sbi->fat_bits != 32) | 1267 | if (sbi->fat_bits != 32) |
| 1266 | goto error; | 1268 | goto error; |
| 1267 | } else if (MSDOS_I(dir)->i_start == 0) { | 1269 | } else if (MSDOS_I(dir)->i_start == 0) { |
| 1268 | printk(KERN_ERR "FAT: Corrupted directory (i_pos %lld)\n", | 1270 | fat_msg(sb, KERN_ERR, "Corrupted directory (i_pos %lld)", |
| 1269 | MSDOS_I(dir)->i_pos); | 1271 | MSDOS_I(dir)->i_pos); |
| 1270 | err = -EIO; | 1272 | err = -EIO; |
| 1271 | goto error; | 1273 | goto error; |
diff --git a/fs/fat/fatent.c b/fs/fat/fatent.c index b47d2c9f4fa1..2e81ac0df7e2 100644 --- a/fs/fat/fatent.c +++ b/fs/fat/fatent.c | |||
| @@ -95,7 +95,7 @@ static int fat12_ent_bread(struct super_block *sb, struct fat_entry *fatent, | |||
| 95 | err_brelse: | 95 | err_brelse: |
| 96 | brelse(bhs[0]); | 96 | brelse(bhs[0]); |
| 97 | err: | 97 | err: |
| 98 | printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", (llu)blocknr); | 98 | fat_msg(sb, KERN_ERR, "FAT read failed (blocknr %llu)", (llu)blocknr); |
| 99 | return -EIO; | 99 | return -EIO; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| @@ -108,7 +108,7 @@ static int fat_ent_bread(struct super_block *sb, struct fat_entry *fatent, | |||
| 108 | fatent->fat_inode = MSDOS_SB(sb)->fat_inode; | 108 | fatent->fat_inode = MSDOS_SB(sb)->fat_inode; |
| 109 | fatent->bhs[0] = sb_bread(sb, blocknr); | 109 | fatent->bhs[0] = sb_bread(sb, blocknr); |
| 110 | if (!fatent->bhs[0]) { | 110 | if (!fatent->bhs[0]) { |
| 111 | printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", | 111 | fat_msg(sb, KERN_ERR, "FAT read failed (blocknr %llu)", |
| 112 | (llu)blocknr); | 112 | (llu)blocknr); |
| 113 | return -EIO; | 113 | return -EIO; |
| 114 | } | 114 | } |
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index c27704dc485e..7a6c819893f2 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
| @@ -619,8 +619,8 @@ retry: | |||
| 619 | 619 | ||
| 620 | bh = sb_bread(sb, i_pos >> sbi->dir_per_block_bits); | 620 | bh = sb_bread(sb, i_pos >> sbi->dir_per_block_bits); |
| 621 | if (!bh) { | 621 | if (!bh) { |
| 622 | printk(KERN_ERR "FAT: unable to read inode block " | 622 | fat_msg(sb, KERN_ERR, "unable to read inode block " |
| 623 | "for updating (i_pos %lld)\n", i_pos); | 623 | "for updating (i_pos %lld)", i_pos); |
| 624 | return -EIO; | 624 | return -EIO; |
| 625 | } | 625 | } |
| 626 | spin_lock(&sbi->inode_hash_lock); | 626 | spin_lock(&sbi->inode_hash_lock); |
| @@ -976,8 +976,8 @@ static const match_table_t vfat_tokens = { | |||
| 976 | {Opt_err, NULL} | 976 | {Opt_err, NULL} |
| 977 | }; | 977 | }; |
| 978 | 978 | ||
| 979 | static int parse_options(char *options, int is_vfat, int silent, int *debug, | 979 | static int parse_options(struct super_block *sb, char *options, int is_vfat, |
| 980 | struct fat_mount_options *opts) | 980 | int silent, int *debug, struct fat_mount_options *opts) |
| 981 | { | 981 | { |
| 982 | char *p; | 982 | char *p; |
| 983 | substring_t args[MAX_OPT_ARGS]; | 983 | substring_t args[MAX_OPT_ARGS]; |
| @@ -1168,15 +1168,15 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug, | |||
| 1168 | 1168 | ||
| 1169 | /* obsolete mount options */ | 1169 | /* obsolete mount options */ |
| 1170 | case Opt_obsolate: | 1170 | case Opt_obsolate: |
| 1171 | printk(KERN_INFO "FAT: \"%s\" option is obsolete, " | 1171 | fat_msg(sb, KERN_INFO, "\"%s\" option is obsolete, " |
| 1172 | "not supported now\n", p); | 1172 | "not supported now", p); |
| 1173 | break; | 1173 | break; |
| 1174 | /* unknown option */ | 1174 | /* unknown option */ |
| 1175 | default: | 1175 | default: |
| 1176 | if (!silent) { | 1176 | if (!silent) { |
| 1177 | printk(KERN_ERR | 1177 | fat_msg(sb, KERN_ERR, |
| 1178 | "FAT: Unrecognized mount option \"%s\" " | 1178 | "Unrecognized mount option \"%s\" " |
| 1179 | "or missing value\n", p); | 1179 | "or missing value", p); |
| 1180 | } | 1180 | } |
| 1181 | return -EINVAL; | 1181 | return -EINVAL; |
| 1182 | } | 1182 | } |
| @@ -1185,7 +1185,7 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug, | |||
| 1185 | out: | 1185 | out: |
| 1186 | /* UTF-8 doesn't provide FAT semantics */ | 1186 | /* UTF-8 doesn't provide FAT semantics */ |
| 1187 | if (!strcmp(opts->iocharset, "utf8")) { | 1187 | if (!strcmp(opts->iocharset, "utf8")) { |
| 1188 | printk(KERN_ERR "FAT: utf8 is not a recommended IO charset" | 1188 | fat_msg(sb, KERN_ERR, "utf8 is not a recommended IO charset" |
| 1189 | " for FAT filesystems, filesystem will be " | 1189 | " for FAT filesystems, filesystem will be " |
| 1190 | "case sensitive!\n"); | 1190 | "case sensitive!\n"); |
| 1191 | } | 1191 | } |
| @@ -1270,7 +1270,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1270 | ratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL, | 1270 | ratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL, |
| 1271 | DEFAULT_RATELIMIT_BURST); | 1271 | DEFAULT_RATELIMIT_BURST); |
| 1272 | 1272 | ||
| 1273 | error = parse_options(data, isvfat, silent, &debug, &sbi->options); | 1273 | error = parse_options(sb, data, isvfat, silent, &debug, &sbi->options); |
| 1274 | if (error) | 1274 | if (error) |
| 1275 | goto out_fail; | 1275 | goto out_fail; |
| 1276 | 1276 | ||
| @@ -1280,20 +1280,20 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1280 | sb_min_blocksize(sb, 512); | 1280 | sb_min_blocksize(sb, 512); |
| 1281 | bh = sb_bread(sb, 0); | 1281 | bh = sb_bread(sb, 0); |
| 1282 | if (bh == NULL) { | 1282 | if (bh == NULL) { |
| 1283 | printk(KERN_ERR "FAT: unable to read boot sector\n"); | 1283 | fat_msg(sb, KERN_ERR, "unable to read boot sector"); |
| 1284 | goto out_fail; | 1284 | goto out_fail; |
| 1285 | } | 1285 | } |
| 1286 | 1286 | ||
| 1287 | b = (struct fat_boot_sector *) bh->b_data; | 1287 | b = (struct fat_boot_sector *) bh->b_data; |
| 1288 | if (!b->reserved) { | 1288 | if (!b->reserved) { |
| 1289 | if (!silent) | 1289 | if (!silent) |
| 1290 | printk(KERN_ERR "FAT: bogus number of reserved sectors\n"); | 1290 | fat_msg(sb, KERN_ERR, "bogus number of reserved sectors"); |
| 1291 | brelse(bh); | 1291 | brelse(bh); |
| 1292 | goto out_invalid; | 1292 | goto out_invalid; |
| 1293 | } | 1293 | } |
| 1294 | if (!b->fats) { | 1294 | if (!b->fats) { |
| 1295 | if (!silent) | 1295 | if (!silent) |
| 1296 | printk(KERN_ERR "FAT: bogus number of FAT structure\n"); | 1296 | fat_msg(sb, KERN_ERR, "bogus number of FAT structure"); |
| 1297 | brelse(bh); | 1297 | brelse(bh); |
| 1298 | goto out_invalid; | 1298 | goto out_invalid; |
| 1299 | } | 1299 | } |
| @@ -1306,7 +1306,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1306 | media = b->media; | 1306 | media = b->media; |
| 1307 | if (!fat_valid_media(media)) { | 1307 | if (!fat_valid_media(media)) { |
| 1308 | if (!silent) | 1308 | if (!silent) |
| 1309 | printk(KERN_ERR "FAT: invalid media value (0x%02x)\n", | 1309 | fat_msg(sb, KERN_ERR, "invalid media value (0x%02x)", |
| 1310 | media); | 1310 | media); |
| 1311 | brelse(bh); | 1311 | brelse(bh); |
| 1312 | goto out_invalid; | 1312 | goto out_invalid; |
| @@ -1316,7 +1316,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1316 | || (logical_sector_size < 512) | 1316 | || (logical_sector_size < 512) |
| 1317 | || (logical_sector_size > 4096)) { | 1317 | || (logical_sector_size > 4096)) { |
| 1318 | if (!silent) | 1318 | if (!silent) |
| 1319 | printk(KERN_ERR "FAT: bogus logical sector size %u\n", | 1319 | fat_msg(sb, KERN_ERR, "bogus logical sector size %u", |
| 1320 | logical_sector_size); | 1320 | logical_sector_size); |
| 1321 | brelse(bh); | 1321 | brelse(bh); |
| 1322 | goto out_invalid; | 1322 | goto out_invalid; |
| @@ -1324,15 +1324,15 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1324 | sbi->sec_per_clus = b->sec_per_clus; | 1324 | sbi->sec_per_clus = b->sec_per_clus; |
| 1325 | if (!is_power_of_2(sbi->sec_per_clus)) { | 1325 | if (!is_power_of_2(sbi->sec_per_clus)) { |
| 1326 | if (!silent) | 1326 | if (!silent) |
| 1327 | printk(KERN_ERR "FAT: bogus sectors per cluster %u\n", | 1327 | fat_msg(sb, KERN_ERR, "bogus sectors per cluster %u", |
| 1328 | sbi->sec_per_clus); | 1328 | sbi->sec_per_clus); |
| 1329 | brelse(bh); | 1329 | brelse(bh); |
| 1330 | goto out_invalid; | 1330 | goto out_invalid; |
| 1331 | } | 1331 | } |
| 1332 | 1332 | ||
| 1333 | if (logical_sector_size < sb->s_blocksize) { | 1333 | if (logical_sector_size < sb->s_blocksize) { |
| 1334 | printk(KERN_ERR "FAT: logical sector size too small for device" | 1334 | fat_msg(sb, KERN_ERR, "logical sector size too small for device" |
| 1335 | " (logical sector size = %u)\n", logical_sector_size); | 1335 | " (logical sector size = %u)", logical_sector_size); |
| 1336 | brelse(bh); | 1336 | brelse(bh); |
| 1337 | goto out_fail; | 1337 | goto out_fail; |
| 1338 | } | 1338 | } |
| @@ -1340,14 +1340,14 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1340 | brelse(bh); | 1340 | brelse(bh); |
| 1341 | 1341 | ||
| 1342 | if (!sb_set_blocksize(sb, logical_sector_size)) { | 1342 | if (!sb_set_blocksize(sb, logical_sector_size)) { |
| 1343 | printk(KERN_ERR "FAT: unable to set blocksize %u\n", | 1343 | fat_msg(sb, KERN_ERR, "unable to set blocksize %u", |
| 1344 | logical_sector_size); | 1344 | logical_sector_size); |
| 1345 | goto out_fail; | 1345 | goto out_fail; |
| 1346 | } | 1346 | } |
| 1347 | bh = sb_bread(sb, 0); | 1347 | bh = sb_bread(sb, 0); |
| 1348 | if (bh == NULL) { | 1348 | if (bh == NULL) { |
| 1349 | printk(KERN_ERR "FAT: unable to read boot sector" | 1349 | fat_msg(sb, KERN_ERR, "unable to read boot sector" |
| 1350 | " (logical sector size = %lu)\n", | 1350 | " (logical sector size = %lu)", |
| 1351 | sb->s_blocksize); | 1351 | sb->s_blocksize); |
| 1352 | goto out_fail; | 1352 | goto out_fail; |
| 1353 | } | 1353 | } |
| @@ -1383,16 +1383,16 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1383 | 1383 | ||
| 1384 | fsinfo_bh = sb_bread(sb, sbi->fsinfo_sector); | 1384 | fsinfo_bh = sb_bread(sb, sbi->fsinfo_sector); |
| 1385 | if (fsinfo_bh == NULL) { | 1385 | if (fsinfo_bh == NULL) { |
| 1386 | printk(KERN_ERR "FAT: bread failed, FSINFO block" | 1386 | fat_msg(sb, KERN_ERR, "bread failed, FSINFO block" |
| 1387 | " (sector = %lu)\n", sbi->fsinfo_sector); | 1387 | " (sector = %lu)", sbi->fsinfo_sector); |
| 1388 | brelse(bh); | 1388 | brelse(bh); |
| 1389 | goto out_fail; | 1389 | goto out_fail; |
| 1390 | } | 1390 | } |
| 1391 | 1391 | ||
| 1392 | fsinfo = (struct fat_boot_fsinfo *)fsinfo_bh->b_data; | 1392 | fsinfo = (struct fat_boot_fsinfo *)fsinfo_bh->b_data; |
| 1393 | if (!IS_FSINFO(fsinfo)) { | 1393 | if (!IS_FSINFO(fsinfo)) { |
| 1394 | printk(KERN_WARNING "FAT: Invalid FSINFO signature: " | 1394 | fat_msg(sb, KERN_WARNING, "Invalid FSINFO signature: " |
| 1395 | "0x%08x, 0x%08x (sector = %lu)\n", | 1395 | "0x%08x, 0x%08x (sector = %lu)", |
| 1396 | le32_to_cpu(fsinfo->signature1), | 1396 | le32_to_cpu(fsinfo->signature1), |
| 1397 | le32_to_cpu(fsinfo->signature2), | 1397 | le32_to_cpu(fsinfo->signature2), |
| 1398 | sbi->fsinfo_sector); | 1398 | sbi->fsinfo_sector); |
| @@ -1413,8 +1413,8 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1413 | sbi->dir_entries = get_unaligned_le16(&b->dir_entries); | 1413 | sbi->dir_entries = get_unaligned_le16(&b->dir_entries); |
| 1414 | if (sbi->dir_entries & (sbi->dir_per_block - 1)) { | 1414 | if (sbi->dir_entries & (sbi->dir_per_block - 1)) { |
| 1415 | if (!silent) | 1415 | if (!silent) |
| 1416 | printk(KERN_ERR "FAT: bogus directroy-entries per block" | 1416 | fat_msg(sb, KERN_ERR, "bogus directroy-entries per block" |
| 1417 | " (%u)\n", sbi->dir_entries); | 1417 | " (%u)", sbi->dir_entries); |
| 1418 | brelse(bh); | 1418 | brelse(bh); |
| 1419 | goto out_invalid; | 1419 | goto out_invalid; |
| 1420 | } | 1420 | } |
| @@ -1436,7 +1436,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1436 | total_clusters = min(total_clusters, fat_clusters - FAT_START_ENT); | 1436 | total_clusters = min(total_clusters, fat_clusters - FAT_START_ENT); |
| 1437 | if (total_clusters > MAX_FAT(sb)) { | 1437 | if (total_clusters > MAX_FAT(sb)) { |
| 1438 | if (!silent) | 1438 | if (!silent) |
| 1439 | printk(KERN_ERR "FAT: count of clusters too big (%u)\n", | 1439 | fat_msg(sb, KERN_ERR, "count of clusters too big (%u)", |
| 1440 | total_clusters); | 1440 | total_clusters); |
| 1441 | brelse(bh); | 1441 | brelse(bh); |
| 1442 | goto out_invalid; | 1442 | goto out_invalid; |
| @@ -1469,7 +1469,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1469 | sprintf(buf, "cp%d", sbi->options.codepage); | 1469 | sprintf(buf, "cp%d", sbi->options.codepage); |
| 1470 | sbi->nls_disk = load_nls(buf); | 1470 | sbi->nls_disk = load_nls(buf); |
| 1471 | if (!sbi->nls_disk) { | 1471 | if (!sbi->nls_disk) { |
| 1472 | printk(KERN_ERR "FAT: codepage %s not found\n", buf); | 1472 | fat_msg(sb, KERN_ERR, "codepage %s not found", buf); |
| 1473 | goto out_fail; | 1473 | goto out_fail; |
| 1474 | } | 1474 | } |
| 1475 | 1475 | ||
| @@ -1477,7 +1477,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1477 | if (sbi->options.isvfat) { | 1477 | if (sbi->options.isvfat) { |
| 1478 | sbi->nls_io = load_nls(sbi->options.iocharset); | 1478 | sbi->nls_io = load_nls(sbi->options.iocharset); |
| 1479 | if (!sbi->nls_io) { | 1479 | if (!sbi->nls_io) { |
| 1480 | printk(KERN_ERR "FAT: IO charset %s not found\n", | 1480 | fat_msg(sb, KERN_ERR, "IO charset %s not found", |
| 1481 | sbi->options.iocharset); | 1481 | sbi->options.iocharset); |
| 1482 | goto out_fail; | 1482 | goto out_fail; |
| 1483 | } | 1483 | } |
| @@ -1501,7 +1501,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1501 | insert_inode_hash(root_inode); | 1501 | insert_inode_hash(root_inode); |
| 1502 | sb->s_root = d_alloc_root(root_inode); | 1502 | sb->s_root = d_alloc_root(root_inode); |
| 1503 | if (!sb->s_root) { | 1503 | if (!sb->s_root) { |
| 1504 | printk(KERN_ERR "FAT: get root inode failed\n"); | 1504 | fat_msg(sb, KERN_ERR, "get root inode failed"); |
| 1505 | goto out_fail; | 1505 | goto out_fail; |
| 1506 | } | 1506 | } |
| 1507 | 1507 | ||
| @@ -1510,8 +1510,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, | |||
| 1510 | out_invalid: | 1510 | out_invalid: |
| 1511 | error = -EINVAL; | 1511 | error = -EINVAL; |
| 1512 | if (!silent) | 1512 | if (!silent) |
| 1513 | printk(KERN_INFO "VFS: Can't find a valid FAT filesystem" | 1513 | fat_msg(sb, KERN_INFO, "Can't find a valid FAT filesystem"); |
| 1514 | " on dev %s.\n", sb->s_id); | ||
| 1515 | 1514 | ||
| 1516 | out_fail: | 1515 | out_fail: |
| 1517 | if (fat_inode) | 1516 | if (fat_inode) |
diff --git a/fs/fat/misc.c b/fs/fat/misc.c index 3dcabc1bd8c3..6d93360ca0cc 100644 --- a/fs/fat/misc.c +++ b/fs/fat/misc.c | |||
| @@ -73,15 +73,15 @@ int fat_clusters_flush(struct super_block *sb) | |||
| 73 | 73 | ||
| 74 | bh = sb_bread(sb, sbi->fsinfo_sector); | 74 | bh = sb_bread(sb, sbi->fsinfo_sector); |
| 75 | if (bh == NULL) { | 75 | if (bh == NULL) { |
| 76 | printk(KERN_ERR "FAT: bread failed in fat_clusters_flush\n"); | 76 | fat_msg(sb, KERN_ERR, "bread failed in fat_clusters_flush"); |
| 77 | return -EIO; | 77 | return -EIO; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | fsinfo = (struct fat_boot_fsinfo *)bh->b_data; | 80 | fsinfo = (struct fat_boot_fsinfo *)bh->b_data; |
| 81 | /* Sanity check */ | 81 | /* Sanity check */ |
| 82 | if (!IS_FSINFO(fsinfo)) { | 82 | if (!IS_FSINFO(fsinfo)) { |
| 83 | printk(KERN_ERR "FAT: Invalid FSINFO signature: " | 83 | fat_msg(sb, KERN_ERR, "Invalid FSINFO signature: " |
| 84 | "0x%08x, 0x%08x (sector = %lu)\n", | 84 | "0x%08x, 0x%08x (sector = %lu)", |
| 85 | le32_to_cpu(fsinfo->signature1), | 85 | le32_to_cpu(fsinfo->signature1), |
| 86 | le32_to_cpu(fsinfo->signature2), | 86 | le32_to_cpu(fsinfo->signature2), |
| 87 | sbi->fsinfo_sector); | 87 | sbi->fsinfo_sector); |
