[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 41/56] qapi: Rename ChardevBackend member "memory"
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 41/56] qapi: Rename ChardevBackend member "memory" to "ringbuf" |
Date: |
Tue, 13 Aug 2013 10:11:05 -0500 |
From: Markus Armbruster <address@hidden>
Commit 1da48c6 called the new member "memory" after commit 3949e59
standardized "ringbuf". Rename for consistency.
However, member name "memory" is visible in QMP since 1.5. It's
undocumented just like the driver name. Keep it working anyway.
Cc: address@hidden
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit 3a1da42eb35a67d0dbc899dd571ea386fa11c4dd)
Signed-off-by: Michael Roth <address@hidden>
---
qapi-schema.json | 6 ++++--
qemu-char.c | 11 ++++++-----
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index 9302e7d..1c8503a 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3288,9 +3288,9 @@
##
# @ChardevRingbuf:
#
-# Configuration info for memory chardevs
+# Configuration info for ring buffer chardevs.
#
-# @size: #optional Ringbuffer size, must be power of two, default is 65536
+# @size: #optional ring buffer size, must be power of two, default is 65536
#
# Since: 1.5
##
@@ -3321,6 +3321,8 @@
'spicevmc' : 'ChardevSpiceChannel',
'spiceport' : 'ChardevSpicePort',
'vc' : 'ChardevVC',
+ 'ringbuf': 'ChardevRingbuf',
+ # next one is just for compatibility
'memory' : 'ChardevRingbuf' } }
##
diff --git a/qemu-char.c b/qemu-char.c
index c6c4c6b..c16aea1 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3115,12 +3115,12 @@ static void qemu_chr_parse_ringbuf(QemuOpts *opts,
ChardevBackend *backend,
{
int val;
- backend->memory = g_new0(ChardevRingbuf, 1);
+ backend->ringbuf = g_new0(ChardevRingbuf, 1);
val = qemu_opt_get_number(opts, "size", 0);
if (val != 0) {
- backend->memory->has_size = true;
- backend->memory->size = val;
+ backend->ringbuf->has_size = true;
+ backend->ringbuf->size = val;
}
}
@@ -3713,8 +3713,9 @@ ChardevReturn *qmp_chardev_add(const char *id,
ChardevBackend *backend,
case CHARDEV_BACKEND_KIND_VC:
chr = vc_init(backend->vc);
break;
+ case CHARDEV_BACKEND_KIND_RINGBUF:
case CHARDEV_BACKEND_KIND_MEMORY:
- chr = qemu_chr_open_ringbuf(backend->memory, errp);
+ chr = qemu_chr_open_ringbuf(backend->ringbuf, errp);
break;
default:
error_setg(errp, "unknown chardev backend (%d)", backend->kind);
@@ -3764,7 +3765,7 @@ static void register_types(void)
register_char_driver_qapi("null", CHARDEV_BACKEND_KIND_NULL, NULL);
register_char_driver("socket", qemu_chr_open_socket);
register_char_driver("udp", qemu_chr_open_udp);
- register_char_driver_qapi("ringbuf", CHARDEV_BACKEND_KIND_MEMORY,
+ register_char_driver_qapi("ringbuf", CHARDEV_BACKEND_KIND_RINGBUF,
qemu_chr_parse_ringbuf);
register_char_driver_qapi("file", CHARDEV_BACKEND_KIND_FILE,
qemu_chr_parse_file_out);
--
1.7.9.5
- [Qemu-stable] [PATCH 26/56] seccomp: add the asynchronous I/O syscalls to the whitelist, (continued)
- [Qemu-stable] [PATCH 26/56] seccomp: add the asynchronous I/O syscalls to the whitelist, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 36/56] gtk: don't use g_object_unref on GdkCursor, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 35/56] megasas: Legacy command line handling fix, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 37/56] gtk: Fix compiler warning (GTK 3 deprecated function), Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 42/56] virtio-console: Use exitfn for virtserialport, too, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 38/56] dataplane: refuse to start if device is already in use, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 32/56] block: Add return value for bdrv_flush_all(), Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 39/56] xhci: handle USB_RET_IOERROR, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 33/56] cpus: Add return value for vm_stop(), Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 40/56] qemu-char: Register ring buffer driver with correct name "ringbuf", Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 41/56] qapi: Rename ChardevBackend member "memory" to "ringbuf",
Michael Roth <=
- [Qemu-stable] [PATCH 43/56] pci-bridge: update mappings for migration/restore, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 34/56] cpus: Let vm_stop[_force_state]() always flush block devices, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 45/56] chardev: fix CHR_EVENT_OPENED events for mux chardevs, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 54/56] dataplane: sync virtio.c and vring.c virtqueue state, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 55/56] virtio: clear signalled_used_valid when switching from dataplane, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 49/56] target-i386: Fix X86CPU error handling, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 47/56] seccomp: add additional asynchronous I/O syscalls, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 56/56] vhost: clear signalled_used_valid on vhost stop, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 53/56] i82801b11: Fix i82801b11 PCI host bridge config space, Michael Roth, 2013/08/13
- [Qemu-stable] [PATCH 48/56] iov: handle EOF in iov_send_recv, Michael Roth, 2013/08/13