From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcel Holtmann Date: Fri, 02 Jan 2009 08:16:08 +0000 Subject: Replaying event for a libudev monitor Message-Id: <1230884168.15391.8.camel@californication> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hi Kay, 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? Regards Marcel