@Ben, sorry about forgetting to mention the libraries, glad you could figure it out.
Thanks for checking. I think the problem is actually the wrong thing is being scanned (type vs handle). Can you give one more run at this one:
#include <smbios_c/smbios.h> #include <glib/gstdio.h>
struct smbios_struct { u8 type; u8 length; u16 handle; };
int main(void) { guint8 dell_supported = 0; struct smbios_struct *de_table;
de_table = smbios_get_next_struct_by_handle (0, 0xDE00); if (!de_table) g_print("invalid table address\n"); else g_print("de_table: %d %d %d\n", de_table->type, de_table->length, de_table->handle); smbios_struct_get_data (de_table, &(dell_supported), 0x00, sizeof(guint8));
if (dell_supported != 0xDE) g_print("not supported, dell supported != de\n"); else g_print("supported\n"); }
@Ben, sorry about forgetting to mention the libraries, glad you could figure it out.
Thanks for checking. I think the problem is actually the wrong thing is being scanned (type vs handle).
Can you give one more run at this one:
#include <smbios_c/smbios.h>
#include <glib/gstdio.h>
struct smbios_struct
{
u8 type;
u8 length;
u16 handle;
};
int main(void)
{
guint8 dell_supported = 0;
struct smbios_struct *de_table;
de_table = smbios_ get_next_ struct_ by_handle (0, 0xDE00);
g_print( "invalid table address\n");
g_print( "de_table: %d %d %d\n", de_table->type, de_table->length, de_table->handle);
smbios_ struct_ get_data (de_table, &(dell_supported), 0x00, sizeof(guint8));
if (!de_table)
else
if (dell_supported != 0xDE)
g_print( "not supported, dell supported != de\n");
g_print( "supported\ n");
else
}