Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GNwNm-000092-VI for mharc-grub-devel@gnu.org; Thu, 14 Sep 2006 14:56:18 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GNwNk-00005n-Me for grub-devel@gnu.org; Thu, 14 Sep 2006 14:56:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GNwNj-0008Ve-2N for grub-devel@gnu.org; Thu, 14 Sep 2006 14:56:16 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNwNi-0008VP-M7 for grub-devel@gnu.org; Thu, 14 Sep 2006 14:56:14 -0400 Received: from [69.60.117.155] (helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GNwPi-0005Ud-IM for grub-devel@gnu.org; Thu, 14 Sep 2006 14:58:18 -0400 Received: from 138.red-62-57-141.user.auna.net ([62.57.141.138] helo=khazad.dyndns.org) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.63) (envelope-from ) id 1GNwNY-0006Tf-4F for grub-devel@gnu.org; Thu, 14 Sep 2006 20:56:04 +0200 Received: from rmh by khazad.dyndns.org with local (Exim 4.63) (envelope-from ) id 1GNwP5-0005V0-SY for grub-devel@gnu.org; Thu, 14 Sep 2006 20:57:39 +0200 Date: Thu, 14 Sep 2006 20:57:39 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20060914185739.GC20987@khazad.dyndns.org> References: <20060914183031.GA20618@khazad.dyndns.org> <874pvathe1.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874pvathe1.fsf@xs4all.nl> Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Re: [PATCH] avoid recursing into dotdirs 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: Thu, 14 Sep 2006 18:56:17 -0000 On Thu, Sep 14, 2006 at 08:47:18PM +0200, Marco Gerards wrote: > Robert Millan writes: > > > grub-probefs used to recurse into /dev/.static, then come up with > > /dev/.static/dev/hda as my root disk, which later fails to pass the > > pathname-based checks that expect things like /dev/[hsf]d[0-9]. > > > > 2006-09-14 Robert Millan > > > > * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static"). > > There is a double space before "Don't", it should be a single space. Ok. > > - if (S_ISDIR (st.st_mode)) > > + if (S_ISDIR (st.st_mode) && ent->d_name[0] != '.') > > { > > - /* Find it recursively. */ > > + /* Find it recursively, but avoid dotdirs (like ".static") since they > > + could contain duplicates, which would later break the pathname-based > > + check */ > > This looks fine, but funny. I assume you are using tabs where there > should be spaces. Can you please check that before committing? Yep, I had it wrong. Fixed now. -- Robert Millan My spam trap is honeypot@aybabtu.com. Note: this address is only intended for spam harvesters. Writing to it will get you added to my black list.