// // This module was implemented by Gustavo Niemeyer // #pragma implementation #include #include #include #include #include "kernelconf.h" #include "kernelconf.m" #include "sysctl.h" MODULE_DEFINE_VERSION(kernelconf); PUBLIC MODULE_kernelconf::MODULE_kernelconf() : LINUXCONF_MODULE("kernelconf") { linuxconf_loadmsg ("kernelconf",PACKAGE_REV); } static const char *keymenu=NULL; PUBLIC void MODULE_kernelconf::setmenu ( DIALOG &dia, MENU_CONTEXT context) { if (context == MENU_MISCSERV){ keymenu = MSG_U(M_kernelconf,"Kernel Configuration"); dia.new_menuitem ("kernelconf","",keymenu); } } PUBLIC int MODULE_kernelconf::domenu ( MENU_CONTEXT context, const char *key) { if (context == MENU_MISCSERV){ if (key == keymenu){ kernelconf_edit(); } } return 0; } PUBLIC int MODULE_kernelconf::dohtml (const char *key) { int ret = LNCF_NOT_APPLICABLE; if (strcmp(key,"kernelconf")==0){ // ### Insert any menu and dialog here ret = 0; } return ret; } PUBLIC int MODULE_kernelconf::probe (int level, int runlevel, bool sim) { if (level == 2){ kernelconf_probe(sim); } return LNCF_NOT_APPLICABLE; } static void usage() { xconf_error (MSG_U(T_USAGE,"Module kernelconf\n" "linuxconf --modulemain kernelconf [ specific options ]\n" "\n" " --set