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 3. if this device is not exist, then remove.. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to system-config-printer in Ubuntu. https://bugs.launchpad.net/bugs/1893300 Title: The status of cups still shows idle when the printer has been unplugged Status in OEM Priority Project: In Progress Status in system-config-printer package in Ubuntu: New Bug description: [ Impact ] After printers (non-ippusb protocal) have been disconnected, the status of cups still shows "idle" instead of "disabled", so seems the disconnected procedure hasn't worked well. [ Test Case ] 1. Connect the printer (non-ippusb protocal)(which isn't 070104) with any 20.04 machine 2. Wait for the status of cups became "Idle" (lpstat -p) 3. Unplug the cable of the printer 4. Check the status of cups again. (lpstat -p) [Expected result] The status should show disabled. [Actual result] The status shows idle. [info] Target: HP LaserJet Pro203dw HP Officejet 100 Mobile Printer HP Officeject 200 Mobile Printer Brother HL-2250DN Samsung ML-331x To manage notifications about this bug go to: https://bugs.launchpad.net/oem-priority/+bug/1893300/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp

