mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
uevent: mv uevent_helper into kobject_uevent.c
Move both uevent_helper table into lib/kobject_uevent.c. Place the registration early in the initcall order with postcore_initcall. This is part of a greater effort to move ctl tables into their respective subsystems which will reduce the merge conflicts in kernel/sysctl.c. Signed-off-by: Joel Granados <joel.granados@kernel.org>
This commit is contained in:
parent
39dac316f0
commit
88eddb0502
@ -1474,15 +1474,6 @@ static const struct ctl_table kern_table[] = {
|
|||||||
.mode = 0644,
|
.mode = 0644,
|
||||||
.proc_handler = proc_dointvec,
|
.proc_handler = proc_dointvec,
|
||||||
},
|
},
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_UEVENT_HELPER
|
|
||||||
{
|
|
||||||
.procname = "hotplug",
|
|
||||||
.data = &uevent_helper,
|
|
||||||
.maxlen = UEVENT_HELPER_PATH_LEN,
|
|
||||||
.mode = 0644,
|
|
||||||
.proc_handler = proc_dostring,
|
|
||||||
},
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
.procname = "overflowuid",
|
.procname = "overflowuid",
|
||||||
|
@ -826,3 +826,23 @@ static int __init kobject_uevent_init(void)
|
|||||||
|
|
||||||
postcore_initcall(kobject_uevent_init);
|
postcore_initcall(kobject_uevent_init);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_UEVENT_HELPER
|
||||||
|
static const struct ctl_table uevent_helper_sysctl_table[] = {
|
||||||
|
{
|
||||||
|
.procname = "hotplug",
|
||||||
|
.data = &uevent_helper,
|
||||||
|
.maxlen = UEVENT_HELPER_PATH_LEN,
|
||||||
|
.mode = 0644,
|
||||||
|
.proc_handler = proc_dostring,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static int __init init_uevent_helper_sysctl(void)
|
||||||
|
{
|
||||||
|
register_sysctl_init("kernel", uevent_helper_sysctl_table);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
postcore_initcall(init_uevent_helper_sysctl);
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user