projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d3eabf2
)
Show KVM virtio disks
author
Jamie Cameron
<jcameron@webmin.com>
Thu, 6 Oct 2011 00:34:30 +0000
(17:34 -0700)
committer
Jamie Cameron
<jcameron@webmin.com>
Thu, 6 Oct 2011 00:34:30 +0000
(17:34 -0700)
fdisk/fdisk-lib.pl
patch
|
blob
|
history
diff --git
a/fdisk/fdisk-lib.pl
b/fdisk/fdisk-lib.pl
index
a60728b
..
6b615d1
100755
(executable)
--- a/
fdisk/fdisk-lib.pl
+++ b/
fdisk/fdisk-lib.pl
@@
-182,6
+182,10
@@
if (open(PARTS, "/proc/partitions")) {
# Promise raid controller
push(@devs, "/dev/$1");
}
# Promise raid controller
push(@devs, "/dev/$1");
}
+ elsif (/\d+\s+\d+\s+\d+\s+(vd[a-z]+)\s/) {
+ # Virtio disk from KVM
+ push(@devs, "/dev/$1");
+ }
}
close(PARTS);
}
close(PARTS);
@@
-277,6
+281,12
@@
while(<FDISK>) {
$disk->{'desc'} = &text('select_device', 'Xen', uc($1));
$disk->{'type'} = 'ide';
}
$disk->{'desc'} = &text('select_device', 'Xen', uc($1));
$disk->{'type'} = 'ide';
}
+ elsif ($disk->{'device'} =~ /\/vd([a-z]+)$/) {
+ # KVM virtual disk
+ $disk->{'desc'} = &text('select_device',
+ 'VirtIO', uc($1));
+ $disk->{'type'} = 'ide';
+ }
elsif ($disk->{'device'} =~ /\/(scsi\/host(\d+)\/bus(\d+)\/target(\d+)\/lun(\d+)\/disc)/) {
# New complete SCSI disk specification
$disk->{'host'} = $2;
elsif ($disk->{'device'} =~ /\/(scsi\/host(\d+)\/bus(\d+)\/target(\d+)\/lun(\d+)\/disc)/) {
# New complete SCSI disk specification
$disk->{'host'} = $2;