[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 14/23] block/nbd: Use qdict_put()
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 14/23] block/nbd: Use qdict_put() |
Date: |
Thu, 27 Oct 2016 20:08:58 +0200 |
From: Max Reitz <address@hidden>
Instead of inlining this nice macro (i.e. resorting to
qdict_put_obj(..., QOBJECT(...))), use it.
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/nbd.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/block/nbd.c b/block/nbd.c
index c77a969..c539fb5 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -446,7 +446,7 @@ static void nbd_refresh_filename(BlockDriverState *bs,
QDict *options)
QDict *opts = qdict_new();
const char *port = s->port ?: stringify(NBD_DEFAULT_PORT);
- qdict_put_obj(opts, "driver", QOBJECT(qstring_from_str("nbd")));
+ qdict_put(opts, "driver", qstring_from_str("nbd"));
if (s->path && s->export) {
snprintf(bs->exact_filename, sizeof(bs->exact_filename),
@@ -463,17 +463,16 @@ static void nbd_refresh_filename(BlockDriverState *bs,
QDict *options)
}
if (s->path) {
- qdict_put_obj(opts, "path", QOBJECT(qstring_from_str(s->path)));
+ qdict_put(opts, "path", qstring_from_str(s->path));
} else {
- qdict_put_obj(opts, "host", QOBJECT(qstring_from_str(s->host)));
- qdict_put_obj(opts, "port", QOBJECT(qstring_from_str(port)));
+ qdict_put(opts, "host", qstring_from_str(s->host));
+ qdict_put(opts, "port", qstring_from_str(port));
}
if (s->export) {
- qdict_put_obj(opts, "export", QOBJECT(qstring_from_str(s->export)));
+ qdict_put(opts, "export", qstring_from_str(s->export));
}
if (s->tlscredsid) {
- qdict_put_obj(opts, "tls-creds",
- QOBJECT(qstring_from_str(s->tlscredsid)));
+ qdict_put(opts, "tls-creds", qstring_from_str(s->tlscredsid));
}
bs->full_open_options = opts;
--
1.8.3.1
- [Qemu-block] [PULL 04/23] block: Use blk_co_ioctl() for all BB level ioctls, (continued)
- [Qemu-block] [PULL 04/23] block: Use blk_co_ioctl() for all BB level ioctls, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 05/23] raw-posix: Don't use bdrv_ioctl(), Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 06/23] block: Remove bdrv_ioctl(), Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 08/23] raw: Implement .bdrv_co_ioctl instead of .bdrv_aio_ioctl, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 07/23] block: Introduce .bdrv_co_ioctl() driver callback, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 09/23] block: Remove bdrv_aio_ioctl(), Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 10/23] qemu-iotests: Fix typo for NFS with IMGOPTSSYNTAX, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 11/23] block/nbd: Drop trailing "." in error messages, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 12/23] block/nbd: Reject port parameter without host, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 13/23] block/nbd: Default port in nbd_refresh_filename(), Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 14/23] block/nbd: Use qdict_put(),
Kevin Wolf <=
- [Qemu-block] [PULL 16/23] block/nbd: Accept SocketAddress, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 15/23] block/nbd: Add nbd_has_filename_options_conflict(), Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 17/23] block/nbd: Use SocketAddress options, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 18/23] qapi: Allow blockdev-add for NBD, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 20/23] iotests.py: Allow concurrent qemu instances, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 19/23] iotests.py: Add qemu_nbd function, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 21/23] socket_scm_helper: Accept fd directly, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 23/23] iotests: Add test for NBD's blockdev-add interface, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 22/23] iotests: Add assert_json_filename_equal() method, Kevin Wolf, 2016/10/27
- Re: [Qemu-block] [Qemu-devel] [PULL 00/23] Block layer patches, Peter Maydell, 2016/10/28