From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KaHge-0000Ij-BQ for mharc-grub-devel@gnu.org; Mon, 01 Sep 2008 18:15:52 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KaHgb-0000He-W0 for grub-devel@gnu.org; Mon, 01 Sep 2008 18:15:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KaHgY-0000Fr-3v for grub-devel@gnu.org; Mon, 01 Sep 2008 18:15:49 -0400 Received: from [199.232.76.173] (port=33239 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KaHgX-0000Fh-SC for grub-devel@gnu.org; Mon, 01 Sep 2008 18:15:45 -0400 Received: from aybabtu.com ([69.60.117.155]:58817) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KaHgU-0005TR-N8 for grub-devel@gnu.org; Mon, 01 Sep 2008 18:15:44 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1KaHWI-0003d1-Q6 for grub-devel@gnu.org; Tue, 02 Sep 2008 00:05:11 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1KaHev-00034a-E1 for grub-devel@gnu.org; Tue, 02 Sep 2008 00:14:05 +0200 Date: Tue, 2 Sep 2008 00:14:05 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080901221405.GA11511@thorin> References: <20080808202337.3440.57502.reportbug@sylvester.jejik.com.jejik.com> <1218277583.9301.6.camel@fz.local> <489EEAC5.4080209@jejik.com> <1218471512.6939.19.camel@fz.local> <1218735245.8950.10.camel@fz.local> <20080814180353.GC5614@thorin> <1218742324.10393.8.camel@fz.local> <20080814203856.GA23307@thorin> <1218748505.10393.13.camel@fz.local> <1219071926.4569.57.camel@fz.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1219071926.4569.57.camel@fz.local> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name 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: Mon, 01 Sep 2008 22:15:50 -0000 On Mon, Aug 18, 2008 at 05:05:26PM +0200, Felix Zielcke wrote: > + unsigned char i, j, k, l; I think using unsigned chars to store "integers" is counter-intuitive, and in some cases possibly dangerous (overflow). > + grub_dev = xmalloc (strlen (os_dev) - strlen ("/dev/mapper/") + 1); > + > + j = sizeof ("/dev/mapper/") -1; ^ Missing space here :-) > + for (i = 0, k = 0; i < l; i++) > + { > + grub_dev[k] = os_dev[j + i]; > + k++; i already counts from 0 and increments by-one. Can it be used instead of k? The rest of the code I mostly don't understand well. If you feel confident that it's right, I suggest you check it in unless someone else also wants to review it. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."