[PATCH v4 1/5] ntdll: Return BIOS info from NtQuerySystemInformation on Linux
Alex Henrie
alexhenrie24 at gmail.com
Thu Jun 14 08:26:54 CDT 2018
On Thu, Jun 14, 2018 at 2:07 AM Huw Davies <huw at codeweavers.com> wrote:
>
> On Wed, Jun 13, 2018 at 09:41:15PM -0600, Alex Henrie wrote:
> > Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
> > ---
> > dlls/ntdll/nt.c | 169 ++++++++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 169 insertions(+)
> >
> > diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
> > index dc0ce04f42..72ae381813 100644
> > --- a/dlls/ntdll/nt.c
> > +++ b/dlls/ntdll/nt.c
> > @@ -66,6 +66,50 @@
> >
> > WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
> >
> > +#include "pshpack1.h"
> > +
> > +typedef enum _SYSTEM_FIRMWARE_TABLE_ACTION
> > +{
> > + SystemFirmwareTable_Enumerate = 0,
> > + SystemFirmwareTable_Get = 1
> > +} SYSTEM_FIRMWARE_TABLE_ACTION;
> > +
> > +typedef struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
> > +{
> > + ULONG ProviderSignature;
> > + SYSTEM_FIRMWARE_TABLE_ACTION Action;
> > + ULONG TableID;
> > + ULONG TableBufferLength;
> > + UCHAR TableBuffer[1];
> > +} SYSTEM_FIRMWARE_TABLE_INFORMATION;
>
> These two at least should be in winternl.h
Are you sure? They're not in the native winternl.h.
> It fails to build on macOS
> nt.c:2454:27: error: label at end of compound statement: expected statement
> case RSMB:
>
> I suspect you may want to move the main body of the implementation into
> a helper function, to avoid adding even more bloat to the main switch.
Thanks for catching the Mac OS build error. While I'm fixing that I'll
see what I can do to organize the code better.
> Also, some tests would be nice, both for the ntdll (free feel to just
> tidy up mine) and kernel32 functions.
Your test just checks that
NtQuerySystemInformation(SystemFirmwareTableInformation, ...) returns
STATUS_SUCCESS, which doesn't seem very useful. The returned data
itself is dependent on the BIOS and could be very different on
different computers.
> Note, that these went to wine-patches rather than wine-devel.
Yes, my mistake, old habits die hard...
Thanks for the feedback.
-Alex
More information about the wine-devel
mailing list