Build the raw bytes of a `BootOrder` UEFI variable from a sequence of boot option numbers — each entry is a little-endian `u16` referring to a `Boot####` variable.
(entries: &[u16])
| 15 | /// option numbers — each entry is a little-endian `u16` referring to a |
| 16 | /// `Boot####` variable. |
| 17 | pub fn boot_order_bytes(entries: &[u16]) -> Vec<u8> { |
| 18 | let mut out = Vec::with_capacity(entries.len() * 2); |
| 19 | for &entry in entries { |
| 20 | out.extend_from_slice(&entry.to_le_bytes()); |
| 21 | } |
| 22 | out |
| 23 | } |
| 24 | |
| 25 | /// An `EFI_DEVICE_PATH_PROTOCOL` node. |
| 26 | #[derive(Clone, Copy)] |