ntdll: Factor out get_smbios_from_iokit().

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Brendan Shanks 2021-09-17 15:57:07 -07:00 committed by Alexandre Julliard
parent 2868881c63
commit fb675cefbd
1 changed files with 67 additions and 59 deletions

View File

@ -1634,12 +1634,8 @@ static NTSTATUS get_firmware_info( SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULON
#elif defined(__APPLE__)
static NTSTATUS get_firmware_info( SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULONG available_len,
static NTSTATUS get_smbios_from_iokit( SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULONG available_len,
ULONG *required_len )
{
switch (sfti->ProviderSignature)
{
case RSMB:
{
io_service_t service;
CFDataRef data;
@ -1701,6 +1697,18 @@ static NTSTATUS get_firmware_info( SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULON
IOObjectRelease(service);
return STATUS_SUCCESS;
}
static NTSTATUS get_firmware_info( SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULONG available_len,
ULONG *required_len )
{
switch (sfti->ProviderSignature)
{
case RSMB:
{
NTSTATUS ret;
ret = get_smbios_from_iokit(sfti, available_len, required_len);
return ret;
}
default:
FIXME("info_class SYSTEM_FIRMWARE_TABLE_INFORMATION provider %08x\n", sfti->ProviderSignature);
return STATUS_NOT_IMPLEMENTED;