static int __init init_exfat_core(void) { int err; printk(KERN_INFO "exFAT: Core Version %s\n", EXFAT_VERSION); err = FsInit(); if (err) { if (err == FFS_MEMORYERR) return -ENOMEM; else return -EIO; } return 0; }
VOID __cdecl BootMain(IN PCCH CmdLine) { CmdLineParse(CmdLine); /* Debugger pre-initialization */ DebugInit(FALSE); TRACE("BootMain() called.\n"); MachInit(CmdLine); /* Check if the CPU is new enough */ FrLdrCheckCpuCompatibility(); // FIXME: Should be done inside MachInit! /* UI pre-initialization */ if (!UiInitialize(FALSE)) { UiMessageBoxCritical("Unable to initialize UI."); goto Quit; } /* Initialize memory manager */ if (!MmInitializeMemoryManager()) { UiMessageBoxCritical("Unable to initialize memory manager."); goto Quit; } /* Initialize I/O subsystem */ FsInit(); RunLoader(); Quit: /* If we reach this point, something went wrong before, therefore reboot */ #if defined(__i386__) || defined(_M_AMD64) DiskStopFloppyMotor(); #endif Reboot(); }
VOID BootMain(LPSTR CmdLine) { CmdLineParse(CmdLine); MachInit(CmdLine); FsInit(); DebugInit(); TRACE("BootMain() called.\n"); /* Check if the CPU is new enough */ FrLdrCheckCpuCompatiblity(); if (!UiInitialize(FALSE)) { UiMessageBoxCritical("Unable to initialize UI.\n"); goto quit; } if (!MmInitializeMemoryManager()) { UiMessageBoxCritical("Unable to initialize memory manager"); goto quit; } #ifdef _M_IX86 HalpInitializePciStubs(); HalpInitBusHandler(); #endif RunLoader(); quit: /* If we reach this point, something went wrong before, therefore reboot */ DiskStopFloppyMotor(); Reboot(); }
static void KeStartupThread(void) { process_info_t info; DevInit(); FsInit(); proc_idle.root = fs_root; wcscpy(proc_idle.info->cwd, L"/"); FsChangeDir(L"/"); if (!ProLoadProfile(SYS_BOOT L"/system.pro", L"/")) wprintf(L"KernelMain: unable to load " SYS_BOOT L"/system.pro\n"); ThrCreateThread(&proc_idle, true, MemZeroPageThread, false, NULL, 24, L"MemZeroPageThread"); info = *proc_idle.info; wcscpy(info.cmdline, kernel_startup.cmdline); ProcSpawnProcess(SYS_BOOT L"/monitor.exe", &info); ThrExitThread(0); KeYield(); }
Err AppCommonInit(AppContext* appContext) { Err error; MemSet(appContext, sizeof(*appContext), 0); error=FtrSet(APP_CREATOR, appFtrContext, (UInt32)appContext); if (error) goto OnError; error=FtrSet(APP_CREATOR, appFtrLeaksFile, 0); if (error) goto OnError; LogInit( appContext, "c:\\noah_pro_log.txt" ); InitFiveWay(appContext); appContext->err = ERR_NONE; appContext->prevSelectedWord = 0xfffff; appContext->firstDispLine = -1; appContext->currentWord = -1; appContext->prevSelectedWord = -1; // disable getting nilEvent appContext->ticksEventTimeout = evtWaitForever; #ifdef DEBUG appContext->currentStressWord = 0; #endif appContext->residentWordLookup = NULL; // fill out the default values for Noah preferences // and try to load them from pref database appContext->prefs.startupAction = startupActionNone; appContext->prefs.hwButtonScrollType = scrollPage; appContext->prefs.navButtonScrollType = scrollPage; appContext->prefs.dbStartupAction = dbStartupActionLast; appContext->prefs.lastDbUsedName = NULL; appContext->prefs.bookmarksSortType = bkmSortByTime; appContext->prefs.fResidentModeEnabled = true; // fill out the default display preferences appContext->prefs.displayPrefs.listStyle = 2; SetDefaultDisplayParam(&appContext->prefs.displayPrefs,false,false); appContext->ptrOldDisplayPrefs = NULL; // set ARM state #ifndef DONT_DO_ARMLET appContext->armIsPresent = armTestArmLet(); #endif appContext->bookmarksDb = NULL; appContext->currBookmarkDbType = bkmInvalid; appContext->fInResidentMode = false; SyncScreenSize(appContext); FsInit(&appContext->fsSettings); LoadPreferencesNoahPro(appContext); error=DIA_Init(&appContext->diaSettings); if (error) goto OnError; OnError: return error; }