From: Felix Zielcke <fzielcke87@googlemail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] skip over invalid BSD partitions
Date: Tue, 05 Aug 2008 12:49:53 +0200 [thread overview]
Message-ID: <1217933393.7116.1.camel@fz.local> (raw)
In-Reply-To: <87k5evhimz.fsf@xs4all.nl>
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
Am Dienstag, den 05.08.2008, 12:16 +0200 schrieb Marco Gerards:
> Robert Millan <rmh@aybabtu.com> writes:
> >
> > How about using grub_dprintf instead?
>
> Agreed.
>
Attached.
I hope I get soon used to your changelog :)
2008-08-05 Felix Zielcke <fzielcke@z-51.de>
* partmap/pc.c (pc_partition_map_iterate): Do not abort on an invalid BSD
magic or if there's no space left, use grub_dprintf to issue a warning.
[-- Attachment #2: skip_invalid_bsd_parts.diff --]
[-- Type: text/x-patch, Size: 1134 bytes --]
Index: partmap/pc.c
===================================================================
--- partmap/pc.c (Revision 1770)
+++ partmap/pc.c (Arbeitskopie)
@@ -160,9 +160,10 @@
{
/* Check if the BSD label is within the DOS partition. */
if (p.len <= GRUB_PC_PARTITION_BSD_LABEL_SECTOR)
- return grub_error (GRUB_ERR_BAD_PART_TABLE,
- "no space for disk label");
-
+ {
+ grub_dprintf ("partition","no space for disk label\n");
+ continue;
+ }
/* Read the BSD label. */
if (grub_disk_read (&raw,
(p.start
@@ -175,10 +176,12 @@
/* Check if it is valid. */
if (label.magic
!= grub_cpu_to_le32 (GRUB_PC_PARTITION_BSD_LABEL_MAGIC))
- return grub_error (GRUB_ERR_BAD_PART_TABLE,
- "invalid disk label magic 0x%x",
- label.magic);
-
+ {
+ grub_dprintf ("partition",
+ "invalid disk label magic 0x%x on partition %d\n"
+ label.magic,p.index);
+ continue;
+ }
for (pcdata.bsd_part = 0;
pcdata.bsd_part < grub_cpu_to_le16 (label.num_partitions);
pcdata.bsd_part++)
next prev parent reply other threads:[~2008-08-05 10:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 23:19 [PATCH] skip over invalid BSD partitions Felix Zielcke
2008-08-01 10:40 ` Marco Gerards
2008-08-01 10:48 ` Felix Zielcke
2008-08-01 13:02 ` Robert Millan
2008-08-05 10:16 ` Marco Gerards
2008-08-05 10:49 ` Felix Zielcke [this message]
2008-08-05 11:38 ` Felix Zielcke
2008-08-05 13:10 ` Marco Gerards
2008-08-05 13:15 ` Felix Zielcke
2008-08-05 13:19 ` Felix Zielcke
2008-08-05 15:41 ` Marco Gerards
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=1217933393.7116.1.camel@fz.local \
--to=fzielcke87@googlemail.com \
--cc=grub-devel@gnu.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.