Re: Accessing device information in REMOVE agent

From: Greg KH
Date: Sun Nov 09 2003 - 14:52:21 EST


On Sun, Nov 09, 2003 at 01:06:13PM +0300, Andrey Borzenkov wrote:
>
> I'd like to (try to) replace current synchronous media change checks in
> supermount by mounting device on insert and releasing it on remove. For those
> cases when it makes sense of course, USB sticks in the first place.
>
> But users are free to use any names or links for their device names i.e. they
> can do
>
> ln -s sda /de/myflash
> mount /dev/myflash
>
> and on remove it is rather hard to match this name against DEVPATH. But I can
> save (major,minor) when mounting and use it to match mounted filesystem on
> remove.

You might want to look into what devlabel does, as it sounds like it
does much the same thing of what you are wanting to do.

Good luck,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/