From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Lautrbach Date: Thu, 19 Mar 2009 09:38:14 +0000 Subject: Re: [PATCH] udevadm monitor --filter= with GL_PLAIN comparison Message-Id: <49C21286.2070501@redhat.com> List-Id: References: <1237404881-1342-1-git-send-email-plautrba@redhat.com> In-Reply-To: <1237404881-1342-1-git-send-email-plautrba@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Kay Sievers wrote: > On Wed, Mar 18, 2009 at 20:34, Petr Lautrbach 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?idH4345#c12 Regards, Petr -- Petr Lautrbach, Red Hat, Inc.