Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c8a5ffb authored by Alexey Fisher's avatar Alexey Fisher Committed by OGAWA Hirofumi
Browse files

fat: Convert fat_fs_error to use %pV



- convert fat_fs_error to use %pV
- be consequent and use "supor_block *sb" instead of "supor_block *s"
- use devise name in each message.

Signed-off-by: default avatarAlexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
parent 70030929
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -325,12 +325,12 @@ extern int fat_flush_inodes(struct super_block *sb, struct inode *i1,
		            struct inode *i2);
		            struct inode *i2);
/* fat/misc.c */
/* fat/misc.c */
extern void
extern void
__fat_fs_error(struct super_block *s, int report, const char *fmt, ...)
__fat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
	__attribute__ ((format (printf, 3, 4))) __cold;
	__attribute__ ((format (printf, 3, 4))) __cold;
#define fat_fs_error(s, fmt, args...)		\
#define fat_fs_error(sb, fmt, args...)		\
	__fat_fs_error(s, 1, fmt , ## args)
	__fat_fs_error(sb, 1, fmt , ## args)
#define fat_fs_error_ratelimit(s, fmt, args...) \
#define fat_fs_error_ratelimit(sb, fmt, args...) \
	__fat_fs_error(s, __ratelimit(&MSDOS_SB(s)->ratelimit), fmt , ## args)
	__fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args)
extern int fat_clusters_flush(struct super_block *sb);
extern int fat_clusters_flush(struct super_block *sb);
extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster);
extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster);
extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts,
extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts,
+11 −11
Original line number Original line Diff line number Diff line
@@ -20,26 +20,26 @@
 * In case the file system is remounted read-only, it can be made writable
 * In case the file system is remounted read-only, it can be made writable
 * again by remounting it.
 * again by remounting it.
 */
 */
void __fat_fs_error(struct super_block *s, int report, const char *fmt, ...)
void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
{
{
	struct fat_mount_options *opts = &MSDOS_SB(s)->options;
	struct fat_mount_options *opts = &MSDOS_SB(sb)->options;
	va_list args;
	va_list args;
	struct va_format vaf;


	if (report) {
	if (report) {
		printk(KERN_ERR "FAT: Filesystem error (dev %s)\n", s->s_id);

		printk(KERN_ERR "    ");
		va_start(args, fmt);
		va_start(args, fmt);
		vprintk(fmt, args);
		vaf.fmt = fmt;
		vaf.va = &args;
		printk(KERN_ERR "FAT-fs (%s): error, %pV\n", sb->s_id, &vaf);
		va_end(args);
		va_end(args);
		printk("\n");
	}
	}


	if (opts->errors == FAT_ERRORS_PANIC)
	if (opts->errors == FAT_ERRORS_PANIC)
		panic("FAT: fs panic from previous error\n");
		panic("FAT-fs (%s): fs panic from previous error\n", sb->s_id);
	else if (opts->errors == FAT_ERRORS_RO && !(s->s_flags & MS_RDONLY)) {
	else if (opts->errors == FAT_ERRORS_RO && !(sb->s_flags & MS_RDONLY)) {
		s->s_flags |= MS_RDONLY;
		sb->s_flags |= MS_RDONLY;
		printk(KERN_ERR "FAT: Filesystem has been set read-only\n");
		printk(KERN_ERR "FAT-fs (%s): Filesystem has been "
				"set read-only\n", sb->s_id);
	}
	}
}
}
EXPORT_SYMBOL_GPL(__fat_fs_error);
EXPORT_SYMBOL_GPL(__fat_fs_error);