[SeaBIOS] [PATCH v2 1/2] boot: Detect strict boot order (HALT record) in function

Alexey Kirillov posted 2 patches 6 years, 1 month ago
There is a newer version of this series
[SeaBIOS] [PATCH v2 1/2] boot: Detect strict boot order (HALT record) in function
Posted by Alexey Kirillov 6 years, 1 month ago
Introduce is_bootprio_strict().
We will reuse this function in the next commit.

Signed-off-by: Alexey Kirillov <lekiravi@yandex-team.ru>
---
 src/boot.c | 5 +++++
 src/util.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/src/boot.c b/src/boot.c
index ea18194..e9b2cd0 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -295,6 +295,11 @@ find_prio(const char *glob)
     return -1;
 }
 
+u8 is_bootprio_strict()
+{
+    return find_prio("HALT") >= 0;
+}
+
 int bootprio_find_pci_device(struct pci_device *pci)
 {
     if (CONFIG_CSM)
diff --git a/src/util.h b/src/util.h
index b173fa8..566883c 100644
--- a/src/util.h
+++ b/src/util.h
@@ -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();
 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);
-- 
2.17.1
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH v2 1/2] boot: Detect strict boot order (HALT record) in function
Posted by Gerd Hoffmann 6 years, 1 month ago
  Hi,

> +u8 is_bootprio_strict()
> +{
> +    return find_prio("HALT") >= 0;
> +}

./src/boot.c: In function 'is_bootprio_strict':
./src/boot.c:298:4: warning: old-style function definition [-Wold-style-definition]

Please fix.  Otherwise the patches look good to me.

cheers,
  Gerd
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org