From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GNw87-0007Al-KL for mharc-grub-devel@gnu.org; Thu, 14 Sep 2006 14:40:07 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GNw85-00078x-FX for grub-devel@gnu.org; Thu, 14 Sep 2006 14:40:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GNw82-00077a-Rw for grub-devel@gnu.org; Thu, 14 Sep 2006 14:40:04 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNw82-00077N-GG for grub-devel@gnu.org; Thu, 14 Sep 2006 14:40:02 -0400 Received: from [194.109.24.34] (helo=smtp-vbr14.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GNwA2-0004BD-61 for grub-devel@gnu.org; Thu, 14 Sep 2006 14:42:06 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr14.xs4all.nl (8.13.6/8.13.6) with ESMTP id k8EIe0kM041953 for ; Thu, 14 Sep 2006 20:40:01 +0200 (CEST) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <20060914183031.GA20618@khazad.dyndns.org> Mail-Copies-To: mgerards@xs4all.nl Date: Thu, 14 Sep 2006 20:47:18 +0200 In-Reply-To: <20060914183031.GA20618@khazad.dyndns.org> (Robert Millan's message of "Thu, 14 Sep 2006 20:30:31 +0200") Message-ID: <874pvathe1.fsf@xs4all.nl> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner 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:40:05 -0000 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. > - 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? -- Marco