All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: pattern matching in udev
Date: Tue, 02 Dec 2003 00:21:59 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-107033901318169@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-107013956514187@msgid-missing>

On Sat, Nov 29, 2003 at 09:58:20PM +0100, Stephane Chauveau wrote:
> The current solution is to use CALLOUT but a better way to do it
> would be to add some simple pattern matching capabilities to udev.
> 
> For example using the usual * and ? :
> 
> LABEL, BUS="scsi", vendor="ImageMate CF-SM ", ID="*:0:0:0" ,  NAME="mem0-%n"
> LABEL, BUS="scsi", vendor="ImageMate CF-SM ", ID="*:0:0:1" ,  NAME="mem1-%n"

Yes, using '*' in this manner would be nice to have.  Care to hack up
the strncmp_wildcard() function to achieve this?

> Or even better using regular expressions that could be reused to build
> the final name:
> 
> REGEXP "<$bus><$vendor><$id>"="<scsi><ImageMate.*><.*:0:0:\(.*\)>",
>             NAME="mem\1-%n"

Ick, if you want to do something like this, CALLOUT to a perl script :)

thanks,

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2003-12-02  0:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-29 20:58 pattern matching in udev Stephane Chauveau
2003-12-01 16:59 ` Patrick Mansfield
2003-12-02  0:21 ` Greg KH [this message]
2003-12-04  9:51 ` Olaf Hering
2003-12-04 10:17 ` Chauveau S.
2003-12-04 10:29 ` Ihno Krumreich
2003-12-04 10:34 ` Olaf Hering

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=marc-linux-hotplug-107033901318169@msgid-missing \
    --to=greg@kroah.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.