[PATCH] remove usage of g_assert() in blockdev

Andrey Borzenkov arvidjaar at mail.ru
Mon Nov 13 10:38:40 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 13 November 2006 21:14, David Zeuthen wrote:
> 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. 

https://bugs.freedesktop.org/show_bug.cgi?id=8210

regards

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFWLuzR6LMutpd94wRAv2XAKCLUKFIHEQ8u7dtvcT3k/NUsvQ/jQCgxhL4
X16LmalFz6Ulfy4wAXCrq1g=
=NDW2
-----END PGP SIGNATURE-----


More information about the hal mailing list