arm: tests: 9p: Modify name of virtio-9p-pci device when using virtio-mmio.

It's called virtio-9p-device on virtio-mmio.
This commit is contained in:
Richard W.M. Jones
2013-09-08 20:50:54 +01:00
parent 9d97b86ee8
commit 1cfdb4d9a7

View File

@@ -32,13 +32,24 @@ if [[ "$backend" != "direct" ]]; then
exit 77
fi
# The name of the virtio-9p device is different on virtio-pci and virtio-mmio.
arch="$(uname -m)"
if [[ "$arch" =~ ^arm ]]; then
virtio_mmio=yes
fi
if [ "$virtio_mmio" != "yes" ]; then
virtio_9p=virtio-9p-pci
else
virtio_9p=virtio-9p-device
fi
rm -f test-9p.img test-9p.out
../../fish/guestfish <<EOF
# This dummy disk is not actually used, but libguestfs requires one.
sparse test-9p.img 1M
config -device 'virtio-9p-pci,fsdev=test9p,mount_tag=test9p'
config -device '$virtio_9p,fsdev=test9p,mount_tag=test9p'
config -fsdev 'local,id=test9p,path=$(pwd),security_model=passthrough'
run