mirror_zfs/lib/libzfs
Ned Bass 83c62c9399 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 <behlendorf1@llnl.gov>
2010-10-04 13:53:24 -07:00
..
libzfs_changelist.c Add linux user disk support 2010-08-31 13:42:00 -07:00
libzfs_config.c Fix gcc missing braces warnings 2010-08-27 15:34:03 -07:00
libzfs_dataset.c Add linux user disk support 2010-08-31 13:42:00 -07:00
libzfs_diff.c Add linux compatibility 2010-08-31 13:41:59 -07:00
libzfs_fru.c Add linux topology support 2010-08-31 13:42:00 -07:00
libzfs_graph.c Fix gcc missing braces warnings 2010-08-27 15:34:03 -07:00
libzfs_import.c Add linux user disk support 2010-08-31 13:42:00 -07:00
libzfs_mount.c Add linux user disk support 2010-08-31 13:42:00 -07:00
libzfs_pool.c Strip partition from device name for whole disks 2010-10-04 13:53:24 -07:00
libzfs_sendrecv.c Add linux user util support 2010-08-31 13:42:01 -07:00
libzfs_status.c Update core ZFS code from build 121 to build 141. 2010-05-28 13:45:14 -07:00
libzfs_util.c Add linux user util support 2010-08-31 13:42:01 -07:00
Makefile.am Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
Makefile.in Support custom build directories and move includes 2010-09-08 12:38:56 -07:00