/* *********** Check comments starting with // ### and fill appropriate code there *********** */ #pragma implementation #include #include #include #include "raidconf.h" #include "raidconf.m" MODULE_DEFINE_VERSION(raidconf); PUBLIC MODULE_raidconf::MODULE_raidconf() : LINUXCONF_MODULE("raidconf") { linuxconf_loadmsg ("raidconf",PACKAGE_REV); } static const char *keymenu=NULL; PUBLIC void MODULE_raidconf::setmenu ( DIALOG &dia, MENU_CONTEXT context) { if (context == MENU_FSCONF){ keymenu = MSG_U(M_raidconf,"Disk RAID configuration"); dia.new_menuitem ("raidconf","",keymenu); } } PUBLIC int MODULE_raidconf::domenu ( MENU_CONTEXT context, const char *key) { if (context == MENU_FSCONF){ if (key == keymenu){ // ### Place the call to the edit function here } } return 0; } PUBLIC int MODULE_raidconf::dohtml (const char *key) { int ret = LNCF_NOT_APPLICABLE; if (strcmp(key,"raidconf")==0){ // ### Insert any menu and dialog here ret = 0; } return ret; } static void usage() { xconf_error (MSG_U(T_USAGE ,"Module raidconf\n" "linuxconf --modulemain raidconf [ specific options ]\n" "\n") ); } PUBLIC void MODULE_raidconf::usage (SSTRINGS &tb) { tb.add (new SSTRING (MSG_R(T_USAGE))); } PUBLIC int MODULE_raidconf::execmain (int argc , char *argv[], bool) { int ret = LNCF_NOT_APPLICABLE; const char *pt = strrchr(argv[0],'/'); if (pt != NULL){ pt++; }else{ pt = argv[0]; } if (strcmp(pt,"raidconf")==0){ ret = -1; if (argc == 1){ // ### Place call to main menu of the module }else{ // ### Add some option parsing for the module ::usage(); } } return ret; } static MODULE_raidconf raidconf;