From 1dfa428e543aa5b4cbfe1704d0c2bc5d8a71525d Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Thu, 23 Apr 2009 15:43:50 +0000 Subject: handle virtio block devices --- perl-install/NEWS | 1 + perl-install/detect_devices.pm | 10 +++++++++- perl-install/install/NEWS | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/NEWS b/perl-install/NEWS index d303878c1..2b0538cde 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,4 +1,5 @@ - don't set umask=0 by default on windows partitions in 'secure' level. +- handle virtio block devices Version 12.31 - 22 April 2009 diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 3cf6609cc..ce6c8e029 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -32,7 +32,7 @@ sub get() { #- 2. The first SCSI device if SCSI exists. Or #- 3. The first RAID device if RAID exists. - getIDE(), getSCSI(), getDAC960(), getCompaqSmartArray(), getATARAID(); + getIDE(), getSCSI(), getVirtIO(), getDAC960(), getCompaqSmartArray(), getATARAID(); } sub hds() { grep { may_be_a_hd($_) } get() } sub tapes() { grep { $_->{media_type} eq 'tape' } get() } @@ -368,6 +368,14 @@ sub getATARAID() { values %l; } +sub getVirtIO() { + -d '/sys/bus/virtio/devices' or return; + map { + print basename($_)."\n"; + { device => "/dev/".basename($_), info => "VirtIO block device", media_type => 'hd', bus => 'virtio' } + } + glob("/sys/bus/virtio/devices/*/block/*"); +} # cpu_name : arch() =~ /^alpha/ ? "cpu " : # arch() =~ /^ppc/ ? "processor" : "vendor_id" diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 2b6f14b03..175d4af07 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- handle virtio block devices + Version 12.32 - 23 April 2009 - fix cdrom path in urpmi.cfg for dual arch ISOs -- cgit v1.2.1