aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2025-07-09 10:34:41 +0200
committerThomas Huth <thuth@redhat.com>2025-07-11 10:04:29 +0200
commit47d68f7475feb86c9347f7013066b3b05b545cfc (patch)
tree384dffc486b89ae264d65b31d81d23a583e37936
parent108977796fbb765c7bcf040500ae9711cb2fa596 (diff)
downloadqemu-47d68f7475feb86c9347f7013066b3b05b545cfc.zip
qemu-47d68f7475feb86c9347f7013066b3b05b545cfc.tar.gz
qemu-47d68f7475feb86c9347f7013066b3b05b545cfc.tar.bz2
pc-bios/s390-ccw: Make get_boot_index() from menu.c global
We are going to reuse this function for selecting an entry from the pxelinux.cfg menu, so rename this function with a "menu_" prefix and make it available globally. Reviewed-by: Jared Rossi <jrossi@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250709083443.41574-4-thuth@redhat.com>
-rw-r--r--pc-bios/s390-ccw/menu.c6
-rw-r--r--pc-bios/s390-ccw/s390-ccw.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/pc-bios/s390-ccw/menu.c b/pc-bios/s390-ccw/menu.c
index 84062e9..eeaff78 100644
--- a/pc-bios/s390-ccw/menu.c
+++ b/pc-bios/s390-ccw/menu.c
@@ -159,7 +159,7 @@ static void boot_menu_prompt(bool retry)
}
}
-static int get_boot_index(bool *valid_entries)
+int menu_get_boot_index(bool *valid_entries)
{
int boot_index;
bool retry = false;
@@ -224,7 +224,7 @@ int menu_get_zipl_boot_index(const char *menu_data)
}
printf("\n");
- return get_boot_index(valid_entries);
+ return menu_get_boot_index(valid_entries);
}
int menu_get_enum_boot_index(bool *valid_entries)
@@ -247,7 +247,7 @@ int menu_get_enum_boot_index(bool *valid_entries)
}
printf("\n");
- return get_boot_index(valid_entries);
+ return menu_get_boot_index(valid_entries);
}
void menu_set_parms(uint8_t boot_menu_flag, uint32_t boot_menu_timeout)
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
index 6cdce3e..b1dc35c 100644
--- a/pc-bios/s390-ccw/s390-ccw.h
+++ b/pc-bios/s390-ccw/s390-ccw.h
@@ -87,6 +87,7 @@ int menu_get_zipl_boot_index(const char *menu_data);
bool menu_is_enabled_zipl(void);
int menu_get_enum_boot_index(bool *valid_entries);
bool menu_is_enabled_enum(void);
+int menu_get_boot_index(bool *valid_entries);
#define MAX_BOOT_ENTRIES 31