]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
pc-bios/s390-ccw: Make get_boot_index() from menu.c global
authorThomas Huth <thuth@redhat.com>
Wed, 9 Jul 2025 08:34:41 +0000 (10:34 +0200)
committerThomas Huth <thuth@redhat.com>
Fri, 11 Jul 2025 08:04:29 +0000 (10:04 +0200)
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>

pc-bios/s390-ccw/menu.c
pc-bios/s390-ccw/s390-ccw.h

index 84062e94af43ced1e82f827c001a96bcae53488a..eeaff78f8703e7466d801ca424bf7db661827507 100644 (file)
@@ -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)
index 6cdce3e5e5b1145d4e45e240ea976a5278132e64..b1dc35cdedf32780518d9cf8d1147171da8976d2 100644 (file)
@@ -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