calmh/smartos-platform-upgrade — pull request #4 by xen0l (2014-02-13 00:00:30+00:00)
Title: rmformat detects CD-ROM as a removable media, use disklist -r instead

rmformat is not the best choice for getting list of removable medias. One of my SmartOS node has DVD-RAM and it is reported by rmformat.

Example output:
Looking for devices...
1. Logical Node: /dev/rdsk/c1t0d0p0
Physical Node: /pci@0,0/pci1014,3a3a@1d,7/storage@5/disk@0,0
Connected Device: Kingston DT Micro PMAP
Device Type: Removable
Bus: USB
Size: 7.5 GB
Label:
Access permissions:
2. Logical Node: /dev/rdsk/c3t0d0p0
Physical Node: /pci@0,0/pci-ide@1f,2/ide@0/sd@0,0
Connected Device: MATSHITA DVD-RAM UJ890 SAA5
Device Type: DVD Reader/Writer
Bus: IDE
Size:
Label:
Access permissions:

This patch fixes this and uses disklist -r, which reports removable disks only.