2007-10-11 09:17:26

by Vegard Nossum

[permalink] [raw]
Subject: [PATCH] FAT: Fix printk format strings.

This makes sure printk format strings contain no more than a single
line.

Signed-off-by: Vegard Nossum <[email protected]>
---
fs/fat/inode.c | 3 ++-
fs/fat/misc.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 4baa5f2..06a1bd9 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1301,7 +1301,8 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
fsinfo = (struct fat_boot_fsinfo *)fsinfo_bh->b_data;
if (!IS_FSINFO(fsinfo)) {
printk(KERN_WARNING
- "FAT: Did not find valid FSINFO signature.\n"
+ "FAT: Did not find valid FSINFO signature.\n");
+ printk(KERN_WARNING
" Found signature1 0x%08x signature2 0x%08x"
" (sector = %lu)\n",
le32_to_cpu(fsinfo->signature1),
diff --git a/fs/fat/misc.c b/fs/fat/misc.c
index 308f2b6..a4de2b8 100644
--- a/fs/fat/misc.c
+++ b/fs/fat/misc.c
@@ -55,7 +55,8 @@ void fat_clusters_flush(struct super_block *sb)
fsinfo = (struct fat_boot_fsinfo *)bh->b_data;
/* Sanity check */
if (!IS_FSINFO(fsinfo)) {
- printk(KERN_ERR "FAT: Did not find valid FSINFO signature.\n"
+ printk(KERN_ERR "FAT: Did not find valid FSINFO signature.\n");
+ printk(KERN_ERR
" Found signature1 0x%08x signature2 0x%08x"
" (sector = %lu)\n",
le32_to_cpu(fsinfo->signature1),
--
1.5.2.4




2007-10-11 10:58:31

by Bodo Eggert

[permalink] [raw]
Subject: Re: [PATCH] FAT: Fix printk format strings.

Vegard Nossum <[email protected]> wrote:

> This makes sure printk format strings contain no more than a single
> line.

> printk(KERN_WARNING
> - "FAT: Did not find valid FSINFO signature.\n"
> + "FAT: Did not find valid FSINFO signature.\n");
> + printk(KERN_WARNING
> " Found signature1 0x%08x signature2 0x%08x"
> " (sector = %lu)\n",

What about something like
"Fat32: Invalid FSINFO signatures 0x%08x, 0x%08x; expected 0x%08x, 0x%08\n" ?
or
"Fat32: Invalid FSINFO signatures 0x%08x, 0x%08x\n" ?
--
bus error. passengers dumped.

Fri?, Spammer: [email protected]
[email protected] [email protected]

2007-10-11 17:57:16

by OGAWA Hirofumi

[permalink] [raw]
Subject: Re: [PATCH] FAT: Fix printk format strings.

Bodo Eggert <[email protected]> writes:

> Vegard Nossum <[email protected]> wrote:
>
>> This makes sure printk format strings contain no more than a single
>> line.
>
>> printk(KERN_WARNING
>> - "FAT: Did not find valid FSINFO signature.\n"
>> + "FAT: Did not find valid FSINFO signature.\n");
>> + printk(KERN_WARNING
>> " Found signature1 0x%08x signature2 0x%08x"
>> " (sector = %lu)\n",
>
> What about something like
> "Fat32: Invalid FSINFO signatures 0x%08x, 0x%08x; expected 0x%08x, 0x%08\n" ?
> or
> "Fat32: Invalid FSINFO signatures 0x%08x, 0x%08x\n" ?

Looks good to me. I'll modify a patch, and apply it.

Thanks.
--
OGAWA Hirofumi <[email protected]>