summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/detect_devices.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index a4cc3d05d..9c269750f 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -369,9 +369,11 @@ sub getATARAID() {
sub getVirtIO() {
-d '/sys/bus/virtio/devices' or return;
map {
- { device => basename($_), info => "VirtIO block device", media_type => 'hd', bus => 'virtio' }
+ my $dev = basename($_);
+ $dev =~ s/block://;
+ { device => $dev, info => "VirtIO block device", media_type => 'hd', bus => 'virtio' }
}
- glob("/sys/bus/virtio/devices/*/block/*");
+ glob("/sys/bus/virtio/devices/*/block:*");
}
# cpu_name : arch() =~ /^alpha/ ? "cpu " :