Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KQKrq-0007ml-N8 for mharc-grub-devel@gnu.org; Tue, 05 Aug 2008 07:38:18 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQKrn-0007k4-Tp for grub-devel@gnu.org; Tue, 05 Aug 2008 07:38:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQKrn-0007iw-0g for grub-devel@gnu.org; Tue, 05 Aug 2008 07:38:15 -0400 Received: from [199.232.76.173] (port=55589 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQKrm-0007ib-M0 for grub-devel@gnu.org; Tue, 05 Aug 2008 07:38:14 -0400 Received: from qb-out-1314.google.com ([72.14.204.168]:40698) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQKrm-00047W-8L for grub-devel@gnu.org; Tue, 05 Aug 2008 07:38:14 -0400 Received: by qb-out-1314.google.com with SMTP id d2so2807588qbc.30 for ; Tue, 05 Aug 2008 04:38:13 -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=VlcZsgY4SfBrbhrt7nA4EjkWHqhtsJZt2MKsXXGiPS0=; b=FRWMUXhxZ6uqRdbk8N8F/KIYFl1hhe3LqZgsIvW/JOCtrc36B9Xkf+KNwR2gtpjYa5 IumC/3DEyZZd/U3A8XKaZ4oV0cREsWUqwOlrhAL4TFGzrHOC9qIq5jVXRcLw9Wr+vH2L QA2PEBuAwVDA4Wjb9MqM0P2mnTePH5x+UaymY= 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=qiRlrdc6zck+DveuMpN9VXuskjmZzcuFD+kg7fiF7Q8G9MGAOutSJfn2Pwi4sFDmEl 7GSzcXTeeKsqNrtGRqwUjtaFR133y6jHdq1lxZeaSJefD6mzUwRJzy8PMpKDhxIF/C/E cp4yI9f1hF2kG5FU3L3ioTzayt5JMhMQojUow= Received: by 10.86.98.10 with SMTP id v10mr11521590fgb.46.1217936293127; Tue, 05 Aug 2008 04:38:13 -0700 (PDT) Received: from ?85.180.54.43? ( [85.180.54.43]) by mx.google.com with ESMTPS id d4sm2034186fga.8.2008.08.05.04.38.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 05 Aug 2008 04:38:12 -0700 (PDT) From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <1217933393.7116.1.camel@fz.local> References: <1217459965.26275.14.camel@fz-deb.local> <877ib1hvce.fsf@xs4all.nl> <20080801130222.GA12405@thorin> <87k5evhimz.fsf@xs4all.nl> <1217933393.7116.1.camel@fz.local> Content-Type: multipart/mixed; boundary="=-WLos+ABMUA6jDfHP0TWw" Date: Tue, 05 Aug 2008 13:38:18 +0200 Message-Id: <1217936298.14245.0.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 11:38:16 -0000 --=-WLos+ABMUA6jDfHP0TWw Content-Type: text/plain Content-Transfer-Encoding: 7bit Am Dienstag, den 05.08.2008, 12:49 +0200 schrieb Felix Zielcke: > Am Dienstag, den 05.08.2008, 12:16 +0200 schrieb Marco Gerards: > > Robert Millan writes: > > > > > > > How about using grub_dprintf instead? > > > > Agreed. > > > > Attached. I forgot 2 little spaces ;) > 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. --=-WLos+ABMUA6jDfHP0TWw 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++) --=-WLos+ABMUA6jDfHP0TWw--