On Wed Sep 4 22:10:28 2024 +0000, Nikolay Sivov wrote:
Take a look at how it's used for other functions. @nsivov I still don't understand why we need to set last error code if we always return TRUE and we will always have a valid value. Look at the code, it doesn't matter whether `NtQuerySystemInformation` returns an error or not. There will always be a default value of `FirmwareTypeUnknown` or whatever `NtQuerySystemInformation` returns. This is done on purpose so that the code will continue to work as before on systems other than Linux.
``` static inline BOOL set_ntstatus( NTSTATUS status ) { if (status) SetLastError( RtlNtStatusToDosError( status )); return !status; } ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6423#note_81148