From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KQK7F-0007dU-4K for mharc-grub-devel@gnu.org; Tue, 05 Aug 2008 06:50:09 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQK78-0007Uz-Om for grub-devel@gnu.org; Tue, 05 Aug 2008 06:50:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQK6y-0007K9-Lg for grub-devel@gnu.org; Tue, 05 Aug 2008 06:49:58 -0400 Received: from [199.232.76.173] (port=43556 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQK6y-0007Jt-AI for grub-devel@gnu.org; Tue, 05 Aug 2008 06:49:52 -0400 Received: from qb-out-1314.google.com ([72.14.204.169]:33512) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQK6x-0002de-Vm for grub-devel@gnu.org; Tue, 05 Aug 2008 06:49:52 -0400 Received: by qb-out-1314.google.com with SMTP id d2so2785834qbc.30 for ; Tue, 05 Aug 2008 03:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer; bh=ZmPQOruxjxGpmdfCofQvj72fYgwKGzrnU8efke7uQNc=; b=LXhf61GMlVlvfGAb1dq06AHkCM/1WyN1IdHrfSavuxFPE9ZicA9GfKk3RWtEEYJ1cj DdKThXM039OkqqAkQW6N87rebHY+MIqK9b3hc0ilLLqTcNzJD786OnEBjvDqZn2zu4GT IQ5btNfUdMP3h38APBln7A4+n1L3OkiFw+SBI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer; b=MzveupAWAJdFkTSLY2jW5HGT9/7IU3i+diAHW9GPvI1dKzl/nP0Mxm5ayHbhVQAfhS huy2Lnc7VedU3fVLH+Xs53Vl2k435EU7NXivHWOAbBmAJcdAbXykkyCgMuZcw5ySXvov KF401aonGt9cRB8g2wD/gjIXcC23jZDJQX+P8= Received: by 10.86.31.19 with SMTP id e19mr4657165fge.45.1217933388406; Tue, 05 Aug 2008 03:49:48 -0700 (PDT) Received: from ?85.180.54.43? ( [85.180.54.43]) by mx.google.com with ESMTPS id 4sm7795216fge.5.2008.08.05.03.49.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 05 Aug 2008 03:49:47 -0700 (PDT) From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <87k5evhimz.fsf@xs4all.nl> References: <1217459965.26275.14.camel@fz-deb.local> <877ib1hvce.fsf@xs4all.nl> <20080801130222.GA12405@thorin> <87k5evhimz.fsf@xs4all.nl> Content-Type: multipart/mixed; boundary="=-RBIZm93um4GGypXCihNs" Date: Tue, 05 Aug 2008 12:49:53 +0200 Message-Id: <1217933393.7116.1.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [PATCH] skip over invalid BSD partitions X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2008 10:50:05 -0000 --=-RBIZm93um4GGypXCihNs Content-Type: text/plain Content-Transfer-Encoding: 7bit Am Dienstag, den 05.08.2008, 12:16 +0200 schrieb Marco Gerards: > Robert Millan writes: > > > > How about using grub_dprintf instead? > > Agreed. > Attached. I hope I get soon used to your changelog :) 2008-08-05 Felix Zielcke * 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. --=-RBIZm93um4GGypXCihNs Content-Disposition: attachment; filename=skip_invalid_bsd_parts.diff Content-Type: text/x-patch; name=skip_invalid_bsd_parts.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit 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++) --=-RBIZm93um4GGypXCihNs--