[Settings] Expose SMBIOS via settings API

In particular, expose the system UUID as a setting ("smbios/uuid").
This commit is contained in:
Michael Brown
2008-03-28 15:35:06 +00:00
parent aa74a7d53c
commit feade5da6e
9 changed files with 330 additions and 139 deletions

View File

@@ -214,7 +214,7 @@ static int dhcpset_store ( struct settings *settings, struct setting *setting,
}
/**
* Fetch value of setting
* Fetch value of DHCP setting
*
* @v settings Settings block, or NULL to search all blocks
* @v setting Setting to fetch
@@ -517,7 +517,8 @@ int dhcp_create_request ( struct dhcp_packet *dhcppkt,
/* Add client UUID, if we have one. Required for PXE. */
client_uuid.type = DHCP_CLIENT_UUID_TYPE;
if ( ( rc = get_uuid ( &client_uuid.uuid ) ) == 0 ) {
if ( ( rc = fetch_uuid_setting ( NULL, &uuid_setting,
&client_uuid.uuid ) ) >= 0 ) {
if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_CLIENT_UUID,
&client_uuid,
sizeof ( client_uuid ) ) ) != 0 ) {