Commit 869f58c0 authored by Alexey Fisher's avatar Alexey Fisher Committed by OGAWA Hirofumi

fat: Replace all printk with fat_msg()

Replace all printk with fat_msg()
Signed-off-by: default avatarAlexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
parent 81ac21d3
...@@ -98,7 +98,7 @@ static int fat__get_entry(struct inode *dir, loff_t *pos, ...@@ -98,7 +98,7 @@ static int fat__get_entry(struct inode *dir, loff_t *pos,
*bh = sb_bread(sb, phys); *bh = sb_bread(sb, phys);
if (*bh == NULL) { if (*bh == NULL) {
printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n", fat_msg(sb, KERN_ERR, "Directory bread(block %llu) failed",
(llu)phys); (llu)phys);
/* skip this block */ /* skip this block */
*pos = (iblock + 1) << sb->s_blocksize_bits; *pos = (iblock + 1) << sb->s_blocksize_bits;
...@@ -136,9 +136,10 @@ static inline int fat_get_entry(struct inode *dir, loff_t *pos, ...@@ -136,9 +136,10 @@ static inline int fat_get_entry(struct inode *dir, loff_t *pos,
* but ignore that right now. * but ignore that right now.
* Ahem... Stack smashing in ring 0 isn't fun. Fixed. * Ahem... Stack smashing in ring 0 isn't fun. Fixed.
*/ */
static int uni16_to_x8(unsigned char *ascii, const wchar_t *uni, int len, static int uni16_to_x8(struct super_block *sb, unsigned char *ascii,
int uni_xlate, struct nls_table *nls) const wchar_t *uni, int len, struct nls_table *nls)
{ {
int uni_xlate = MSDOS_SB(sb)->options.unicode_xlate;
const wchar_t *ip; const wchar_t *ip;
wchar_t ec; wchar_t ec;
unsigned char *op; unsigned char *op;
...@@ -166,23 +167,23 @@ static int uni16_to_x8(unsigned char *ascii, const wchar_t *uni, int len, ...@@ -166,23 +167,23 @@ static int uni16_to_x8(unsigned char *ascii, const wchar_t *uni, int len,
} }
if (unlikely(*ip)) { if (unlikely(*ip)) {
printk(KERN_WARNING "FAT: filename was truncated while " fat_msg(sb, KERN_WARNING, "filename was truncated while "
"converting."); "converting.");
} }
*op = 0; *op = 0;
return (op - ascii); return (op - ascii);
} }
static inline int fat_uni_to_x8(struct msdos_sb_info *sbi, const wchar_t *uni, static inline int fat_uni_to_x8(struct super_block *sb, const wchar_t *uni,
unsigned char *buf, int size) unsigned char *buf, int size)
{ {
struct msdos_sb_info *sbi = MSDOS_SB(sb);
if (sbi->options.utf8) if (sbi->options.utf8)
return utf16s_to_utf8s(uni, FAT_MAX_UNI_CHARS, return utf16s_to_utf8s(uni, FAT_MAX_UNI_CHARS,
UTF16_HOST_ENDIAN, buf, size); UTF16_HOST_ENDIAN, buf, size);
else else
return uni16_to_x8(buf, uni, size, sbi->options.unicode_xlate, return uni16_to_x8(sb, buf, uni, size, sbi->nls_io);
sbi->nls_io);
} }
static inline int static inline int
...@@ -419,7 +420,7 @@ int fat_search_long(struct inode *inode, const unsigned char *name, ...@@ -419,7 +420,7 @@ int fat_search_long(struct inode *inode, const unsigned char *name,
/* Compare shortname */ /* Compare shortname */
bufuname[last_u] = 0x0000; bufuname[last_u] = 0x0000;
len = fat_uni_to_x8(sbi, bufuname, bufname, sizeof(bufname)); len = fat_uni_to_x8(sb, bufuname, bufname, sizeof(bufname));
if (fat_name_match(sbi, name, name_len, bufname, len)) if (fat_name_match(sbi, name, name_len, bufname, len))
goto found; goto found;
...@@ -428,7 +429,7 @@ int fat_search_long(struct inode *inode, const unsigned char *name, ...@@ -428,7 +429,7 @@ int fat_search_long(struct inode *inode, const unsigned char *name,
int size = PATH_MAX - FAT_MAX_UNI_SIZE; int size = PATH_MAX - FAT_MAX_UNI_SIZE;
/* Compare longname */ /* Compare longname */
len = fat_uni_to_x8(sbi, unicode, longname, size); len = fat_uni_to_x8(sb, unicode, longname, size);
if (fat_name_match(sbi, name, name_len, longname, len)) if (fat_name_match(sbi, name, name_len, longname, len))
goto found; goto found;
} }
...@@ -545,7 +546,7 @@ static int __fat_readdir(struct inode *inode, struct file *filp, void *dirent, ...@@ -545,7 +546,7 @@ static int __fat_readdir(struct inode *inode, struct file *filp, void *dirent,
if (nr_slots) { if (nr_slots) {
void *longname = unicode + FAT_MAX_UNI_CHARS; void *longname = unicode + FAT_MAX_UNI_CHARS;
int size = PATH_MAX - FAT_MAX_UNI_SIZE; int size = PATH_MAX - FAT_MAX_UNI_SIZE;
int len = fat_uni_to_x8(sbi, unicode, longname, size); int len = fat_uni_to_x8(sb, unicode, longname, size);
fill_name = longname; fill_name = longname;
fill_len = len; fill_len = len;
...@@ -621,7 +622,7 @@ static int __fat_readdir(struct inode *inode, struct file *filp, void *dirent, ...@@ -621,7 +622,7 @@ static int __fat_readdir(struct inode *inode, struct file *filp, void *dirent,
if (isvfat) { if (isvfat) {
bufuname[j] = 0x0000; bufuname[j] = 0x0000;
i = fat_uni_to_x8(sbi, bufuname, bufname, sizeof(bufname)); i = fat_uni_to_x8(sb, bufuname, bufname, sizeof(bufname));
} }
if (nr_slots) { if (nr_slots) {
/* hack for fat_ioctl_filldir() */ /* hack for fat_ioctl_filldir() */
...@@ -979,6 +980,7 @@ static int __fat_remove_entries(struct inode *dir, loff_t pos, int nr_slots) ...@@ -979,6 +980,7 @@ static int __fat_remove_entries(struct inode *dir, loff_t pos, int nr_slots)
int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo) int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo)
{ {
struct super_block *sb = dir->i_sb;
struct msdos_dir_entry *de; struct msdos_dir_entry *de;
struct buffer_head *bh; struct buffer_head *bh;
int err = 0, nr_slots; int err = 0, nr_slots;
...@@ -1013,8 +1015,8 @@ int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo) ...@@ -1013,8 +1015,8 @@ int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo)
*/ */
err = __fat_remove_entries(dir, sinfo->slot_off, nr_slots); err = __fat_remove_entries(dir, sinfo->slot_off, nr_slots);
if (err) { if (err) {
printk(KERN_WARNING fat_msg(sb, KERN_WARNING,
"FAT: Couldn't remove the long name slots\n"); "Couldn't remove the long name slots");
} }
} }
...@@ -1265,7 +1267,7 @@ int fat_add_entries(struct inode *dir, void *slots, int nr_slots, ...@@ -1265,7 +1267,7 @@ int fat_add_entries(struct inode *dir, void *slots, int nr_slots,
if (sbi->fat_bits != 32) if (sbi->fat_bits != 32)
goto error; goto error;
} else if (MSDOS_I(dir)->i_start == 0) { } else if (MSDOS_I(dir)->i_start == 0) {
printk(KERN_ERR "FAT: Corrupted directory (i_pos %lld)\n", fat_msg(sb, KERN_ERR, "Corrupted directory (i_pos %lld)",
MSDOS_I(dir)->i_pos); MSDOS_I(dir)->i_pos);
err = -EIO; err = -EIO;
goto error; goto error;
......
...@@ -95,7 +95,7 @@ static int fat12_ent_bread(struct super_block *sb, struct fat_entry *fatent, ...@@ -95,7 +95,7 @@ static int fat12_ent_bread(struct super_block *sb, struct fat_entry *fatent,
err_brelse: err_brelse:
brelse(bhs[0]); brelse(bhs[0]);
err: err:
printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", (llu)blocknr); fat_msg(sb, KERN_ERR, "FAT read failed (blocknr %llu)", (llu)blocknr);
return -EIO; return -EIO;
} }
...@@ -108,7 +108,7 @@ static int fat_ent_bread(struct super_block *sb, struct fat_entry *fatent, ...@@ -108,7 +108,7 @@ static int fat_ent_bread(struct super_block *sb, struct fat_entry *fatent,
fatent->fat_inode = MSDOS_SB(sb)->fat_inode; fatent->fat_inode = MSDOS_SB(sb)->fat_inode;
fatent->bhs[0] = sb_bread(sb, blocknr); fatent->bhs[0] = sb_bread(sb, blocknr);
if (!fatent->bhs[0]) { if (!fatent->bhs[0]) {
printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", fat_msg(sb, KERN_ERR, "FAT read failed (blocknr %llu)",
(llu)blocknr); (llu)blocknr);
return -EIO; return -EIO;
} }
......
...@@ -619,8 +619,8 @@ static int __fat_write_inode(struct inode *inode, int wait) ...@@ -619,8 +619,8 @@ static int __fat_write_inode(struct inode *inode, int wait)
bh = sb_bread(sb, i_pos >> sbi->dir_per_block_bits); bh = sb_bread(sb, i_pos >> sbi->dir_per_block_bits);
if (!bh) { if (!bh) {
printk(KERN_ERR "FAT: unable to read inode block " fat_msg(sb, KERN_ERR, "unable to read inode block "
"for updating (i_pos %lld)\n", i_pos); "for updating (i_pos %lld)", i_pos);
return -EIO; return -EIO;
} }
spin_lock(&sbi->inode_hash_lock); spin_lock(&sbi->inode_hash_lock);
...@@ -976,8 +976,8 @@ static const match_table_t vfat_tokens = { ...@@ -976,8 +976,8 @@ static const match_table_t vfat_tokens = {
{Opt_err, NULL} {Opt_err, NULL}
}; };
static int parse_options(char *options, int is_vfat, int silent, int *debug, static int parse_options(struct super_block *sb, char *options, int is_vfat,
struct fat_mount_options *opts) int silent, int *debug, struct fat_mount_options *opts)
{ {
char *p; char *p;
substring_t args[MAX_OPT_ARGS]; substring_t args[MAX_OPT_ARGS];
...@@ -1168,15 +1168,15 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug, ...@@ -1168,15 +1168,15 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug,
/* obsolete mount options */ /* obsolete mount options */
case Opt_obsolate: case Opt_obsolate:
printk(KERN_INFO "FAT: \"%s\" option is obsolete, " fat_msg(sb, KERN_INFO, "\"%s\" option is obsolete, "
"not supported now\n", p); "not supported now", p);
break; break;
/* unknown option */ /* unknown option */
default: default:
if (!silent) { if (!silent) {
printk(KERN_ERR fat_msg(sb, KERN_ERR,
"FAT: Unrecognized mount option \"%s\" " "Unrecognized mount option \"%s\" "
"or missing value\n", p); "or missing value", p);
} }
return -EINVAL; return -EINVAL;
} }
...@@ -1185,7 +1185,7 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug, ...@@ -1185,7 +1185,7 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug,
out: out:
/* UTF-8 doesn't provide FAT semantics */ /* UTF-8 doesn't provide FAT semantics */
if (!strcmp(opts->iocharset, "utf8")) { if (!strcmp(opts->iocharset, "utf8")) {
printk(KERN_ERR "FAT: utf8 is not a recommended IO charset" fat_msg(sb, KERN_ERR, "utf8 is not a recommended IO charset"
" for FAT filesystems, filesystem will be " " for FAT filesystems, filesystem will be "
"case sensitive!\n"); "case sensitive!\n");
} }
...@@ -1270,7 +1270,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1270,7 +1270,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
ratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL, ratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL,
DEFAULT_RATELIMIT_BURST); DEFAULT_RATELIMIT_BURST);
error = parse_options(data, isvfat, silent, &debug, &sbi->options); error = parse_options(sb, data, isvfat, silent, &debug, &sbi->options);
if (error) if (error)
goto out_fail; goto out_fail;
...@@ -1280,20 +1280,20 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1280,20 +1280,20 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
sb_min_blocksize(sb, 512); sb_min_blocksize(sb, 512);
bh = sb_bread(sb, 0); bh = sb_bread(sb, 0);
if (bh == NULL) { if (bh == NULL) {
printk(KERN_ERR "FAT: unable to read boot sector\n"); fat_msg(sb, KERN_ERR, "unable to read boot sector");
goto out_fail; goto out_fail;
} }
b = (struct fat_boot_sector *) bh->b_data; b = (struct fat_boot_sector *) bh->b_data;
if (!b->reserved) { if (!b->reserved) {
if (!silent) if (!silent)
printk(KERN_ERR "FAT: bogus number of reserved sectors\n"); fat_msg(sb, KERN_ERR, "bogus number of reserved sectors");
brelse(bh); brelse(bh);
goto out_invalid; goto out_invalid;
} }
if (!b->fats) { if (!b->fats) {
if (!silent) if (!silent)
printk(KERN_ERR "FAT: bogus number of FAT structure\n"); fat_msg(sb, KERN_ERR, "bogus number of FAT structure");
brelse(bh); brelse(bh);
goto out_invalid; goto out_invalid;
} }
...@@ -1306,7 +1306,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1306,7 +1306,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
media = b->media; media = b->media;
if (!fat_valid_media(media)) { if (!fat_valid_media(media)) {
if (!silent) if (!silent)
printk(KERN_ERR "FAT: invalid media value (0x%02x)\n", fat_msg(sb, KERN_ERR, "invalid media value (0x%02x)",
media); media);
brelse(bh); brelse(bh);
goto out_invalid; goto out_invalid;
...@@ -1316,7 +1316,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1316,7 +1316,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
|| (logical_sector_size < 512) || (logical_sector_size < 512)
|| (logical_sector_size > 4096)) { || (logical_sector_size > 4096)) {
if (!silent) if (!silent)
printk(KERN_ERR "FAT: bogus logical sector size %u\n", fat_msg(sb, KERN_ERR, "bogus logical sector size %u",
logical_sector_size); logical_sector_size);
brelse(bh); brelse(bh);
goto out_invalid; goto out_invalid;
...@@ -1324,15 +1324,15 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1324,15 +1324,15 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
sbi->sec_per_clus = b->sec_per_clus; sbi->sec_per_clus = b->sec_per_clus;
if (!is_power_of_2(sbi->sec_per_clus)) { if (!is_power_of_2(sbi->sec_per_clus)) {
if (!silent) if (!silent)
printk(KERN_ERR "FAT: bogus sectors per cluster %u\n", fat_msg(sb, KERN_ERR, "bogus sectors per cluster %u",
sbi->sec_per_clus); sbi->sec_per_clus);
brelse(bh); brelse(bh);
goto out_invalid; goto out_invalid;
} }
if (logical_sector_size < sb->s_blocksize) { if (logical_sector_size < sb->s_blocksize) {
printk(KERN_ERR "FAT: logical sector size too small for device" fat_msg(sb, KERN_ERR, "logical sector size too small for device"
" (logical sector size = %u)\n", logical_sector_size); " (logical sector size = %u)", logical_sector_size);
brelse(bh); brelse(bh);
goto out_fail; goto out_fail;
} }
...@@ -1340,14 +1340,14 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1340,14 +1340,14 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
brelse(bh); brelse(bh);
if (!sb_set_blocksize(sb, logical_sector_size)) { if (!sb_set_blocksize(sb, logical_sector_size)) {
printk(KERN_ERR "FAT: unable to set blocksize %u\n", fat_msg(sb, KERN_ERR, "unable to set blocksize %u",
logical_sector_size); logical_sector_size);
goto out_fail; goto out_fail;
} }
bh = sb_bread(sb, 0); bh = sb_bread(sb, 0);
if (bh == NULL) { if (bh == NULL) {
printk(KERN_ERR "FAT: unable to read boot sector" fat_msg(sb, KERN_ERR, "unable to read boot sector"
" (logical sector size = %lu)\n", " (logical sector size = %lu)",
sb->s_blocksize); sb->s_blocksize);
goto out_fail; goto out_fail;
} }
...@@ -1383,16 +1383,16 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1383,16 +1383,16 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
fsinfo_bh = sb_bread(sb, sbi->fsinfo_sector); fsinfo_bh = sb_bread(sb, sbi->fsinfo_sector);
if (fsinfo_bh == NULL) { if (fsinfo_bh == NULL) {
printk(KERN_ERR "FAT: bread failed, FSINFO block" fat_msg(sb, KERN_ERR, "bread failed, FSINFO block"
" (sector = %lu)\n", sbi->fsinfo_sector); " (sector = %lu)", sbi->fsinfo_sector);
brelse(bh); brelse(bh);
goto out_fail; goto out_fail;
} }
fsinfo = (struct fat_boot_fsinfo *)fsinfo_bh->b_data; fsinfo = (struct fat_boot_fsinfo *)fsinfo_bh->b_data;
if (!IS_FSINFO(fsinfo)) { if (!IS_FSINFO(fsinfo)) {
printk(KERN_WARNING "FAT: Invalid FSINFO signature: " fat_msg(sb, KERN_WARNING, "Invalid FSINFO signature: "
"0x%08x, 0x%08x (sector = %lu)\n", "0x%08x, 0x%08x (sector = %lu)",
le32_to_cpu(fsinfo->signature1), le32_to_cpu(fsinfo->signature1),
le32_to_cpu(fsinfo->signature2), le32_to_cpu(fsinfo->signature2),
sbi->fsinfo_sector); sbi->fsinfo_sector);
...@@ -1413,8 +1413,8 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1413,8 +1413,8 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
sbi->dir_entries = get_unaligned_le16(&b->dir_entries); sbi->dir_entries = get_unaligned_le16(&b->dir_entries);
if (sbi->dir_entries & (sbi->dir_per_block - 1)) { if (sbi->dir_entries & (sbi->dir_per_block - 1)) {
if (!silent) if (!silent)
printk(KERN_ERR "FAT: bogus directroy-entries per block" fat_msg(sb, KERN_ERR, "bogus directroy-entries per block"
" (%u)\n", sbi->dir_entries); " (%u)", sbi->dir_entries);
brelse(bh); brelse(bh);
goto out_invalid; goto out_invalid;
} }
...@@ -1436,7 +1436,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1436,7 +1436,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
total_clusters = min(total_clusters, fat_clusters - FAT_START_ENT); total_clusters = min(total_clusters, fat_clusters - FAT_START_ENT);
if (total_clusters > MAX_FAT(sb)) { if (total_clusters > MAX_FAT(sb)) {
if (!silent) if (!silent)
printk(KERN_ERR "FAT: count of clusters too big (%u)\n", fat_msg(sb, KERN_ERR, "count of clusters too big (%u)",
total_clusters); total_clusters);
brelse(bh); brelse(bh);
goto out_invalid; goto out_invalid;
...@@ -1469,7 +1469,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1469,7 +1469,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
sprintf(buf, "cp%d", sbi->options.codepage); sprintf(buf, "cp%d", sbi->options.codepage);
sbi->nls_disk = load_nls(buf); sbi->nls_disk = load_nls(buf);
if (!sbi->nls_disk) { if (!sbi->nls_disk) {
printk(KERN_ERR "FAT: codepage %s not found\n", buf); fat_msg(sb, KERN_ERR, "codepage %s not found", buf);
goto out_fail; goto out_fail;
} }
...@@ -1477,7 +1477,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1477,7 +1477,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
if (sbi->options.isvfat) { if (sbi->options.isvfat) {
sbi->nls_io = load_nls(sbi->options.iocharset); sbi->nls_io = load_nls(sbi->options.iocharset);
if (!sbi->nls_io) { if (!sbi->nls_io) {
printk(KERN_ERR "FAT: IO charset %s not found\n", fat_msg(sb, KERN_ERR, "IO charset %s not found",
sbi->options.iocharset); sbi->options.iocharset);
goto out_fail; goto out_fail;
} }
...@@ -1501,7 +1501,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1501,7 +1501,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
insert_inode_hash(root_inode); insert_inode_hash(root_inode);
sb->s_root = d_alloc_root(root_inode); sb->s_root = d_alloc_root(root_inode);
if (!sb->s_root) { if (!sb->s_root) {
printk(KERN_ERR "FAT: get root inode failed\n"); fat_msg(sb, KERN_ERR, "get root inode failed");
goto out_fail; goto out_fail;
} }
...@@ -1510,8 +1510,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1510,8 +1510,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
out_invalid: out_invalid:
error = -EINVAL; error = -EINVAL;
if (!silent) if (!silent)
printk(KERN_INFO "VFS: Can't find a valid FAT filesystem" fat_msg(sb, KERN_INFO, "Can't find a valid FAT filesystem");
" on dev %s.\n", sb->s_id);
out_fail: out_fail:
if (fat_inode) if (fat_inode)
......
...@@ -73,15 +73,15 @@ int fat_clusters_flush(struct super_block *sb) ...@@ -73,15 +73,15 @@ int fat_clusters_flush(struct super_block *sb)
bh = sb_bread(sb, sbi->fsinfo_sector); bh = sb_bread(sb, sbi->fsinfo_sector);
if (bh == NULL) { if (bh == NULL) {
printk(KERN_ERR "FAT: bread failed in fat_clusters_flush\n"); fat_msg(sb, KERN_ERR, "bread failed in fat_clusters_flush");
return -EIO; return -EIO;
} }
fsinfo = (struct fat_boot_fsinfo *)bh->b_data; fsinfo = (struct fat_boot_fsinfo *)bh->b_data;
/* Sanity check */ /* Sanity check */
if (!IS_FSINFO(fsinfo)) { if (!IS_FSINFO(fsinfo)) {
printk(KERN_ERR "FAT: Invalid FSINFO signature: " fat_msg(sb, KERN_ERR, "Invalid FSINFO signature: "
"0x%08x, 0x%08x (sector = %lu)\n", "0x%08x, 0x%08x (sector = %lu)",
le32_to_cpu(fsinfo->signature1), le32_to_cpu(fsinfo->signature1),
le32_to_cpu(fsinfo->signature2), le32_to_cpu(fsinfo->signature2),
sbi->fsinfo_sector); sbi->fsinfo_sector);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment