grub-devel
[Top][All Lists]
Advanced

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

Re: OLPC regression, ofdisk stops working


From: Robert Millan
Subject: Re: OLPC regression, ofdisk stops working
Date: Fri, 10 Jul 2009 19:41:15 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, Jul 10, 2009 at 10:28:03PM +0800, Bean wrote:
> Hi,
> 
> There is something wrong with r2132, now childtype is a pointer, so
> sizeof childtype == 4, the name would be truncated to 4 characters.

Bean, you never cease to amaze me.  I admit the "interesting, exactly
the word size" idea crossed my head, but I didn't reach any conclussion
out of it :-)

Nice catch.  Will you commit this, or want me to?

> diff --git a/kern/ieee1275/openfw.c b/kern/ieee1275/openfw.c
> index e7979f4..42d9278 100644
> --- a/kern/ieee1275/openfw.c
> +++ b/kern/ieee1275/openfw.c
> @@ -78,15 +78,15 @@ grub_children_iterate (char *devpath,
>        grub_ssize_t actual;
> 
>        if (grub_ieee1275_get_property (child, "device_type", childtype,
> -                                   sizeof childtype, &actual))
> +                                   IEEE1275_MAX_PROP_LEN, &actual))
>       continue;
> 
> -      if (grub_ieee1275_package_to_path (child, childpath, sizeof childpath,
> -                                      &actual))
> +      if (grub_ieee1275_package_to_path (child, childpath,
> +                                      IEEE1275_MAX_PATH_LEN, &actual))
>       continue;
> 
>        if (grub_ieee1275_get_property (child, "name", childname,
> -                                   sizeof childname, &actual))
> +                                   IEEE1275_MAX_PATH_LEN, &actual))
>       continue;
> 
>        grub_sprintf (fullname, "%s/%s", devpath, childname);

-- 
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."




reply via email to

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