Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HvIrE-0002ZX-4Y for mharc-grub-devel@gnu.org; Mon, 04 Jun 2007 16:08:52 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HvIrC-0002Wh-Us for grub-devel@gnu.org; Mon, 04 Jun 2007 16:08:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HvIrC-0002VD-96 for grub-devel@gnu.org; Mon, 04 Jun 2007 16:08:50 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HvIrC-0002UU-33 for grub-devel@gnu.org; Mon, 04 Jun 2007 16:08:50 -0400 Received: from neonescio.viaisn.org ([82.94.249.43]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HvIrB-00079B-FJ for grub-devel@gnu.org; Mon, 04 Jun 2007 16:08:49 -0400 Received: from dijkstra.dekkers.cx ([2001:960:7a0:0:213:d4ff:fe9c:2487] ident=Debian-exim) by neonescio.viaisn.org with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32 CV=0) (Exim 4.63 #1) id 1HvIr9-0000zL-Pa for grub-devel@gnu.org; Mon, 04 Jun 2007 22:08:47 +0200 Received: from localhost ([127.0.0.1] helo=dijkstra.dekkers.cx ident=jeroen) by dijkstra.dekkers.cx with esmtp (Exim 4.63) (envelope-from ) id 1HvIr7-0002tg-Sj for grub-devel@gnu.org; Mon, 04 Jun 2007 22:08:45 +0200 Date: Mon, 04 Jun 2007 22:08:45 +0200 Message-ID: <87bqfvqy7m.wl@dekkers.cx> From: Jeroen Dekkers To: The development of GRUB 2 In-Reply-To: <20070604190311.GA21373@aragorn> References: <20070604190021.GA21341@aragorn> <20070604190311.GA21373@aragorn> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.0.95 (x86_64-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-detected-kernel: Linux 2.6 (newer, 3) Subject: Re: a pair of things I found when debugging.. 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, 04 Jun 2007 20:08:51 -0000 At Mon, 4 Jun 2007 21:03:11 +0200, Robert Millan wrote: > > On Mon, Jun 04, 2007 at 09:00:21PM +0200, Robert Millan wrote: > > - struct grub_pc_partition *pcdata = 0; > > + struct grub_pc_partition *pcdata = NULL; > > > >[...] > > > > - char *drive_name = 0; > > + char *drive_name = NULL; > > I generaly find that NULL makes it clearer for pointers, do you have a > preference for 0 on these? I agree. > > @@ -816,8 +816,7 @@ > > if (dos_part < 0) > > { > > grub_disk_close (disk); > > - grub_error (GRUB_ERR_BAD_DEVICE, > > - "cannot find the partition of `%s'", os_dev); > > + grub_util_error ("cannot find the partition of `%s'", os_dev); > > return 0; > > Not sure what I'm missing, but these grub_error calls seem to be pretty > useless. This one in particular was the culprit to one of the powerpc > problems I just fixed, and I had to replace it with grub_util_error() to find > out. Yes, as I already wrote in relation to the RAID thing, handling of errors and warnings need some care. Jeroen Dekkers