lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240709041734.3719513-1-sj1557.seo@samsung.com>
Date: Tue,  9 Jul 2024 13:17:34 +0900
From: Sungjong Seo <sj1557.seo@...sung.com>
To: hirofumi@...l.parknet.co.jp, akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, Sungjong Seo <sj1557.seo@...sung.com>
Subject: [PATCH] fat: print s_dev via fat_msg

To clarify MAJOR/MINOR number of a mounted device, fat_msg prints prefix
that includes them.

Signed-off-by: Sungjong Seo <sj1557.seo@...sung.com>
---
 fs/fat/fat.h  | 2 +-
 fs/fat/misc.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/fat/fat.h b/fs/fat/fat.h
index 66cf4778cf3b..538bcb3e28e1 100644
--- a/fs/fat/fat.h
+++ b/fs/fat/fat.h
@@ -435,7 +435,7 @@ void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...);
 #define fat_fs_error_ratelimit(sb, fmt, args...) \
 	__fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args)
 
-#define FAT_PRINTK_PREFIX "%sFAT-fs (%s): "
+#define FAT_PRINTK_PREFIX "%sFAT-fs (%s[%d:%d]): "
 #define fat_msg(sb, level, fmt, args...)				\
 do {									\
 	printk_index_subsys_emit(FAT_PRINTK_PREFIX, level, fmt, ##args);\
diff --git a/fs/fat/misc.c b/fs/fat/misc.c
index c7a2d27120ba..6672cefc5484 100644
--- a/fs/fat/misc.c
+++ b/fs/fat/misc.c
@@ -9,6 +9,7 @@
 
 #include "fat.h"
 #include <linux/iversion.h>
+#include <linux/blkdev.h>
 
 /*
  * fat_fs_error reports a file system problem that might indicate fa data
@@ -59,7 +60,8 @@ void _fat_msg(struct super_block *sb, const char *level, const char *fmt, ...)
 	va_start(args, fmt);
 	vaf.fmt = fmt;
 	vaf.va = &args;
-	_printk(FAT_PRINTK_PREFIX "%pV\n", level, sb->s_id, &vaf);
+	_printk(FAT_PRINTK_PREFIX "%pV\n", level, sb->s_id,
+		MAJOR(sb->s_dev), MINOR(sb->s_dev), &vaf);
 	va_end(args);
 }
 
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ