Received: from eggs.gnu.org ([2001:4830:134:3::10]:55193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YigtO-00049W-SA for qemu-devel@nongnu.org; Thu, 16 Apr 2015 06:19:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YigtL-0004YU-8y for qemu-devel@nongnu.org; Thu, 16 Apr 2015 06:19:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YigtL-0004Xi-1D for qemu-devel@nongnu.org; Thu, 16 Apr 2015 06:19:27 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 2A6FE388174 for ; Thu, 16 Apr 2015 10:19:26 +0000 (UTC) Date: Thu, 16 Apr 2015 11:19:23 +0100 From: Stefan Hajnoczi Message-ID: <20150416101923.GD27070@stefanha-thinkpad.redhat.com> References: <1429094622-26218-1-git-send-email-stefanha@redhat.com> <552E62CE.6080308@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W5WqUoFLvi1M7tJE" Content-Disposition: inline In-Reply-To: <552E62CE.6080308@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block: document block-stream in qmp-commands.hx List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , qemu-devel@nongnu.org --W5WqUoFLvi1M7tJE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 15, 2015 at 03:08:30PM +0200, Max Reitz wrote: > On 15.04.2015 12:43, Stefan Hajnoczi wrote: > >The 'block-stream' QMP command is documented in block-core.json but not > >qmp-commands.hx. Add a summary of the command to qmp-commands.hx > >(similar to the documentation for 'block-commit'). > > > >Reported-by: Kashyap Chamarthy > >Signed-off-by: Stefan Hajnoczi > >--- > > qmp-commands.hx | 37 +++++++++++++++++++++++++++++++++++++ > > 1 file changed, 37 insertions(+) > > > >diff --git a/qmp-commands.hx b/qmp-commands.hx > >index 3a42ad0..7a745ed 100644 > >--- a/qmp-commands.hx > >+++ b/qmp-commands.hx > >@@ -1008,6 +1008,43 @@ EQMP > > .mhandler.cmd_new =3D qmp_marshal_input_block_stream, > > }, > >+SQMP > >+block-stream > >+------------ > >+ > >+Copy data from a backing file into a block device. >=20 > It looks like you stopped just copy-pasting the information from > block-core.json here... >=20 > >+ > >+Arguments: > >+ > >+- "device": The device's ID, must be unique (json-string) >=20 > ...instead sometimes copying it from block-commit... >=20 > >+- "base": The file name of the backing image above which copying starts > >+ (json-string, optional) >=20 > ...or creating new descriptions... >=20 > >+- "backing-file": The backing file string to write into the active laye= r. This > >+ filename is not validated. >=20 > ...and then you are continuing copying the block-core.json entry. >=20 > Is there a reason why you didn't just take all of the block-core.json > comment and put it here? (just curious) Yes. block-commit has a similar approach where the qmp-commands.hx doesn't contain the full command description, just a summary. Unfortunately, the QAPI schema and QMP argument descriptions differ. They use different conventions so I needed to adapt or rewrite them. The path I chose was a mixture of a little bit from, a little bit from there, and some of my own magic :P. The best long-term step would be to pick a canonical documentation unit - either QAPI schema or qmp-commands - and resolve differences between them. Then we'll have just 1 location and all documentation can be generated from it. Stefan --W5WqUoFLvi1M7tJE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVL4yrAAoJEJykq7OBq3PIBVwH/RWWLff+WMl94UsJU3+KwjvR tNRD7swjB7p27MvYGknbTTwQYTiw32A427ochXfLU5/p5afSsQA5ORuTm0F7+BK8 W+l6bQczK2R3lgPJpZcvgKBA3SjrfRU4ROMGIdNg/ZIZ7thW/mepcnwI7s41vPkX m9CSl5Qd4Ki1fBDMgZFLyq66DqvHAeEAqxQKFHFsJyQ/aRnfPQRY/tmW3vvPnnN2 7UR/3NXOiNTbGCE+MwNRMffrbw52YeQ+WtjJSGXCZ0jYmG/gMrYl+zSQZCklJPQF GvRvsCiozZtiMos439vk2TXvuI1AQWbBFaQ+sFRMxR8gz3+b0KUbLStjYhL34ew= =eOVk -----END PGP SIGNATURE----- --W5WqUoFLvi1M7tJE--