[PATCH v4 1/5] ntdll: Return BIOS info from NtQuerySystemInformation on Linux

Huw Davies huw at codeweavers.com
Thu Jun 14 08:52:32 CDT 2018


On Thu, Jun 14, 2018 at 07:26:54AM -0600, Alex Henrie wrote:
> 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.

I thought we had other 'struct SYSTEM_' definitions in there that
aren't in the native SDK.
 
> > 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.

Well it must be useful because you claimed it returned
STATUS_NOT_IMPLEMENTED before I wrote it ;-)  You obviously can't test
the data, but testing the lengths (i.e. the returned length and buffer
length) is also interesting.

In principle the kernel32 tests could compare the data returned from a
call to the ntdll function with the data returned from the kernel32
function.

Huw.



More information about the wine-devel mailing list