Error checking for g_mod_event() and friends

Pawel Jakub Dawidek nick at garage.freebsd.pl
Tue Jan 27 06:57:05 PST 2004


On Tue, Jan 27, 2004 at 03:46:30PM +0100, Lukas Ertl wrote:
+> is there a specific reason that the .init function of a class is declared
+> to return "void"?  I'd like to change that to an int, so we could do error
+> checking, and subsequently modify g_load_class() to check for errors and
+> so on.

Look at:

	http://garage.freebsd.pl/patches/geom_subr.c.patch

The biggest problem is that g_event thread is created after classes are
loaded, so we end up with deadlock on boot.

+> Additionally, I've seen several calls to g_malloc() where the return
+> values aren't checked - should I prepare some patches for these?

I don't see any g_malloc() call with M_NOWAIT.

-- 
Pawel Jakub Dawidek                       pawel at dawidek.net
UNIX Systems Programmer/Administrator     http://garage.freebsd.pl
Am I Evil? Yes, I Am!                     http://cerber.sourceforge.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 305 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20040127/24e9f60d/attachment.bin


More information about the freebsd-geom mailing list