Is there in any call back in linux and solaris device driver which will be called when the device file is removed from the system? Example if a volume is deleted by the volume manager, it deletes the block and char device interface for that device. Is there any cal开发者_如何学编程lback in linux and solaris like open,close,strategy call which will be called when the deletion of block/char device is done?
Device files are much the same as any other file, so you should be able to use inotify to watch for them appearing and/or disappearing.
精彩评论