Received: from eggs.gnu.org ([2001:4830:134:3::10]:48005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjnMR-0004Yw-B0 for qemu-devel@nongnu.org; Tue, 13 Sep 2016 09:02:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjnMM-0004OY-SK for qemu-devel@nongnu.org; Tue, 13 Sep 2016 09:02:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjnMM-0004OO-NK for qemu-devel@nongnu.org; Tue, 13 Sep 2016 09:02:46 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 220406A6DE for ; Tue, 13 Sep 2016 13:02:46 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 13 Sep 2016 17:01:48 +0400 Message-Id: <20160913130209.695-10-marcandre.lureau@redhat.com> In-Reply-To: <20160913130209.695-1-marcandre.lureau@redhat.com> References: <20160913130209.695-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 09/30] qmp-commands: move 'ringbuf-read' doc to schema List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, armbru@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Signed-off-by: Marc-Andr=C3=A9 Lureau --- docs/qmp-commands.txt | 27 --------------------------- qapi-schema.json | 9 +++++++++ 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 44a7632..4d1907a 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -332,33 +332,6 @@ Example: =20 Note: inject-nmi fails when the guest doesn't support injecting. =20 -ringbuf-read -------------- - -Read from a ring buffer character device. - -Arguments: - -- "device": ring buffer character device name (json-string) -- "size": how many bytes to read at most (json-int) - - Number of data bytes, not number of characters in encoded da= ta -- "format": data format (json-string, optional) - - Possible values: "utf8" (default), "base64" - - Naturally, format "utf8" works only when the ring buffer - contains valid UTF-8 text. Invalid UTF-8 sequences get - replaced. Bug: replacement doesn't work. Bug: can screw - up on encountering NUL characters, after the ring buffer - lost data, and when reading stops because the size limit - is reached. - -Example: - --> { "execute": "ringbuf-read", - "arguments": { "device": "foo", - "size": 1000, - "format": "utf8" } } -<- {"return": "abcdefgh"} - xen-save-devices-state ------- =20 diff --git a/qapi-schema.json b/qapi-schema.json index c23c0cb..45aa6b8 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -436,6 +436,15 @@ # Returns: data read from the device # # Since: 1.4 +# +# Example: +# +# -> { "execute": "ringbuf-read", +# "arguments": { "device": "foo", +# "size": 1000, +# "format": "utf8" } } +# <- {"return": "abcdefgh"} +# ## { 'command': 'ringbuf-read', 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'}, --=20 2.10.0