// SPDX-License-Identifier: GPL-2.0-or-later
/**
* ldm - Support for Windows Logical Disk Manager (Dynamic Disks)
*
* Copyright (C) 2001,2002 Richard Russon <ldm@flatcap.org>
* Copyright (c) 2001-2012 Anton Altaparmakov
* Copyright (C) 2001,2002 Jakob Kemi <jakob.kemi@telia.com>
*
* Documentation is available at http://www.linux-ntfs.org/doku.php?id=downloads
*/
#include <linux/slab.h>
#include <linux/pagemap.h>
#include <linux/stringify.h>
#include <linux/kernel.h>
#include <linux/uuid.h>
#include "ldm.h"
#include "check.h"
#include "msdos.h"
/*
* ldm_debug/info/error/crit - Output an error message
* @f: A printf format string containing the message
* @...: Variables to substitute into @f
*
* ldm_debug() writes a DEBUG level message to the syslog but only if the
* driver was compiled with debug enabled. Otherwise, the call turns into a NOP.
*/
#ifndef CONFIG_LDM_DEBUG
#define ldm_debug(...) do {} while (0)
#else
#define ldm_debug(f, a...) _ldm_printk (KERN_DEBUG, __func__, f, ##a)
#endif
#define ldm_crit(f, a...) _ldm_printk (KERN_CRIT, __func__, f, ##a)
#define ldm_error(f, a...) _ldm_printk (KERN_ERR, __func__, f, ##a)
#define ldm_info(f, a...) _ldm_printk (KERN_INFO, __func__, f, ##a)
static __printf(3, 4)
void _ldm_printk(const char *level, const char *function, const char *fmt, ...)
{
struct va_format vaf;
va_list args;
va_start (args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
printk("%s%s(): %pV