kobject-uevent

Ikke eikke at eikke.com
Mon Jan 10 12:31:26 PST 2005


...
> That's the magic of a event mainloop. :)
> 
> You may look at:
>   hald/linux/osspec.c:207
> 
> as an example how to integrate it:
>   ...
>   channel = g_io_channel_unix_new (socketfd);
>   g_io_add_watch (channel, G_IO_IN, hald_helper_data, NULL);
>   ...
> 
> Kay

Ok, I hacked on this a little bit.

This is what I get in dbus-monitor now:

signal interface=org.kernel.KobjectUevent; member=KobjectUevent;
sender=:1.98
string:ACTION=add
string:DEVPATH=/module/ext2
string:SUBSYSTEM=module
string:SEQNUM=1182
signal interface=org.kernel.KobjectUevent; member=KobjectUevent;
sender=:1.98
string:ACTION=add
string:DEVPATH=/module/ext2/sections
string:SUBSYSTEM=module
string:SEQNUM=1183
signal interface=org.kernel.KobjectUevent; member=KobjectUevent;
sender=:1.98
string:ACTION=remove
string:DEVPATH=/module/ext2/sections
string:SUBSYSTEM=module
string:SEQNUM=1184
signal interface=org.kernel.KobjectUevent; member=KobjectUevent;
sender=:1.98
string:ACTION=remove
string:DEVPATH=/module/ext2
string:SUBSYSTEM=module
string:SEQNUM=1185


The patch I wrote does some extremely ugly things. Some of them to avoid
the problem caused by the headers in /usr/include/linux being outdated,
others to enable me to send out signals from hald/linux/*.c

Diff is here [1]

Please comment on it: bad coding style, missing error checking,
whatever, but don't be too hard, I'm no elite hacker like some of you
guys :-) I'm learning.

I want to improve the code a lot (solve those ugly hacks/fixes etc), so
if you got an idea on how to do so, please tell me.


Regards, Ikke

[1]
http://code.eikke.com/index.php?dir=kevent-dbus/&file=kobject-uevent-for-hal-2.diff

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



More information about the Hal mailing list