Check usability of named device following a non-existent / invalid one (#756434)
When multiple devices are named on the command line and (after sorting and removing duplicates) the device following a non-existent or invalid one is not checked for usability [1]. In most situations this isn't noticed as the device gets skipped at the "Searching ... partitions" step instead. However as seen in bug 755495 and commit [2] checking usability matters. For example (on CentOS 6.5) a large sector disk device can be edited when it follows a non-existent or invalid device named on the command line: # modprobe scsi_debug dev_size_mb=128 sector_size=4096 # fgrep scsi_debug /sys/block/*/device/model /sys/block/sdd/device/model:scsi_debug # ./gpartedbin /dev/does-not-exist /dev/sdd ====================== libparted : 2.1 ====================== Could not stat device /dev/does-not-exist - No such file or directory. Device /dev/sdd has a logical sector size of 4096. Not all parts of ...
parent
bbf1a19c
Please register or sign in to comment