On Tue, 16 Oct 2001 04:15, Richard Gooch wrote:
> > > REGISTER ^foo.*bar$ EXECUTE chown luser $devname
> > >
> > > is exactly equivalent to all three of the following:
> > >
> > > REGISTER ^(foo.*bar)$ EXECUTE chown luser $devname
> > > REGISTER ^(foo.*bar)$ EXECUTE chown luser \0
> > > REGISTER ^(foo.*bar)$ EXECUTE chown luser \1
> > >
> > > Is this true or not? As near as I can tell, the real rule is: any
> > > regular expression with parentheses in it fails.
> >
> > I don't know. We'll have to wait for clarification from Richard I
> > think.
>
> Cough! As if I know! The regular subexpression code was contributed by
> Chris Rankin. I assume he tested it, since I think he used it. Check
> the devfsd.conf(5) man page for examples of regular subexpression use.
> In that page it tells you what you need to know to get it working. I
> won't tell you the answer, because I want you to read the manual :-)
REGISTER ^ide.*(part.) CFUNCTION GLOBAL symlink $devname \1
OK, the above is my test expression. It is to create symlinks /dev/part?
that point to /dev/ide/host*/bus*/target*/lun*/part? (I know it's pretty
crappy and I wouldn't do it in production but it's a usable test).
I ran it with the regular devfsd freshly compiled and it didn't work.
I ran it with a hacked version of devfsd that uses REG_EXTENDED and it worked
fine.
Also the version that was compiled with REG_EXTENDED used the same memory in
the regular case (mod 4K) but an extra page when I started actually using
extended regular expressions EG (ide|scsi).
I believe that REG_EXTENDED should be in the default setup for this.
--
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/projects.html Projects I am working on
http://www.coker.com.au/~russell/ My home page
|