[patch] handle failure of mdio_read

Sjoerd Simons sjoerd at luon.net
Thu May 13 10:48:23 PDT 2004


On Thu, May 13, 2004 at 01:29:33PM -0400, Joe Shaw wrote:
> On Wed, 2004-05-12 at 23:58 +0200, Sjoerd Simons wrote:
> >   In the current failure of mdio_read is not really handled. Attached
> >   patch solves this. As a side effect it solves a segv on startup on the
> >   machine where these failures happen, but i don't understand why :(
> 
> Committed this with a few changes (mostly reporting the error and
> stylistic fixes).  Thanks.
> 
> As for the crash... I'm not sure.  Perhaps it's related to passing in -1
> (although I guess it was guint16 so it'd actually overflow...)

Because of the -1 the calling functions thinks it's 0xffff, so all binary ands
were true. For example hal_device_property_set_bool was called twice in a row
for net.ethernet.link, but i don't know if that could lead to trouble.. 

  Sjoerd
-- 
Factorials were someone's attempt to make math LOOK exciting.

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list