All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Jared Rossi <jrossi@linux.ibm.com>,
	Zhuoying Cai <zycai@linux.ibm.com>
Cc: qemu-s390x@nongnu.org,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Eric Farman <farman@linux.ibm.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>
Subject: [PATCH v2 3/5] pc-bios/s390-ccw: Make get_boot_index() from menu.c global
Date: Wed,  9 Jul 2025 10:34:41 +0200	[thread overview]
Message-ID: <20250709083443.41574-4-thuth@redhat.com> (raw)
In-Reply-To: <20250709083443.41574-1-thuth@redhat.com>

From: Thomas Huth <thuth@redhat.com>

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.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 pc-bios/s390-ccw/s390-ccw.h | 1 +
 pc-bios/s390-ccw/menu.c     | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
index 6cdce3e5e5b..b1dc35cdedf 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
 
diff --git a/pc-bios/s390-ccw/menu.c b/pc-bios/s390-ccw/menu.c
index 84062e94af4..eeaff78f870 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)
-- 
2.50.0



  parent reply	other threads:[~2025-07-09  8:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09  8:34 [PATCH v2 0/5] pc-bios/s390-ccw: Add "loadparm" and menu for pxelinux.cfg network booting Thomas Huth
2025-07-09  8:34 ` [PATCH v2 1/5] pc-bios/s390-ccw: Allow to select a different pxelinux.cfg entry via loadparm Thomas Huth
2025-07-09 18:46   ` Jared Rossi
2025-07-09  8:34 ` [PATCH v2 2/5] pc-bios/s390-ccw: Allow up to 31 entries for pxelinux.cfg Thomas Huth
2025-07-09 18:47   ` Jared Rossi
2025-07-09  8:34 ` Thomas Huth [this message]
2025-07-09 18:47   ` [PATCH v2 3/5] pc-bios/s390-ccw: Make get_boot_index() from menu.c global Jared Rossi
2025-07-09  8:34 ` [PATCH v2 4/5] pc-bios/s390-ccw: Add a boot menu for booting via pxelinux.cfg Thomas Huth
2025-07-09 18:48   ` Jared Rossi
2025-07-09  8:34 ` [PATCH v2 5/5] tests/functional: Add a test for s390x pxelinux.cfg network booting Thomas Huth
2025-07-09 18:48   ` Jared Rossi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250709083443.41574-4-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=farman@linux.ibm.com \
    --cc=jrossi@linux.ibm.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=zycai@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.