linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: linux-hotplug@vger.kernel.org
Subject: Replaying event for a libudev monitor
Date: Fri, 02 Jan 2009 08:16:08 +0000	[thread overview]
Message-ID: <1230884168.15391.8.camel@californication> (raw)

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



             reply	other threads:[~2009-01-02  8:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-02  8:16 Marcel Holtmann [this message]
2009-01-02 13:00 ` Replaying event for a libudev monitor Kay Sievers
2009-01-02 14:04 ` Marcel Holtmann
2009-01-02 16:05 ` Kay Sievers
2009-01-02 17:45 ` Marcel Holtmann
2009-01-02 17:56 ` David Zeuthen
2009-01-02 17:57 ` Kay Sievers
2009-01-02 18:02 ` Marcel Holtmann
2009-01-02 18:12 ` Kay Sievers
2009-01-02 18:33 ` Marcel Holtmann
2009-01-02 18:36 ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1230884168.15391.8.camel@californication \
    --to=marcel@holtmann.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).