From: Michael Olbrich <m.olbrich@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [PATCH 2/2] EFI: handle more boot devices
Date: Tue, 12 Aug 2014 11:37:21 +0200 [thread overview]
Message-ID: <1407836241-17620-2-git-send-email-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <1407836241-17620-1-git-send-email-m.olbrich@pengutronix.de>
efi_get_boot() fails for partitions that are not supported, so errors must
be ignored to find all supported devices.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
I'm not sure about this one. We're not doing anythings with the return
value of efi_get_boot(), so this is just some debug output + memory leak.
Also, 100 is rather arbitrary. Maybe EFI has some limit there as well?
Michael
arch/efi/efi/efi.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/efi/efi/efi.c b/arch/efi/efi/efi.c
index 7de8ec8..ceb4479 100644
--- a/arch/efi/efi/efi.c
+++ b/arch/efi/efi/efi.c
@@ -134,9 +134,10 @@ struct efi_boot *efi_get_boot(int num)
static int misc_init(void)
{
- efi_get_boot(1);
- efi_get_boot(2);
- efi_get_boot(3);
+ int i;
+
+ for (i = 1; i < 100; ++i)
+ efi_get_boot(i);
return 0;
}
--
2.0.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-08-12 9:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 9:37 [PATCH 1/2] EFI: fix error handling in efi_get_boot() Michael Olbrich
2014-08-12 9:37 ` Michael Olbrich [this message]
2014-09-01 9:06 ` [PATCH 2/2] EFI: handle more boot devices Sascha Hauer
2014-09-01 10:02 ` Michael Olbrich
2014-09-01 10:12 ` Sascha Hauer
2014-09-01 9:03 ` [PATCH 1/2] EFI: fix error handling in efi_get_boot() Sascha Hauer
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=1407836241-17620-2-git-send-email-m.olbrich@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox