Re: [PATCH] udevadm monitor --filter= with GL_PLAIN comparison

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kay Sievers wrote:
On Wed, Mar 18, 2009 at 20:34, Petr Lautrbach <plautrba@xxxxxxxxxx> wrote:
My idea is to allow user to specify simple filters for monitoring udev events.

Events are printed only if pass all of filters.

There is only GL_PLAIN comparison now.

e.g.:
$ udevadm monitor --filter='SUBSYSTEM=="bluetooth"' --filter='ACTION!="add"'

This command prints only events which match "bluetooth" SUBSYSTEM and ACTION other
than "add".

I'll be glad to hear your opinions

Funny. What are you using the monitor for, that you want to filter on
events? It's a pure debugging tool, and you usually need to see all
events in the sequence, like the parent devices coming and going.


One of goal of Fedora Powermanagement feature is framework that will allow services to start
depending on installed hardware or software and I'm using this filter to monitor only
events which are defined in my udev rules e.g. for bluetooth see [1].

At first, I was writing rules with RUN+="socket:..." and perl script waiting for events on socket but
this way is looks better for me and it's usable without need any other socket or script.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=484345#c12

Regards,

Petr
--
Petr Lautrbach, Red Hat, Inc.
--
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

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux