From b5794f366532f4f906a860fe332f2403f2e6b623 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Tue, 22 Sep 2015 11:57:43 +0100 Subject: [PATCH] Add support for Xen PV disks Xen paravirtualised disks (supported by most modern kernels) have the "xvd" prefix (e.g. xvda0). The functions to strip partitions need to match on Xen PV disks otherwise the device name is discarded. Change-Id: I5539d2afba3fae30d1ddb49dcbf077113d38bbf7 Closes-Bug: #1498576 --- elements/ramdisk-base/extra-data.d/scripts/d/init-func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elements/ramdisk-base/extra-data.d/scripts/d/init-func b/elements/ramdisk-base/extra-data.d/scripts/d/init-func index 8041bbd6..0012d031 100755 --- a/elements/ramdisk-base/extra-data.d/scripts/d/init-func +++ b/elements/ramdisk-base/extra-data.d/scripts/d/init-func @@ -129,7 +129,7 @@ function prepend_dev() { function whole_disk_name() { local dev=`prepend_dev "$1"` case "$dev" in - /dev/sd*|/dev/hd*|/dev/vd*) + /dev/sd*|/dev/hd*|/dev/vd*|/dev/xvd*) echo "$dev" | sed -e 's/[0-9]*$//' ;; /dev/cciss/*) @@ -146,7 +146,7 @@ function partition_name() { local dev=`prepend_dev "$1"` local part=$2 case "$dev" in - /dev/sd*|/dev/hd*|/dev/vd*) + /dev/sd*|/dev/hd*|/dev/vd*|/dev/xvd*) echo "${dev}${part}" ;; /dev/cciss/*)