summaryrefslogtreecommitdiffstats
path: root/src/interface/smbios
diff options
context:
space:
mode:
authorDale Hamel2014-03-10 23:48:37 +0100
committerMichael Brown2014-06-12 18:59:52 +0200
commit7fe0735170929bcdc8364d4d5529fbb171b1aa79 (patch)
treee20621c4588f97a7cab3f45c370ac2867afd230f /src/interface/smbios
parent[igbvf] Allow changing of MAC address (diff)
downloadipxe-7fe0735170929bcdc8364d4d5529fbb171b1aa79.tar.gz
ipxe-7fe0735170929bcdc8364d4d5529fbb171b1aa79.tar.xz
ipxe-7fe0735170929bcdc8364d4d5529fbb171b1aa79.zip
[smbios] Expose board serial number as ${board-serial}
With blade servers, the chassis serial number (exposed via ${serial}) may not be unique. Expose ${board-serial} as a named setting to provide easy access to a more meaningful serial number. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/smbios')
-rw-r--r--src/interface/smbios/smbios_settings.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/interface/smbios/smbios_settings.c b/src/interface/smbios/smbios_settings.c
index 5dcf0020..83e4320e 100644
--- a/src/interface/smbios/smbios_settings.c
+++ b/src/interface/smbios/smbios_settings.c
@@ -241,3 +241,15 @@ const struct setting asset_setting __setting ( SETTING_HOST_EXTRA, asset ) = {
.type = &setting_type_string,
.scope = &smbios_settings_scope,
};
+
+/** Board serial number setting (may differ from chassis serial number) */
+const struct setting board_serial_setting __setting ( SETTING_HOST_EXTRA,
+ board_serial ) = {
+ .name = "board-serial",
+ .description = "Base board serial",
+ .tag = SMBIOS_STRING_TAG ( SMBIOS_TYPE_BASE_BOARD_INFORMATION,
+ struct smbios_base_board_information,
+ serial ),
+ .type = &setting_type_string,
+ .scope = &smbios_settings_scope,
+};