From: Wolfram Sang <w.sang@pengutronix.de>
To: Joe Perches <joe@perches.com>
Cc: Alexey Fisher <bug-track@fisher-privat.net>,
linux-kernel@vger.kernel.org,
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Subject: Re: [PATCH 1/2] Introduce fat_msg() for unified kernel messages
Date: Tue, 9 Nov 2010 18:56:17 +0100 [thread overview]
Message-ID: <20101109175617.GA28008@pengutronix.de> (raw)
In-Reply-To: <1289323541.1823.73.camel@Joe-Laptop>
[-- Attachment #1: Type: text/plain, Size: 2095 bytes --]
Hi Joe,
On Tue, Nov 09, 2010 at 09:25:41AM -0800, Joe Perches wrote:
> On Tue, 2010-11-09 at 17:55 +0100, Alexey Fisher wrote:
> > Add fat_msg() function to unify printkas. And use it
> > to report mounts and remounts.
>
> Hi Alexey.
>
> > 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)
> >
> > Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
> > ---
> > fs/fat/inode.c | 20 ++++++++++++++++++++
> > 1 files changed, 20 insertions(+), 0 deletions(-)
> >
> > diff --git a/fs/fat/inode.c b/fs/fat/inode.c
> > index ad6998a..4699173 100644
> > --- a/fs/fat/inode.c
> > +++ b/fs/fat/inode.c
> > @@ -37,6 +37,20 @@
> > static int fat_default_codepage = CONFIG_FAT_DEFAULT_CODEPAGE;
> > static char fat_default_iocharset[] = CONFIG_FAT_DEFAULT_IOCHARSET;
> >
> > +/* unify messages.
> > + * this function is copy of ext4_msg() from fs/ext4/super.c
> > + */
> > +void fat_msg(struct super_block *sb, const char *prefix,
> > + const char *fmt, ...)
> > +{
> > + va_list args;
> > +
> > + va_start(args, fmt);
> > + printk("%sFAT-fs (%s): ", prefix, sb->s_id);
> > + vprintk(fmt, args);
> > + printk("\n");
> > + va_end(args);
> > +}
>
> A few comments:
>
> The first patch should put the prototype for fat_msg in
> fs/fat/fat.h file and the body as done here.
>
> The prototype should use attribute_ printf so format
> and argument are type checked.
>
> This would be better using the %pV extension so a
> single printk call is done and the dmesg log can not be
> interleaved.
>
> prefix is a bit misleading, perhaps level is better.
Note that this routine was almost 1:1 taken from ext2, it seems (which is a
sensible approach), so these issues are present more than once.
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2010-11-09 17:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-09 16:55 [PATCH 0/2] FAT unified kernel messages Alexey Fisher
2010-11-09 16:55 ` [PATCH 1/2] Introduce fat_msg() for " Alexey Fisher
2010-11-09 17:25 ` Joe Perches
2010-11-09 17:56 ` Wolfram Sang [this message]
2010-11-09 18:58 ` [PATCH 1/2] Idd fat_msg() to unified kernel messages for FAT fs Alexey Fisher
2010-11-09 19:43 ` Joe Perches
2010-11-10 10:23 ` [PATCH 1/4] Convert fat_fs_error to use %pV Alexey Fisher
2010-11-10 10:32 ` Andreas Schwab
2010-11-10 10:23 ` [PATCH 2/4] Add fat_msg() function for preformated FAT messages Alexey Fisher
2010-11-10 10:23 ` [PATCH 3/4] Replace all printk with fat_msg() Alexey Fisher
2010-11-10 10:23 ` [PATCH 4/4] Report each FAT mount and mount options Alexey Fisher
2010-11-10 11:33 ` [PATCH 1/2] Idd fat_msg() to unified kernel messages for FAT fs OGAWA Hirofumi
2010-11-09 16:55 ` [PATCH 2/2] Unify rest of FAT messages Alexey Fisher
2010-11-09 19:04 ` [PATCH 2/2 v2] " Alexey Fisher
2010-11-10 11:40 ` OGAWA Hirofumi
2010-11-10 12:41 ` Alexey Fisher
2010-11-10 13:53 ` OGAWA Hirofumi
2010-11-10 15:07 ` Alexey Fisher
2010-11-10 16:40 ` OGAWA Hirofumi
2010-11-10 16:58 ` Alexey Fisher
2010-11-10 20:53 ` OGAWA Hirofumi
2011-02-24 8:04 ` Alexey Fisher
2011-03-02 14:17 ` OGAWA Hirofumi
2010-11-09 17:03 ` [PATCH 0/2] FAT unified kernel messages Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101109175617.GA28008@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=bug-track@fisher-privat.net \
--cc=hirofumi@mail.parknet.co.jp \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.