From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Fri, 25 Feb 2005 16:53:27 +0000 Subject: Re: event sequencing Message-Id: <1109350408.7242.100.camel@localhost.localdomain> MIME-Version: 1 Content-Type: multipart/mixed; boundary="=-9UUbo1T6DM/r+xDYsr4P" List-Id: References: <9e473391050225081838f673c7@mail.gmail.com> In-Reply-To: <9e473391050225081838f673c7@mail.gmail.com> To: linux-hotplug@vger.kernel.org --=-9UUbo1T6DM/r+xDYsr4P Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, 2005-02-25 at 11:18 -0500, Jon Smirl wrote: >I working on adding hotplug monitor change detection code to some >framebuffer drivers. I having trouble with event sequencing. > >In my probe function I do a class_simple_device_add() to create the >class entry. Later in the probe function I do >kobject_hotplug(&info->class_device->kobj, KOBJ_MOUNT); to indicate a >monitor change. Don't use that function. It is only for the driver core. It will execute a usermode_helper which is not the way to do new stuff. Use the netlink events for that: If your application is some low-level stuff, listen directly to uevents: http://www.kernel.org/pub/linux/utils/kernel/hotplug/uevent_listen.c or if it's desktop stuff, add support to HAL for it. >I'm receiving the MOUNT event before the ADD one. How can I control the order? > >Even in cases where MOUNT comes after ADD udev has not built my device >nodes yet. My MOUNT app needs to use the device node. This is my >bigger problem. Record the events with something like the attached script placed as: /etc/hotplug.d/default/00-log.hotplug and post the result here, if you don't see what's going wrong. Good luck, Kay --=-9UUbo1T6DM/r+xDYsr4P Content-Disposition: inline; filename=00-log.hotplug Content-Type: application/x-shellscript; name=00-log.hotplug Content-Transfer-Encoding: 7bit #!/bin/sh echo -e "--------$SEQNUM--------\n"\ `date +%s` $ACTION $DEVPATH"\n"\ `env`\ "\n--------$SEQNUM--------\n" >> /tmp/hotplug_d.log --=-9UUbo1T6DM/r+xDYsr4P-- ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ 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