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 2/5] pc-bios/s390-ccw: Allow up to 31 entries for pxelinux.cfg
Date: Wed, 9 Jul 2025 10:34:40 +0200 [thread overview]
Message-ID: <20250709083443.41574-3-thuth@redhat.com> (raw)
In-Reply-To: <20250709083443.41574-1-thuth@redhat.com>
From: Thomas Huth <thuth@redhat.com>
We're going to support a menu for the pxelinux.cfg code, and to be able
to reuse some functionality from menu.c, we should align the maximum
amount of possible entries with the MAX_BOOT_ENTRIES constant that is
used there. Thus replace MAX_PXELINUX_ENTRIES with MAX_BOOT_ENTRIES.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
pc-bios/s390-ccw/netmain.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/pc-bios/s390-ccw/netmain.c b/pc-bios/s390-ccw/netmain.c
index c0aafca22d2..6f64323cd84 100644
--- a/pc-bios/s390-ccw/netmain.c
+++ b/pc-bios/s390-ccw/netmain.c
@@ -353,17 +353,15 @@ static int net_select_and_load_kernel(filename_ip_t *fn_ip,
return load_kernel_with_initrd(fn_ip, &entries[selected]);
}
-#define MAX_PXELINUX_ENTRIES 16
-
static int net_try_pxelinux_cfg(filename_ip_t *fn_ip)
{
- struct pl_cfg_entry entries[MAX_PXELINUX_ENTRIES];
+ struct pl_cfg_entry entries[MAX_BOOT_ENTRIES];
int num_ent, def_ent = 0;
num_ent = pxelinux_load_parse_cfg(fn_ip, mac, get_uuid(),
DEFAULT_TFTP_RETRIES,
cfgbuf, sizeof(cfgbuf),
- entries, MAX_PXELINUX_ENTRIES, &def_ent);
+ entries, MAX_BOOT_ENTRIES, &def_ent);
return net_select_and_load_kernel(fn_ip, num_ent, def_ent, entries);
}
@@ -446,11 +444,11 @@ static int net_try_direct_tftp_load(filename_ip_t *fn_ip)
* a magic comment string.
*/
if (!strncasecmp("# pxelinux", cfgbuf, 10)) {
- struct pl_cfg_entry entries[MAX_PXELINUX_ENTRIES];
+ struct pl_cfg_entry entries[MAX_BOOT_ENTRIES];
int num_ent, def_ent = 0;
num_ent = pxelinux_parse_cfg(cfgbuf, sizeof(cfgbuf), entries,
- MAX_PXELINUX_ENTRIES, &def_ent);
+ MAX_BOOT_ENTRIES, &def_ent);
return net_select_and_load_kernel(fn_ip, num_ent, def_ent,
entries);
}
--
2.50.0
next prev 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 ` Thomas Huth [this message]
2025-07-09 18:47 ` [PATCH v2 2/5] pc-bios/s390-ccw: Allow up to 31 entries for pxelinux.cfg Jared Rossi
2025-07-09 8:34 ` [PATCH v2 3/5] pc-bios/s390-ccw: Make get_boot_index() from menu.c global Thomas Huth
2025-07-09 18:47 ` 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-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).