On Fri, Jan 2, 2009 at 09:16, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote: > so the enumeration API of libudev is pretty since, but when using a > monitor to get add/change/remove events anyway, it is kinda double work. > > So I have udev rules to select certain events to send to a specific > socket and that works great and truly simple with libudev. However when > the client starts up, it has to discover the initial state of these > events. I can use the enumeration part of libudev, but then I am putting > details into a rules file and others into the client. > > So what I like to have is a way to replay the events for that monitor > socket. Something similar to this: > > ctx = udev_new(); > mon = udev_monitor_new_from_socket(ctx, "@socket"); > udev_monitor_enable_receiving(mon); > > /* setup watch etc. */ > > udev_monitor_replay_events(mon); > > What do you think? Can we add something like this? You want something like a "daemon coldplug"? Something that would parse the rules and tries to match the devices, which matches the rule that sends the event? The rule parsingis currently not part of libudev. Matching devices might involve running programs from rules, so we should not do that in a single serializing process, as it might block for too long. We should also not use the daemon to trigger events, because global events would be send to all other listeners. Care to explain your idea a bit more, I may miss something here? Thanks, Kay -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html