void poweroffSetCallback(poweroff_callback cb, void *arg) { poweroffInit(); poweroff_cb = cb; poweroff_data = arg; }
void init_dev9_modules(const char *path) { char *gz; int gz_size; module_t dev9_modules[2] = { { "Poweroff_Handler", "poweroff.irx", NULL, 0, 0}, { "dev9_driver", "ps2dev9.irx", NULL, 0, 0} }; gz = init_modules_tgz(path,&gz_size); init_load_irx(gz, gz_size, dev9_modules,2); // Return if the poweroff module failed if (dev9_modules[0].result) { return; } if (!dev9_modules[1].result) { __dev9_initialized = 1; } poweroffInit(); if (gz != (char*)modules_tgz) { free(gz); } }
void poweroffShutdown(void) { poweroffInit(); SignalSema(PowerOffSema); SifCallRpc(&cd0, PWROFF_SHUTDOWN, 0, NULL, 0, NULL, 0, NULL, NULL); }
static void frontend_ps2_shutdown(bool unused) { poweroffInit(); /* Set callback function */ poweroffSetCallback(&poweroffCallback, NULL); }