On 04/02/14 10:33, Isaac Dunham wrote: > On Tue, Apr 01, 2014 at 08:04:55AM -0500, Rob Landley wrote: >> On 03/29/14 02:22, Isaac Dunham wrote: >> I think a command line option to tell mdev to give the PCI bus a good >> smack and then rescan all the block devices sounds fine. It's not the >> default behavior, but an mdev command line option (possibly with a >> config option) is probably where this belongs. > > I was thinking that the PCI bus rescan belonged somewhere else; if the > open() magic is done when we get a block device via mdev -s or hotplug, > we won't need suid for that. > The thought is that mdev responds to kernel events; it doesn't create > them at present.
"mdev -s" isn't responding to kernel events, it's actively scanning. >>> (Coincidentally, I've thought of a way to make mdev >>> handle hotplugging with minimal code changes: use the environment >>> to find the right uevent file.) >> >> The one I wrote for busybox did hotplugging. The busybox one has changed >> a huge amount since then and I want to read up on it to see if people >> have expectations. I also want to make it work well with devtmpfs. > > The big one I can think of is the move/rename/execute command syntax > after field 3. > Eg (from my mdev.conf, copied from Alpine): > ram([0-9]*) root:disk 0660 >rd/%1 > card[0-9] root:video 0660 =dri/ > fb[0-9] root:video 0660 @chown root:video $MDEV && chmod 660 $MDEV > usbdev[0-9].[0-9] root:root 0660 */lib/mdev/usbdev Ok. Rob _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net