Skip to content

Commit

Permalink
Fix console output
Browse files Browse the repository at this point in the history
  • Loading branch information
momo5502 committed Sep 21, 2024
1 parent d65076c commit e7622e8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/windows_emulator/syscalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ namespace
return STATUS_NOT_FOUND;
}

NTSTATUS handle_NtQueryVolumeInformationFile(const syscall_context& c, uint64_t /*file_handle*/,
NTSTATUS handle_NtQueryVolumeInformationFile(const syscall_context& c, uint64_t file_handle,
uint64_t /*io_status_block*/, uint64_t fs_information,
ULONG /*length*/,
FS_INFORMATION_CLASS fs_information_class)
Expand All @@ -367,8 +367,16 @@ namespace
const emulator_object<FILE_FS_DEVICE_INFORMATION> info_obj{c.emu, fs_information};
info_obj.access([&](FILE_FS_DEVICE_INFORMATION& info)
{
info.DeviceType = FILE_DEVICE_DISK;
info.Characteristics = 0x20020;
if (file_handle == STDOUT_HANDLE.bits)
{
info.DeviceType = FILE_DEVICE_CONSOLE;
info.Characteristics = 0x20000;
}
else
{
info.DeviceType = FILE_DEVICE_DISK;
info.Characteristics = 0x20020;
}
});

return STATUS_SUCCESS;
Expand Down

0 comments on commit e7622e8

Please sign in to comment.