* who sends from the kernel an event to udevd netlink socket?
@ 2006-03-27 11:10 Mark Ryden
2006-03-27 11:30 ` Kay Sievers
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mark Ryden @ 2006-03-27 11:10 UTC (permalink / raw)
To: linux-hotplug
Hello,
I wonder:
In the last versions of udev, which work **WITHOUT** hotplug:
as I understand, there is a udevd daemon which listens on a NETLINK socket
to events which come from the kernel.Suppose I plug to the USB socket
an ov511 webcam; who
sends the "ADD" event to the udevd NETLINK socket?
I had looked at the code of ov511.c
(drivers/usb/media in the kerbnel tree)
I saw that there is creation of sysfs entries
(in ov51x_probe, there is a call to ov_create_sysfs())
So my question is : is this adding to sysfs is the one that causes sending
an "ADD" event to the user space daemon?
And in case it is : I did not find in sysfs where it is done.
(I looked on both sysfs in usb and fs).
Also grepping for sockaddr_nl under drivers/usb gave no results.
Again , I am talking about the ast versions of udev, which work
**WITHOUT** hotplug: (meaning /proc/sys/kernel/hotplug is empty).
I am specifically interested to know, in this case of plugging a USB
OV511 webcam ,wherer is the code that we reach which sends the "ADD"
event to the Netlink userspace socket (and if it some place which is
generci - are all devices handled
this way or are there exceptions ? )
Regards,
Mark
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: who sends from the kernel an event to udevd netlink socket?
2006-03-27 11:10 who sends from the kernel an event to udevd netlink socket? Mark Ryden
@ 2006-03-27 11:30 ` Kay Sievers
2006-03-27 13:13 ` Mark Ryden
2006-03-27 14:07 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2006-03-27 11:30 UTC (permalink / raw)
To: linux-hotplug
On Mon, Mar 27, 2006 at 01:10:29PM +0200, Mark Ryden wrote:
> Hello,
> I wonder:
> In the last versions of udev, which work **WITHOUT** hotplug:
> as I understand, there is a udevd daemon which listens on a NETLINK socket
> to events which come from the kernel.Suppose I plug to the USB socket
> an ov511 webcam; who
> sends the "ADD" event to the udevd NETLINK socket?
> I had looked at the code of ov511.c
> (drivers/usb/media in the kerbnel tree)
> I saw that there is creation of sysfs entries
> (in ov51x_probe, there is a call to ov_create_sysfs())
> So my question is : is this adding to sysfs is the one that causes sending
video_register_device -> class_device_register -> class_device_add -> kobject_uevent
Kay
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: who sends from the kernel an event to udevd netlink socket?
2006-03-27 11:10 who sends from the kernel an event to udevd netlink socket? Mark Ryden
2006-03-27 11:30 ` Kay Sievers
@ 2006-03-27 13:13 ` Mark Ryden
2006-03-27 14:07 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Mark Ryden @ 2006-03-27 13:13 UTC (permalink / raw)
To: linux-hotplug
Thanks,
Last question on this, to verify I understand correctly, if I may:
class_device_add() in class.c calls kobject_hotplug().
kobject_hotplug() calls send_uevent() which calls netlink_broadcast();
this is true only if CONFIG_HOTPLUG is defined,because
if it is not defined kobject_hotplug() is an empty function. (see the
header file ,
kobject.h)
So, as I understand, CONFIG_HOTPLUG must be defined (even though in
fact we don't use hotplug itself) in order that uevents will be sent via netlink
to the udev user space daemon.
Is it right ?
Mark
On 3/27/06, Kay Sievers <kay.sievers@vrfy.org> wrote:
> On Mon, Mar 27, 2006 at 01:10:29PM +0200, Mark Ryden wrote:
> > Hello,
> > I wonder:
> > In the last versions of udev, which work **WITHOUT** hotplug:
> > as I understand, there is a udevd daemon which listens on a NETLINK socket
> > to events which come from the kernel.Suppose I plug to the USB socket
> > an ov511 webcam; who
> > sends the "ADD" event to the udevd NETLINK socket?
> > I had looked at the code of ov511.c
> > (drivers/usb/media in the kerbnel tree)
> > I saw that there is creation of sysfs entries
> > (in ov51x_probe, there is a call to ov_create_sysfs())
> > So my question is : is this adding to sysfs is the one that causes sending
>
> video_register_device -> class_device_register -> class_device_add -> kobject_uevent
>
> Kay
>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: who sends from the kernel an event to udevd netlink socket?
2006-03-27 11:10 who sends from the kernel an event to udevd netlink socket? Mark Ryden
2006-03-27 11:30 ` Kay Sievers
2006-03-27 13:13 ` Mark Ryden
@ 2006-03-27 14:07 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2006-03-27 14:07 UTC (permalink / raw)
To: linux-hotplug
On Mon, Mar 27, 2006 at 03:13:05PM +0200, Mark Ryden wrote:
> Thanks,
> Last question on this, to verify I understand correctly, if I may:
> class_device_add() in class.c calls kobject_hotplug().
> kobject_hotplug() calls send_uevent() which calls netlink_broadcast();
> this is true only if CONFIG_HOTPLUG is defined,because
> if it is not defined kobject_hotplug() is an empty function. (see the
> header file ,
> kobject.h)
>
> So, as I understand, CONFIG_HOTPLUG must be defined (even though in
> fact we don't use hotplug itself) in order that uevents will be sent via netlink
> to the udev user space daemon.
Yes, but CONFIG_HOTPLUG depends on CONFIG_EMBEDDED, so you usually
can't disable it for a "normal" kernel.
Kay
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-03-27 14:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-27 11:10 who sends from the kernel an event to udevd netlink socket? Mark Ryden
2006-03-27 11:30 ` Kay Sievers
2006-03-27 13:13 ` Mark Ryden
2006-03-27 14:07 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).