From: Trammell Hudson <hudson@trmm.net>
To: xen-devel@lists.xenproject.org
Cc: roger.pau@citrix.com, jbeulich@suse.com,
andrew.cooper3@citrix.com, wl@xen.org
Subject: [PATCH v8 2/5] efi/boot.c: add handle_file_info()
Date: Wed, 30 Sep 2020 08:00:08 -0400 [thread overview]
Message-ID: <20200930120011.1622924-3-hudson@trmm.net> (raw)
In-Reply-To: <20200930120011.1622924-1-hudson@trmm.net>
Add a separate function to display the address ranges used by
the files and call `efi_arch_handle_module()` on the modules.
Signed-off-by: Trammell Hudson <hudson@trmm.net>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
xen/common/efi/boot.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index c2ce0c7294..93cfeba7e1 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -540,6 +540,22 @@ static char * __init split_string(char *s)
return NULL;
}
+static void __init handle_file_info(CHAR16 *name,
+ const struct file *file, const char *options)
+{
+ if ( file == &cfg )
+ return;
+
+ PrintStr(name);
+ PrintStr(L": ");
+ DisplayUint(file->addr, 2 * sizeof(file->addr));
+ PrintStr(L"-");
+ DisplayUint(file->addr + file->size, 2 * sizeof(file->addr));
+ PrintStr(newline);
+
+ efi_arch_handle_module(file, name, options);
+}
+
static bool __init read_file(EFI_FILE_HANDLE dir_handle, CHAR16 *name,
struct file *file, const char *options)
{
@@ -584,16 +600,7 @@ static bool __init read_file(EFI_FILE_HANDLE dir_handle, CHAR16 *name,
{
file->need_to_free = true;
file->size = size;
- if ( file != &cfg )
- {
- PrintStr(name);
- PrintStr(L": ");
- DisplayUint(file->addr, 2 * sizeof(file->addr));
- PrintStr(L"-");
- DisplayUint(file->addr + size, 2 * sizeof(file->addr));
- PrintStr(newline);
- efi_arch_handle_module(file, name, options);
- }
+ handle_file_info(name, file, options);
ret = FileHandle->Read(FileHandle, &file->size, file->str);
if ( !EFI_ERROR(ret) && file->size != size )
--
2.25.1
next prev parent reply other threads:[~2020-09-30 12:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 12:00 [PATCH v8 0/5] efi: Unified Xen hypervisor/kernel/initrd images Trammell Hudson
2020-09-30 12:00 ` [PATCH v8 1/5] efi/boot.c: add file.need_to_free Trammell Hudson
2020-10-02 8:15 ` Jan Beulich
2020-09-30 12:00 ` Trammell Hudson [this message]
2020-09-30 12:00 ` [PATCH v8 3/5] efi/boot.c: wrap PrintStr/PrintErr to allow const CHAR16* arguments Trammell Hudson
2020-09-30 12:15 ` Jan Beulich
2020-09-30 12:33 ` Trammell Hudson
2020-09-30 12:00 ` [PATCH v8 4/5] efi: Enable booting unified hypervisor/kernel/initrd images Trammell Hudson
2020-10-02 8:27 ` Jan Beulich
2020-10-02 10:52 ` Trammell Hudson
2020-09-30 12:00 ` [PATCH v8 5/5] efi: Do not use command line if unified config is included Trammell Hudson
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=20200930120011.1622924-3-hudson@trmm.net \
--to=hudson@trmm.net \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/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.