OpenCloudOS-Kernel/kernel/tkernel/base.c

30 lines
621 B
C

#include <linux/proc_fs.h>
#include <linux/sysctl.h>
#include <linux/tkernel.h>
#include <linux/init.h>
#include <linux/kmemleak.h>
struct proc_dir_entry *proc_tkernel;
const struct ctl_path tkernel_ctl_path[] = {
{ .procname = "tkernel", },
{ }
};
static struct ctl_table placeholder_vars[] = {
{}
};
static int __init tkernel_init(void) {
struct ctl_table_header *p;
proc_tkernel = proc_mkdir("tkernel", NULL);
p = register_sysctl_paths(tkernel_ctl_path, placeholder_vars);
if (!p)
printk("tkernel: sysctl registration failed!\n");
else
kmemleak_not_leak(p);
return 0;
}
early_initcall(tkernel_init);