Commit 48dbc127 authored by Konstantin Komarov's avatar Konstantin Komarov

fs/ntfs3: Format output messages like others fs in kernel

Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 031d6f60
...@@ -90,7 +90,7 @@ void ntfs_printk(const struct super_block *sb, const char *fmt, ...) ...@@ -90,7 +90,7 @@ void ntfs_printk(const struct super_block *sb, const char *fmt, ...)
level = printk_get_level(fmt); level = printk_get_level(fmt);
vaf.fmt = printk_skip_level(fmt); vaf.fmt = printk_skip_level(fmt);
vaf.va = &args; vaf.va = &args;
printk("%c%cntfs3: %s: %pV\n", KERN_SOH_ASCII, level, sb->s_id, &vaf); printk("%c%cntfs3(%s): %pV\n", KERN_SOH_ASCII, level, sb->s_id, &vaf);
va_end(args); va_end(args);
} }
...@@ -124,10 +124,15 @@ void ntfs_inode_printk(struct inode *inode, const char *fmt, ...) ...@@ -124,10 +124,15 @@ void ntfs_inode_printk(struct inode *inode, const char *fmt, ...)
struct dentry *de = d_find_alias(inode); struct dentry *de = d_find_alias(inode);
if (de) { if (de) {
int len;
spin_lock(&de->d_lock); spin_lock(&de->d_lock);
snprintf(name, sizeof(s_name_buf), " \"%s\"", len = snprintf(name, sizeof(s_name_buf), " \"%s\"",
de->d_name.name); de->d_name.name);
spin_unlock(&de->d_lock); spin_unlock(&de->d_lock);
if (len <= 0)
name[0] = 0;
else if (len >= sizeof(s_name_buf))
name[sizeof(s_name_buf) - 1] = 0;
} else { } else {
name[0] = 0; name[0] = 0;
} }
...@@ -140,7 +145,7 @@ void ntfs_inode_printk(struct inode *inode, const char *fmt, ...) ...@@ -140,7 +145,7 @@ void ntfs_inode_printk(struct inode *inode, const char *fmt, ...)
vaf.fmt = printk_skip_level(fmt); vaf.fmt = printk_skip_level(fmt);
vaf.va = &args; vaf.va = &args;
printk("%c%cntfs3: %s: ino=%lx,%s %pV\n", KERN_SOH_ASCII, level, printk("%c%cntfs3(%s): ino=%lx,%s %pV\n", KERN_SOH_ASCII, level,
sb->s_id, inode->i_ino, name ? name : "", &vaf); sb->s_id, inode->i_ino, name ? name : "", &vaf);
va_end(args); va_end(args);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment