[PATCH 01/18] qemuBlockStorageSourceGetBackendProps: Convert boolean arguments to flags
Ján Tomko
jtomko at redhat.com
Wed Jul 15 21:50:01 UTC 2020
On a Friday in 2020, Peter Krempa wrote:
>Upcoming commit will need to add another flag for the function so
>convert it to a bitwise-or'd array of flags to prevent having 4
>booleans.
>
false true false true false true false false
false true true false true false false false
false true true false false false false true
false true true false true true true false
false true true false true false true true
false false true false false false false false
false true true true true false false true
false true true false true true true true
false true true true false true false true
false false true false false false false true
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_block.c | 32 +++++++++++++++++++++-----------
> src/qemu/qemu_block.h | 10 +++++++---
> src/qemu/qemu_command.c | 3 ++-
> tests/qemublocktest.c | 18 ++++++++++++------
> 4 files changed, 42 insertions(+), 21 deletions(-)
>
>diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
>index a2eabbcd64..10ddf53b3b 100644
>--- a/src/qemu/qemu_block.c
>+++ b/src/qemu/qemu_block.c
>@@ -1052,26 +1052,32 @@ qemuBlockStorageSourceGetBlockdevGetCacheProps(virStorageSourcePtr src,
> /**
> * qemuBlockStorageSourceGetBackendProps:
> * @src: disk source
>- * @legacy: use legacy formatting of attributes (for -drive / old qemus)
>- * @onlytarget: omit any data which does not identify the image itself
>- * @autoreadonly: use the auto-read-only feature of qemu
>+ * @flags: bitwise-or of qemuBlockStorageSourceBackendPropsFlags
>+ *
>+ * Flags:
>+ * QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_LEGACY:
This flag has three spaces in front of it.
>+ * use legacy formatting of attributes (for -drive / old qemus)
>+ * QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY:
>+ * omit any data which does not identify the image itself
>+ * QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY:
>+ * use the auto-read-only feature of qemu
> *
Reviewed-by: Ján Tomko <jtomko at redhat.com>
Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200715/f529f1b0/attachment-0001.sig>
More information about the libvir-list
mailing list