Show description for Xen virtual disks
authorJamie Cameron <jcameron@webmin.com>
Tue, 8 Jun 2010 00:41:33 +0000 (17:41 -0700)
committerJamie Cameron <jcameron@webmin.com>
Tue, 8 Jun 2010 00:41:33 +0000 (17:41 -0700)
fdisk/fdisk-lib.pl
mount/linux-lib.pl

index b042713..a20de72 100755 (executable)
@@ -242,6 +242,11 @@ while(<FDISK>) {
                        $disk->{'desc'} = &text('select_device', 'IDE', uc($1));
                        $disk->{'type'} = 'ide';
                        }
+               elsif ($disk->{'device'} =~ /\/xvd([a-z]+)$/) {
+                       # Xen virtual disk
+                       $disk->{'desc'} = &text('select_device', 'Xen', 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;
index 439760b..1640141 100755 (executable)
@@ -2530,10 +2530,12 @@ if (!$text{'select_part'}) {
                $text{$k} = $flang{$k} if ($k =~ /^select_/);
                }
        }
-return $_[0] =~ /^\/dev\/(s|h)d([a-z]+)(\d+)$/ ?
-       &text('select_part', $1 eq 's' ? 'SCSI' : 'IDE', uc($2), "$3") :
-       $_[0] =~ /^\/dev\/(s|h)d([a-z]+)$/ ?
-       &text('select_device', $1 eq 's' ? 'SCSI' : 'IDE', uc($2)) :
+return $_[0] =~ /^\/dev\/(s|h|xv)d([a-z]+)(\d+)$/ ?
+       &text('select_part', $1 eq 's' ? 'SCSI' : $1 eq 'xv' ? 'Xen' : 'IDE',
+                            uc($2), "$3") :
+       $_[0] =~ /^\/dev\/(s|h|xv)d([a-z]+)$/ ?
+       &text('select_device', $1 eq 's' ? 'SCSI' : $1 eq 'xv' ? 'Xen' : 'IDE',
+                              uc($2)) :
        $_[0] =~ /rd\/c(\d+)d(\d+)p(\d+)$/ ?
        &text('select_mpart', "$1", "$2", "$3") :
        $_[0] =~ /ida\/c(\d+)d(\d+)p(\d+)$/ ?