From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Date: Thu, 08 Jan 2004 02:03:35 +0000 Subject: Re: removable media revalidation - udev vs. devfs or static /dev Message-Id: List-Id: References: <200401012333.04930.arvidjaar@mail.ru> <20040103055847.GC5306@kroah.com> <20040107205237.GB16832@suse.de> In-Reply-To: <20040107205237.GB16832@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Olaf Hering Cc: Greg KH , Andrey Borzenkov , linux-hotplug-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org On Wed, 7 Jan 2004, Olaf Hering wrote: > > > > Then, user space can just access "/dev/sda1" or whatever, and the act of > > accessing it will force the re-scan. > > How would that work? I mean, what will a tool that cares about a block > event do? It will run a fdisk/parted -l /udev/sda to figure out what partitions > are there (just to skip an extended partition sda5, as example) and > finds no media. That tool will never run again on sda, unless a new > block add event comes in. So some sort of polling is required for that > class of devices. What is your problem? I'll use a very common and simple case that I do myself: use any USB media reader to read a camera card. It will be a FAT filesystem on the first partition, so your fstab might look like this: /dev/sda1 /mnt/smartmedia vfat noauto,user,ro 0 0 and then you just do "mount /mnt/smartmedia", and you're done. This works. I do it all the time. You just stick in your card, and mount it, and off it foes. No "fdisk" or "parted" _anywhere_. Linus ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ 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