diff --git a/tools/virt-list-filesystems b/tools/virt-list-filesystems index 1b58d63d2..9dcba2407 100755 --- a/tools/virt-list-filesystems +++ b/tools/virt-list-filesystems @@ -167,7 +167,7 @@ foreach $dev (sort keys %fses) { $fstype = $fses{$dev}; if ($all || ($fstype ne "swap" && $fstype ne "unknown")) { - print canonicalize($dev); + print $g->canonical_device_name ($dev); if ($long) { print " $fstype"; } @@ -175,18 +175,6 @@ foreach $dev (sort keys %fses) { } } -# The reverse of device name translation, see -# BLOCK DEVICE NAMING in guestfs(3). -sub canonicalize -{ - local $_ = shift; - - if (m{^/dev/[hv]d([a-z]\d)$}) { - return "/dev/sd$1"; - } - $_; -} - =head1 SHELL QUOTING Libvirt guest names can contain arbitrary characters, some of which