From d52803c9e73144551e2266f63e77570d13759d4d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 27 Sep 2015 17:39:29 +0000 Subject: [PATCH] [NTVDM]: Update the read/write flag of the mounted image: fixes errors when trying to write to the read-only image. Now we correctly return a "write-protected" disk error. svn path=/trunk/; revision=69382 --- reactos/subsystems/mvdm/ntvdm/hardware/disk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reactos/subsystems/mvdm/ntvdm/hardware/disk.c b/reactos/subsystems/mvdm/ntvdm/hardware/disk.c index 35009c02cdd..6c67312bda5 100644 --- a/reactos/subsystems/mvdm/ntvdm/hardware/disk.c +++ b/reactos/subsystems/mvdm/ntvdm/hardware/disk.c @@ -581,6 +581,10 @@ MountDisk(IN DISK_TYPE DiskType, DisplayMessage(L"MountDisk: Failed to mount disk file '%S' in 0x%p.", FileName, DiskImage); goto Quit; } + + /* Update its read/write state */ + DiskImage->ReadOnly = ReadOnly; + Success = TRUE; Quit: -- 2.17.1