The idea is :
1. check if the path provided by map is a subset of removing device path
eg. /devices/pci0000:00/0000:00:14.0/usb1/1-5 is a subset of /devices/pci0000:00/0000:00:14.0/usb1/1-5:1.0
2. check if the exist of this device
eg. stat /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5
The idea is : pci0000: 00/0000: 00:14.0/ usb1/1- 5 is a subset of /devices/ pci0000: 00/0000: 00:14.0/ usb1/1- 5:1.0
1. check if the path provided by map is a subset of removing device path
eg. /devices/
2. check if the exist of this device pci0000: 00/0000: 00:14.0/ usb1/1- 5
eg. stat /sys/devices/
3. if this device is not exist, then remove..