diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2020-11-01 19:05:43 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2020-11-01 19:05:43 +0000 |
| commit | 6f2ef80b0ce87d258b4736471a81747da2a7a881 (patch) | |
| tree | c6c021403cff99fd92391546edbd62c415600f6a /include/qapi/util.h | |
| parent | 700d20b49e303549b32d3a7a3efbfcee8c7a4f6c (diff) | |
| parent | dbc7b01492371e4a54b92d2b6d968f9b863cc794 (diff) | |
| download | focaccia-qemu-6f2ef80b0ce87d258b4736471a81747da2a7a881.tar.gz focaccia-qemu-6f2ef80b0ce87d258b4736471a81747da2a7a881.zip | |
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2020-10-27-v2' into staging
nbd patches for 2020-10-27 - Tweak the new block-export-add QMP command - Allow multiple -B options for qemu-nbd - Add qemu:allocation-depth metadata context as qemu-nbd -A - Improve iotest use of NBD # gpg: Signature made Fri 30 Oct 2020 20:22:42 GMT # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A * remotes/ericb/tags/pull-nbd-2020-10-27-v2: nbd: Add 'qemu-nbd -A' to expose allocation depth nbd: Add new qemu:allocation-depth metadata context block: Return depth level during bdrv_is_allocated_above nbd: Allow export of multiple bitmaps for one device nbd: Refactor counting of metadata contexts nbd: Simplify qemu bitmap context name nbd: Update qapi to support exporting multiple bitmaps nbd: Utilize QAPI_CLONE for type conversion qapi: Add QAPI_LIST_PREPEND() macro block: Simplify QAPI_LIST_ADD iotests/291: Stop NBD server iotests/291: Filter irrelevant parts of img-info Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/qapi/util.h')
| -rw-r--r-- | include/qapi/util.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/qapi/util.h b/include/qapi/util.h index a7c3c64148..bc312e90aa 100644 --- a/include/qapi/util.h +++ b/include/qapi/util.h @@ -22,4 +22,17 @@ int qapi_enum_parse(const QEnumLookup *lookup, const char *buf, int parse_qapi_name(const char *name, bool complete); +/* + * For any GenericList @list, insert @element at the front. + * + * Note that this macro evaluates @element exactly once, so it is safe + * to have side-effects with that argument. + */ +#define QAPI_LIST_PREPEND(list, element) do { \ + typeof(list) _tmp = g_malloc(sizeof(*(list))); \ + _tmp->value = (element); \ + _tmp->next = (list); \ + (list) = _tmp; \ +} while (0) + #endif |