]> xenbits.xensource.com Git - seabios.git/commitdiff
boot: Detect strict boot order (HALT record) in function
authorAlexey Kirillov <lekiravi@yandex-team.ru>
Tue, 7 Jan 2020 17:19:16 +0000 (20:19 +0300)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 14 Jan 2020 08:12:45 +0000 (09:12 +0100)
Introduce is_bootprio_strict().
We will reuse this function in the next commit.

Signed-off-by: Alexey Kirillov <lekiravi@yandex-team.ru>
Message-id: 20200107171917.7535-2-lekiravi@yandex-team.ru
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
src/boot.c
src/util.h

index ea18194df75335430e56359aaa00615b282b5df5..5182ab426b9f8641b402b113b5f0fcf12df446af 100644 (file)
@@ -295,6 +295,11 @@ find_prio(const char *glob)
     return -1;
 }
 
+u8 is_bootprio_strict(void)
+{
+    return find_prio("HALT") >= 0;
+}
+
 int bootprio_find_pci_device(struct pci_device *pci)
 {
     if (CONFIG_CSM)
index b173fa8898c719b9c558bd512921ed5b6a9a6ea2..d96db788d1b8fb207d3ab411addf4bb990940918 100644 (file)
@@ -27,6 +27,7 @@ void boot_add_cd(struct drive_s *drive_g, const char *desc, int prio);
 void boot_add_cbfs(void *data, const char *desc, int prio);
 void interactive_bootmenu(void);
 void bcv_prepboot(void);
+u8 is_bootprio_strict(void);
 struct pci_device;
 int bootprio_find_pci_device(struct pci_device *pci);
 int bootprio_find_scsi_device(struct pci_device *pci, int target, int lun);