summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorNed Bass <[email protected]>2010-10-01 12:00:58 -0700
committerBrian Behlendorf <[email protected]>2010-10-04 13:53:24 -0700
commit83c62c939938ca5915a61022208a31c4ab3faa1c (patch)
tree000c0c218e5ea83753ce5dabc701f1e1737ffb5d /etc
parent3a7381e531f55929f894fa2e81b79e1980de6f22 (diff)
Strip partition from device name for whole disks
Under Solaris, the slice number is chopped off when displaying the device name if the vdev is a whole disk. Under Linux we should similarly discard the partition number. This commit adds the logic to perform the name truncation for devices ending in -partX, XpX, or X, where X is a string of digits. The second case handles devices like md0p0. The third case is limited to scsi and ide disks, i.e. those beginning with "sd" or "hd", in order to avoid stripping the number from names like "loop0". This commit removes the Solaris-specific code for removing slices, since we no longer reasonably expect our changes to be merged in upstream. The partition stripping code was moved off to a helper function to improve readability. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'etc')
0 files changed, 0 insertions, 0 deletions