by caderoux » Thu Oct 18, 2012 12:20 am
$this->bbcode_second_pass_quote('moonman', 'I') get the same. Don't worry about it. Just do "fdisk -l /dev/sda", "fdisk -l /dev/sdb" and so on
When multiple devices are added of different sizes, that doesn't really help. If this was a permanent thing, I'd be fine, but I had plugged in some USB plugs to dump some TCP logs and needed to find the correct device.
In the end, I used $this->bbcode_second_pass_code('', 'ls -l /dev/disk/by-path') to help a little (because I knew one stick had more partitions) - but fdisk shows more useful information in one shot.
You could use something like this, I guess, until the problem with fdisk is fixed:
$this->bbcode_second_pass_code('', 'ls -l /dev/disk/by-path \
| perl -ne '/^.*\/(.*)$/ && print "fdisk -l /dev/$1\n"' \
| source /dev/stdin
')