grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a pair of things I found when debugging..


From: Jeroen Dekkers
Subject: Re: a pair of things I found when debugging..
Date: Mon, 04 Jun 2007 22:08:45 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shij┼Ź) APEL/10.7 Emacs/22.0.95 (x86_64-pc-linux-gnu) MULE/5.0 (SAKAKI)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]