1 From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
3 ext4: fix transposition typo in format string
5 According to C99, %*.s means the same as %*.0s, in other words, print as
6 many spaces as the field width argument says and effectively ignore the
7 string argument. That is certainly not what was meant here. The kernel's
8 printf implementation, however, treats it as if the . was not there,
9 i.e. as %*s. I don't know if de->name is nul-terminated or not, but in
10 any case I'm guessing the intention was to use de->name_len as precision
11 instead of field width.
13 [ Note: this is debugging code which is commented out, so this is not
14 security issue; a developer would have to explicitly enable
15 INLINE_DIR_DEBUG before this would be an issue. ]
17 Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
18 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
21 fs/ext4/inline.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
24 diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
25 index 4b143febf21f..8b64d715e476 100644
26 --- a/fs/ext4/inline.c
27 +++ b/fs/ext4/inline.c
28 @@ -972,7 +972,7 @@ void ext4_show_inline_dir(struct inode *dir, struct buffer_head *bh,
30 while ((void *)de < dlimit) {
31 de_len = ext4_rec_len_from_disk(de->rec_len, inline_size);
32 - trace_printk("de: off %u rlen %u name %*.s nlen %u ino %u\n",
33 + trace_printk("de: off %u rlen %u name %.*s nlen %u ino %u\n",
34 offset, de_len, de->name_len, de->name,
35 de->name_len, le32_to_cpu(de->inode));
36 if (ext4_check_dir_entry(dir, NULL, de, bh,
41 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
42 the body of a message to majordomo@vger.kernel.org
43 More majordomo info at http://vger.kernel.org/majordomo-info.html
44 Please read the FAQ at http://www.tux.org/lkml/