int export_init() { /* Add our two export tables */ if (nmmgr_handler_add(&st_kern.nmmgr) < 0) return -1; if (nmmgr_handler_add(&st_arch.nmmgr) < 0) return -1; return 0; }
int tcpfs_init() { if (inited) return 0; inited = 1; /* Register with VFS */ return nmmgr_handler_add(&vh.nmmgr) || nmmgr_handler_add(&vh_udpfs.nmmgr); }
int tcpfs_init() { if (init) return 0; init = 1; /* Register with VFS */ return nmmgr_handler_add(&vh) || nmmgr_handler_add(&vh_udpfs); }
int httpfs_init() { if (init) return 0; init = 1; /* Register with VFS */ return nmmgr_handler_add(&vh); }
/* used for dcload-ip + lwIP * assumes fs_dcload_init() was previously called */ int fs_dcload_init_lwip(void *p) { /* Check for combination of KOS networking and dcload-ip */ if((dcload_type == DCLOAD_TYPE_IP) && (__kos_init_flags & INIT_NET)) { lwip_dclsc = p; dbglog(DBG_INFO, "dc-load console support enabled (lwIP)\n"); } else return -1; /* Register with VFS */ return nmmgr_handler_add(&vh.nmmgr); }
void fs_shutdown() { if (!init) return; init = 0; nmmgr_handler_remove(&vh); old_printk_func = real_old_printk_func; if (oldfs) { nmmgr_handler_add(oldfs); oldfs = NULL; } sem_destroy(result_sema); result_sema = NULL; }
/* Call fs_dcload_init_console() before calling fs_dcload_init() */ int fs_dcload_init() { // This was already done in init_console. if(dcload_type == DCLOAD_TYPE_NONE) return -1; /* Check for combination of KOS networking and dcload-ip */ if((dcload_type == DCLOAD_TYPE_IP) && (__kos_init_flags & INIT_NET)) { dbglog(DBG_INFO, "dc-load console+kosnet, will switch to internal ethernet\n"); return -1; /* if (old_printk) { dbgio_set_printk(old_printk); old_printk = 0; } return -1; */ } /* Register with VFS */ return nmmgr_handler_add(&vh.nmmgr); }
/* Initialize the file system */ int fs_rz_init(const unsigned char * romdisk) { SDDEBUG("[%s] [%p]\n", __FUNCTION__, romdisk); /* Could not create 2 ramdisks. */ if (root) { SDERROR("[%s] : only one ROM disk is available.\n", __FUNCTION__); return -1; } if (!romdisk) { SDERROR("[%s] : bad pointer.\n", __FUNCTION__); return -1; } if (memcmp(romdisk,"RD-BEN",6)) { SDERROR("[%s] : invalid romdisk.\n", __FUNCTION__); return -1; } root_entries = * (uint16 *) (romdisk + 6); SDDEBUG("[%s] : %d entries\n",__FUNCTION__, root_entries); /* Register with VFS */ if (nmmgr_handler_add(&vh.nmmgr)) { SDERROR("-->fs_handler_add failed\n"); return -1; } root = romdisk; cur_rd = 0; cached_addr = 0; cached_shadow = 0; memset(&myrd,0,sizeof(myrd)); memset(&mydh,0,sizeof(mydh)); cur_dh = 0; return 0; }
int fs_init() { nmmgr_handler_t * hnd; if (init) return 0; init = 1; result_sema = sem_create(0); real_old_printk_func = old_printk_func; old_printk_func = printk_func; hnd = nmmgr_lookup("/pc"); if (hnd) { nmmgr_handler_remove(hnd); oldfs = hnd; } /* Register with VFS */ return nmmgr_handler_add(&vh); }
int lib_open(klibrary_t * lib) { luaopen_task(GetLuaState()); RegisterLuaLib(lib_get_name(), (LuaRegLibOpen *)luaopen_task); return nmmgr_handler_add(&ds_luaTask_hnd.nmmgr); }
int lib_open(klibrary_t * lib) { tolua_STD_open(GetLuaState()); RegisterLuaLib(lib_get_name(), (LuaRegLibOpen *)tolua_STD_open); return nmmgr_handler_add(&ds_luaSTD_hnd.nmmgr); }