Files
scoutfs/kmod/src/msg.c
T
Zach Brown eb4694e401 Add simple message printing
Add a message printing function whose output includes the device and
major:minor and which handles the kernel level string prefix.

Signed-off-by: Zach Brown <zab@versity.com>
2016-02-12 19:28:03 -08:00

21 lines
458 B
C

#include <linux/kernel.h>
#include <linux/fs.h>
void scoutfs_msg(struct super_block *sb, const char *prefix, const char *str,
const char *fmt, ...)
{
struct va_format vaf;
va_list args;
va_start(args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
printk("%sscoutfs (%s %u:%u)%s: %pV\n", prefix,
sb->s_id, MAJOR(sb->s_bdev->bd_dev), MINOR(sb->s_bdev->bd_dev),
str, &vaf);
va_end(args);
}