|
@@ -258,7 +258,11 @@ static int smbios_write_type1(ulong *current, int handle,
|
|
|
fill_smbios_header(t, SMBIOS_SYSTEM_INFORMATION, len, handle);
|
|
|
smbios_set_eos(ctx, t->eos);
|
|
|
t->manufacturer = smbios_add_prop(ctx, "manufacturer");
|
|
|
+ if (!t->manufacturer)
|
|
|
+ t->manufacturer = smbios_add_string(ctx, "Unknown");
|
|
|
t->product_name = smbios_add_prop(ctx, "product");
|
|
|
+ if (!t->product_name)
|
|
|
+ t->product_name = smbios_add_string(ctx, "Unknown Product");
|
|
|
t->version = smbios_add_prop_si(ctx, "version",
|
|
|
SYSINFO_ID_SMBIOS_SYSTEM_VERSION);
|
|
|
if (serial_str) {
|
|
@@ -288,7 +292,11 @@ static int smbios_write_type2(ulong *current, int handle,
|
|
|
fill_smbios_header(t, SMBIOS_BOARD_INFORMATION, len, handle);
|
|
|
smbios_set_eos(ctx, t->eos);
|
|
|
t->manufacturer = smbios_add_prop(ctx, "manufacturer");
|
|
|
+ if (!t->manufacturer)
|
|
|
+ t->manufacturer = smbios_add_string(ctx, "Unknown");
|
|
|
t->product_name = smbios_add_prop(ctx, "product");
|
|
|
+ if (!t->product_name)
|
|
|
+ t->product_name = smbios_add_string(ctx, "Unknown Product");
|
|
|
t->version = smbios_add_prop_si(ctx, "version",
|
|
|
SYSINFO_ID_SMBIOS_BASEBOARD_VERSION);
|
|
|
t->asset_tag_number = smbios_add_prop(ctx, "asset-tag");
|
|
@@ -313,6 +321,8 @@ static int smbios_write_type3(ulong *current, int handle,
|
|
|
fill_smbios_header(t, SMBIOS_SYSTEM_ENCLOSURE, len, handle);
|
|
|
smbios_set_eos(ctx, t->eos);
|
|
|
t->manufacturer = smbios_add_prop(ctx, "manufacturer");
|
|
|
+ if (!t->manufacturer)
|
|
|
+ t->manufacturer = smbios_add_string(ctx, "Unknown");
|
|
|
t->chassis_type = SMBIOS_ENCLOSURE_DESKTOP;
|
|
|
t->bootup_state = SMBIOS_STATE_SAFE;
|
|
|
t->power_supply_state = SMBIOS_STATE_SAFE;
|