lkml.org 
[lkml]   [2010]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 1/2] Idd fat_msg() to unified kernel messages for FAT fs.
From
Date
On Tue, 2010-11-09 at 19:58 +0100, Alexey Fisher wrote:
> Add fat_msg() function to unify printkas. And use it
> to report mounts and remounts.
>
> new dmesg looks like this:
> [ 6264.957109] FAT-fs (sdg1): Mounted. Opts: uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush
> [ 6402.175028] FAT-fs (sdg1): re-mounted. Opts: (null)
>
> v2 - add prototype to fat.h;
> úse %pV; rename prefix to level;

Hi again Alexey.

I think putting this function in misc.c is better
because __fat_fs_error is already in that file.

Patch 1 should just add the prototype and function
and maybe convert __fat_fs_error to use %pV.

Maybe the __fat_fs_error %pV conversion is a
separate patch.

The last patch should do the conversions to
fat_msg.

Perhaps add this to misc.c:

diff --git a/fs/fat/misc.c b/fs/fat/misc.c
index 970e682..b497918 100644
--- a/fs/fat/misc.c
+++ b/fs/fat/misc.c
@@ -24,15 +24,18 @@ void __fat_fs_error(struct super_block *s, int report, const char *fmt, ...)
{
struct fat_mount_options *opts = &MSDOS_SB(s)->options;
va_list args;
+ struct va_format vaf;

if (report) {
- printk(KERN_ERR "FAT: Filesystem error (dev %s)\n", s->s_id);
-
- printk(KERN_ERR " ");
va_start(args, fmt);
- vprintk(fmt, args);
+
+ vaf.fmt = fmt;
+ vaf.va = &args;
+
+ printk(KERN_ERR "FAT: Filesystem error (dev %s): %pV\n",
+ s->s_id, &vaf);
+
va_end(args);
- printk("\n");
}

if (opts->errors == FAT_ERRORS_PANIC)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-11-09 20:45    [from the cache]
©2003-2011 Jasper Spaans