[NTVDM] Log explicitly calls to Long FileName support functions in DOS INT 21h. Use MAXDWORD instead of hardcoded values.

This commit is contained in:
Hermès Bélusca-Maïto 2021-12-03 23:15:03 +01:00
parent 81d5e650de
commit addf1e87fe
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 14 additions and 3 deletions

View file

@ -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);

View file

@ -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++)