From 602f76e4fc482b328e12c256d033527861aa1717 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 30 Jun 2020 14:16:39 +0100 Subject: [PATCH] arch: x86_64: Use symbolic constant for end of table The other types use a symbolic constant so do the same for consistency. Signed-off-by: Rob Bradford --- arch/src/x86_64/smbios.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/src/x86_64/smbios.rs b/arch/src/x86_64/smbios.rs index 6dc420d27..38c0c5b92 100644 --- a/arch/src/x86_64/smbios.rs +++ b/arch/src/x86_64/smbios.rs @@ -53,6 +53,7 @@ pub type Result = result::Result; const SM3_MAGIC_IDENT: &[u8; 5usize] = b"_SM3_"; const BIOS_INFORMATION: u8 = 0; const SYSTEM_INFORMATION: u8 = 1; +const END_OF_TABLE: u8 = 127; const PCI_SUPPORTED: u64 = 1 << 7; const IS_VIRTUAL_MACHINE: u8 = 1 << 4; @@ -201,7 +202,7 @@ pub fn setup_smbios(mem: &GuestMemoryMmap) -> Result<()> { { handle += 1; let mut smbios_sysinfo = SmbiosSysInfo::default(); - smbios_sysinfo.typ = 127; + smbios_sysinfo.typ = END_OF_TABLE; smbios_sysinfo.length = mem::size_of::() as u8; smbios_sysinfo.handle = handle; curptr = write_and_incr(mem, smbios_sysinfo, curptr)?;