X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fsubsystems%2Fmvdm%2Fntvdm%2Femulator.c;h=fa55abb5d407e13ca49eb3359ecea8dfcad9473c;hp=344f64e5af0fafb4042d15fb9f316763ba7385fe;hb=59136514da5a6359da17495ba1e69050936e8696;hpb=b1b70208549ee1819252cbe99987928faf656f65 diff --git a/reactos/subsystems/mvdm/ntvdm/emulator.c b/reactos/subsystems/mvdm/ntvdm/emulator.c index 344f64e5af0..fa55abb5d40 100644 --- a/reactos/subsystems/mvdm/ntvdm/emulator.c +++ b/reactos/subsystems/mvdm/ntvdm/emulator.c @@ -564,14 +564,22 @@ BOOLEAN EmulatorInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput) } } - /* Mount the available hard disks */ + /* + * Mount the available hard disks. Contrary to floppies, failing + * mounting a hard disk is considered as an unrecoverable error. + */ for (i = 0; i < ARRAYSIZE(GlobalSettings.HardDisks); ++i) { if (GlobalSettings.HardDisks[i].Length != 0 && GlobalSettings.HardDisks[i].Buffer && GlobalSettings.HardDisks[i].Buffer != '\0') { - MountDisk(HARD_DISK, i, GlobalSettings.HardDisks[i].Buffer, FALSE); + if (!MountDisk(HARD_DISK, i, GlobalSettings.HardDisks[i].Buffer, FALSE)) + { + wprintf(L"FATAL: Failed to mount hard disk file '%Z'.\n", &GlobalSettings); + EmulatorCleanup(); + return FALSE; + } } }