24 #include <linux/kernel.h> 25 #include <linux/debugfs.h> 26 #include <linux/module.h> 27 #include <linux/version.h> 41 static struct dentry *core_file;
42 static const char core_name[] =
"core";
43 static bool core_file_is_opened =
false;
46 static int core_open(
struct inode *
i,
struct file *
f)
48 if (core_file_is_opened)
51 core_file_is_opened =
true;
56 static int core_release(
struct inode *
i,
struct file *
f)
58 core_file_is_opened =
false;
62 static ssize_t core_read(
struct file *
file,
char __user *ubuf,
63 size_t ubuf_size, loff_t *ppos)
67 return simple_read_from_buffer(ubuf, ubuf_size, ppos,
72 static const struct file_operations core_fops = {
75 .release = core_release,
85 if (core_file ==
NULL) {
86 pr_err(KBUILD_MODNAME
": failed to create debugfs file" 96 debugfs_remove(core_file);
static struct m0_addb2_mach * m
struct dentry * dfs_root_dir
#define M0_MOTR_KO_SIZE(module)
M0_INTERNAL const struct module * m0_motr_ko_get_module(void)
static int struct dentry * dentry
const char dfs_root_name[]
#define M0_MOTR_KO_BASE(module)
void core_dfs_cleanup(void)