linux/kernel/printk/index.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Userspace indexing of printk formats
 */

#include <linux/debugfs.h>
#include <linux/module.h>
#include <linux/printk.h>
#include <linux/slab.h>
#include <linux/string_helpers.h>

#include "internal.h"

extern struct pi_entry *__start_printk_index[];
extern struct pi_entry *__stop_printk_index[];

/* The base dir for module formats, typically debugfs/printk/index/ */
static struct dentry *dfs_index;

static struct pi_entry *pi_get_entry(const struct module *mod, loff_t pos)
{}

static void *pi_next(struct seq_file *s, void *v, loff_t *pos)
{}

static void *pi_start(struct seq_file *s, loff_t *pos)
{}

/*
 * We need both ESCAPE_ANY and explicit characters from ESCAPE_SPECIAL in @only
 * because otherwise ESCAPE_NAP will cause double quotes and backslashes to be
 * ignored for quoting.
 */
#define seq_escape_printf_format(s, src)

static int pi_show(struct seq_file *s, void *v)
{}

static void pi_stop(struct seq_file *p, void *v) {}

static const struct seq_operations dfs_index_sops =;

DEFINE_SEQ_ATTRIBUTE();

#ifdef CONFIG_MODULES
static const char *pi_get_module_name(struct module *mod)
{}
#else
static const char *pi_get_module_name(struct module *mod)
{
	return "vmlinux";
}
#endif

static void pi_create_file(struct module *mod)
{}

#ifdef CONFIG_MODULES
static void pi_remove_file(struct module *mod)
{}

static int pi_module_notify(struct notifier_block *nb, unsigned long op,
			    void *data)
{}

static struct notifier_block module_printk_fmts_nb =;

static void __init pi_setup_module_notifier(void)
{}
#else
static inline void __init pi_setup_module_notifier(void) { }
#endif

static int __init pi_init(void)
{}

/* debugfs comes up on core and must be initialised first */
postcore_initcall(pi_init);