From bf75ed463ca52de2250e615dea03af69fc967a7d Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 13 Jul 2017 09:48:14 +0200 Subject: [PATCH] qemu: block: Add support for file/block/dir storage to JSON disk src generator qemuBlockStorageSourceGetBackendProps now is able to format the JSON definition for regular storage too. --- src/qemu/qemu_block.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 254075b2c4..0761f89913 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -577,6 +577,12 @@ qemuBlockStorageSourceGetBackendProps(virStorageSourcePtr src) case VIR_STORAGE_TYPE_BLOCK: case VIR_STORAGE_TYPE_FILE: case VIR_STORAGE_TYPE_DIR: + if (virJSONValueObjectCreate(&fileprops, + "s:driver", "file", + "s:filename", src->path, NULL) < 0) + return NULL; + break; + case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: