https://git.reactos.org/?p=reactos.git;a=commitdiff;h=addf1e87fe643c412dc22…
commit addf1e87fe643c412dc22f4fcb461410398e2f6b
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Fri Dec 3 23:15:03 2021 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Fri Dec 3 23:26:24 2021 +0100
[NTVDM] Log explicitly calls to Long FileName support functions in DOS INT 21h. Use
MAXDWORD instead of hardcoded values.
---
subsystems/mvdm/ntvdm/dos/dos32krnl/device.c | 2 +-
subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c | 15 +++++++++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c
b/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c
index 71fbdcef1aa..881f67e47d3 100644
--- a/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c
+++ b/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c
@@ -378,7 +378,7 @@ PDOS_DEVICE_NODE DosCreateDeviceEx(WORD Attributes, PCHAR DeviceName,
WORD Priva
/* Fill the header with data */
DriverHeader = SEG_OFF_TO_PTR(Segment, 0);
- DriverHeader->Link = 0xFFFFFFFF;
+ DriverHeader->Link = MAXDWORD;
DriverHeader->DeviceAttributes = Attributes;
DriverHeader->StrategyRoutine = sizeof(DOS_DRIVER);
DriverHeader->InterruptRoutine = sizeof(DOS_DRIVER) + sizeof(StrategyRoutine);
diff --git a/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c
b/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c
index 641ab62ed93..6c94ade7e6d 100644
--- a/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c
+++ b/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c
@@ -1998,6 +1998,17 @@ VOID WINAPI DosInt21h(LPWORD Stack)
break;
}
+ /* Long FileName Support */
+ case 0x71:
+ {
+ DPRINT1("INT 21h LFN Support, AH = %02Xh, AL = %02Xh NOT
IMPLEMENTED!\n",
+ getAH(), getAL());
+
+ setAL(0); // Some functions expect AL to be 0 when it's not supported.
+ Stack[STACK_FLAGS] |= EMULATOR_FLAG_CF;
+ break;
+ }
+
/* Unsupported */
default: // Default:
{
@@ -2302,7 +2313,7 @@ BOOLEAN DosKRNLInitialize(VOID)
SysVars->BootDrive = RtlUpcaseUnicodeChar(SharedUserData->NtSystemRoot[0]) -
'A' + 1;
/* Initialize the NUL device driver */
- SysVars->NullDevice.Link = 0xFFFFFFFF;
+ SysVars->NullDevice.Link = MAXDWORD;
SysVars->NullDevice.DeviceAttributes = DOS_DEVATTR_NUL | DOS_DEVATTR_CHARACTER;
// Offset from within the DOS data segment
SysVars->NullDevice.StrategyRoutine = DOS_DATA_OFFSET(NullDriverRoutine);
@@ -2380,7 +2391,7 @@ BOOLEAN DosKRNLInitialize(VOID)
/* Initialize the SFT */
Sft = (PDOS_SFT)FAR_POINTER(SysVars->FirstSft);
- Sft->Link = 0xFFFFFFFF;
+ Sft->Link = MAXDWORD;
Sft->NumDescriptors = DOS_SFT_SIZE;
for (i = 0; i < Sft->NumDescriptors; i++)