[PATCH] remove usage of g_assert() in blockdev
David Zeuthen
david at fubar.dk
Mon Nov 13 10:14:56 PST 2006
Danny Kukawka wrote:
> Hi,
>
> this patch removes the only one g_assert() within the complete daemon from
> blockdev.c. I replaced this with code to check also the tdl instead of only
> gdl and go to the (already existing) error case if HAL don't get the device
> searching for and simply print a error mesage and don't add the device to the
> device tree.
>
> Without the fix HAL 'die' without any message sometimes on boot.
>
> IMO the usage of g_assert() is not needed in this case. If HAL can't find the
> device, there is no need to exit, at least not within the blockdev code.
Hmm, actually I think the use of the assert may be justified... but I
can see this causing problems maybe if uevents are happening during the
startup.. So I'd say OK to commit if you also use HAL_WARNING just
before the 'goto error'.
Can you describe a bit more the circumstances when this bug happens?
E.g. what system, are uevents being triggered etc. etc. Thanks.
David
More information about the hal
mailing list