Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+20 -9
-9
kernel/sysctl.c
··· 1475 1475 .proc_handler = proc_dointvec, 1476 1476 }, 1477 1477 #endif 1478 - #ifdef CONFIG_UEVENT_HELPER 1479 - { 1480 - .procname = "hotplug", 1481 - .data = &uevent_helper, 1482 - .maxlen = UEVENT_HELPER_PATH_LEN, 1483 - .mode = 0644, 1484 - .proc_handler = proc_dostring, 1485 - }, 1486 - #endif 1487 1478 { 1488 1479 .procname = "overflowuid", 1489 1480 .data = &overflowuid,
+20
lib/kobject_uevent.c
··· 826 826 827 827 postcore_initcall(kobject_uevent_init); 828 828 #endif 829 + 830 + #ifdef CONFIG_UEVENT_HELPER 831 + static const struct ctl_table uevent_helper_sysctl_table[] = { 832 + { 833 + .procname = "hotplug", 834 + .data = &uevent_helper, 835 + .maxlen = UEVENT_HELPER_PATH_LEN, 836 + .mode = 0644, 837 + .proc_handler = proc_dostring, 838 + }, 839 + }; 840 + 841 + static int __init init_uevent_helper_sysctl(void) 842 + { 843 + register_sysctl_init("kernel", uevent_helper_sysctl_table); 844 + return 0; 845 + } 846 + 847 + postcore_initcall(init_uevent_helper_sysctl); 848 + #endif