From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Borzenkov Date: Sat, 08 Nov 2003 13:02:25 +0000 Subject: Accessing device information in REMOVE agent Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org I'd like to be notified when block device goes away (e.g. USB stick unplugged) basically to look if device is in use and possibly initiate clean up. Block hotplug currently is passing only DEVPATH; but it alone is not reliable way to identify it; device may be used under alias names via symbolic links. Is it safe to access /sys/$DEVPATH in REMOVE agent? Apparently hotplug is called asynchronously i.e. it is possible that /sys entry is already removed? Would it make sense to add device number? It seems to be natural native "block device ID" :) TIA -andrey ------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ 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