2021-11-16 18:36:02 -03:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2021-03-31 17:16:24 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2018 Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <linux/fs.h>
|
|
|
|
|
#include "apfs.h"
|
|
|
|
|
|
2023-03-24 22:07:47 -03:00
|
|
|
void apfs_msg(struct super_block *sb, const char *prefix, const char *func, int line, const char *fmt, ...)
|
2021-03-31 17:16:24 -03:00
|
|
|
{
|
2023-03-24 22:07:47 -03:00
|
|
|
char *sb_id = NULL;
|
2021-03-31 17:16:24 -03:00
|
|
|
struct va_format vaf;
|
|
|
|
|
va_list args;
|
|
|
|
|
|
|
|
|
|
va_start(args, fmt);
|
|
|
|
|
|
|
|
|
|
vaf.fmt = fmt;
|
|
|
|
|
vaf.va = &args;
|
|
|
|
|
|
2023-03-24 22:07:47 -03:00
|
|
|
/* The superblock is not available to all callers */
|
|
|
|
|
sb_id = sb ? sb->s_id : "?";
|
|
|
|
|
|
|
|
|
|
if (func)
|
|
|
|
|
printk("%sAPFS (%s): %pV (%s:%d)\n", prefix, sb_id, &vaf, func, line);
|
|
|
|
|
else
|
|
|
|
|
printk("%sAPFS (%s): %pV\n", prefix, sb_id, &vaf);
|
2021-03-31 17:16:24 -03:00
|
|
|
|
|
|
|
|
va_end(args);
|
|
|
|
|
}
|