From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IeG5H-0007Ll-SR for mharc-grub-devel@gnu.org; Sat, 06 Oct 2007 16:17:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IeG5G-0007LE-8a for grub-devel@gnu.org; Sat, 06 Oct 2007 16:17:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IeG5E-0007KU-QD for grub-devel@gnu.org; Sat, 06 Oct 2007 16:17:09 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IeG5E-0007KR-H4 for grub-devel@gnu.org; Sat, 06 Oct 2007 16:17:08 -0400 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IeG5E-00070r-Br for grub-devel@gnu.org; Sat, 06 Oct 2007 16:17:08 -0400 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1IeG5C-0000Q5-Vf for grub-devel@gnu.org; Sat, 06 Oct 2007 22:17:07 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1IeG4q-0002D9-IK for grub-devel@gnu.org; Sat, 06 Oct 2007 22:16:44 +0200 Date: Sat, 6 Oct 2007 22:16:44 +0200 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20071006201644.GA8454@thorin> References: <20071005095948.GA27825@thorin> <20071005123008.GA3916@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071005123008.GA3916@thorin> Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-Detected-Kernel: Genre and OS details not recognized. Subject: Re: [PATCH] do not require that device is a partition 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: Sat, 06 Oct 2007 20:17:10 -0000 On Fri, Oct 05, 2007 at 02:30:08PM +0200, Robert Millan wrote: > On Fri, Oct 05, 2007 at 11:59:48AM +0200, Robert Millan wrote: > > - else if (! dev->disk || ! dev->disk->has_partitions || dev->disk->partition) > > + else > > Actually, the idea behind this check seems to be that if the device is a > disk, we only want to probe for filesystems if it has no partitions. > > The problem with this is that filesystems in general don't garantee us that > the first 512 bytes aren't filled with information that, to the MBR partition > table parser, is seen as garbage and results in undefined partition layout. > > I think disk->has_partitions as a whole is flawed for this reason. Should we > get rid of it? Thinking again, from GRUB POV we can't really tell wether the partition table or the filesystem is right in this situation, so I would suggest to just not use this in this particular check, but leave has_partitions as is, since it has its purpose. Any comments? -- Robert Millan I know my rights; I want my phone call! What use is a phone call, if you are unable to speak? (as seen on /.)