linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mtd and udev
@ 2008-11-28 16:08 Sven Fischer
  2008-11-28 16:28 ` Kay Sievers
  2008-12-01  9:14 ` Sven Fischer
  0 siblings, 2 replies; 3+ messages in thread
From: Sven Fischer @ 2008-11-28 16:08 UTC (permalink / raw)
  To: linux-hotplug

Hi,

I'm trying to use udev to dynamically generate mtd devices like mtdblock0 or 
mtd0 etc. I'm using Linux Kernel 2.6.24 on an ARM board.

I have setup two rules but to no avail:

ACTION="add", KERNEL="mtdblock[0-9]", SUBSYSTEMS="block", 
NAME="mtdblock/%n", SYMLINK+="%k"
ACTION="add", KERNEL="mtd[0-9]", SUBSYSTEMS="mtd", NAME="%k"

I tried to check them with udevtest, but it doesn't work. strace shows that it 
runs through the /sys subtree but it doesn't match anything against the above 
rules.

I have the impression mtd isn't meant to work together with udev at all. Am I 
right ? Or what can be the reason for this issue.

Help appreciated.

Best regards
Sven

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mtd and udev
  2008-11-28 16:08 mtd and udev Sven Fischer
@ 2008-11-28 16:28 ` Kay Sievers
  2008-12-01  9:14 ` Sven Fischer
  1 sibling, 0 replies; 3+ messages in thread
From: Kay Sievers @ 2008-11-28 16:28 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Nov 28, 2008 at 17:08, Sven Fischer <sven.fischer@snom.de> wrote:
> I'm trying to use udev to dynamically generate mtd devices like mtdblock0 or
> mtd0 etc. I'm using Linux Kernel 2.6.24 on an ARM board.
>
> I have setup two rules but to no avail:
>
> ACTION="add", KERNEL="mtdblock[0-9]", SUBSYSTEMS="block",
> NAME="mtdblock/%n", SYMLINK+="%k"
> ACTION="add", KERNEL="mtd[0-9]", SUBSYSTEMS="mtd", NAME="%k"
>
> I tried to check them with udevtest, but it doesn't work. strace shows that it
> runs through the /sys subtree but it doesn't match anything against the above
> rules.
>
> I have the impression mtd isn't meant to work together with udev at all. Am I
> right ? Or what can be the reason for this issue.

It should work fine with udev. But use SUBSYSTEM, not SUBSYSTEMS, you
match on the event not a parent device.

And there is probably no reason to swap around node and symlink names,
just create the symlinks, if you want them, but don't needlessly
change the device node name.

Kay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mtd and udev
  2008-11-28 16:08 mtd and udev Sven Fischer
  2008-11-28 16:28 ` Kay Sievers
@ 2008-12-01  9:14 ` Sven Fischer
  1 sibling, 0 replies; 3+ messages in thread
From: Sven Fischer @ 2008-12-01  9:14 UTC (permalink / raw)
  To: linux-hotplug

Thanks a lot, such a stupid typo...;-) works like a charm now !

Sven

On Friday 28 November 2008, Kay Sievers wrote:
> On Fri, Nov 28, 2008 at 17:08, Sven Fischer <sven.fischer@snom.de> wrote:
> > I'm trying to use udev to dynamically generate mtd devices like mtdblock0
> > or mtd0 etc. I'm using Linux Kernel 2.6.24 on an ARM board.
> >
> > I have setup two rules but to no avail:
> >
> > ACTION="add", KERNEL="mtdblock[0-9]", SUBSYSTEMS="block",
> > NAME="mtdblock/%n", SYMLINK+="%k"
> > ACTION="add", KERNEL="mtd[0-9]", SUBSYSTEMS="mtd", NAME="%k"
> >
> > I tried to check them with udevtest, but it doesn't work. strace shows
> > that it runs through the /sys subtree but it doesn't match anything
> > against the above rules.
> >
> > I have the impression mtd isn't meant to work together with udev at all.
> > Am I right ? Or what can be the reason for this issue.
>
> It should work fine with udev. But use SUBSYSTEM, not SUBSYSTEMS, you
> match on the event not a parent device.
>
> And there is probably no reason to swap around node and symlink names,
> just create the symlinks, if you want them, but don't needlessly
> change the device node name.
>
> Kay



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-01  9:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-28 16:08 mtd and udev Sven Fischer
2008-11-28 16:28 ` Kay Sievers
2008-12-01  9:14 ` Sven Fischer

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).