From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkWlk-0007h3-MX for qemu-devel@nongnu.org; Thu, 06 Jun 2013 05:46:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkWlh-0004eg-J9 for qemu-devel@nongnu.org; Thu, 06 Jun 2013 05:46:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkWlh-0004eT-9w for qemu-devel@nongnu.org; Thu, 06 Jun 2013 05:46:05 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r569k4E5025791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Jun 2013 05:46:04 -0400 Date: Thu, 6 Jun 2013 11:46:02 +0200 From: Stefan Hajnoczi Message-ID: <20130606094602.GA30685@stefanha-thinkpad.redhat.com> References: <1370434781-28570-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1370434781-28570-1-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 00/16] Make qemu-io commands available in the monitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com On Wed, Jun 05, 2013 at 02:19:25PM +0200, Kevin Wolf wrote: > This is a prerequisite for some kind of tests. It involves reorganising the > qemu-io code so that the command part can be separated and doesn't pollute the > global namespace any more, so we can link it with qemu. > > v2: > - Drop the QMP command, make it HMP only > - Minor review comments like typos > > Kevin Wolf (16): > qemu-io: Remove unused args_command > cutils: Support 'P' and 'E' suffixes in strtosz() > qemu-io: Make cvtnum() a wrapper around strtosz_suffix() > qemu-io: Handle cvtnum() errors in 'alloc' > qemu-io: Don't use global bs in command implementations > qemu-io: Split off commands to qemu-io-cmds.c > qemu-io: Factor out qemuio_command > qemu-io: Move 'help' function > qemu-io: Move 'quit' function > qemu-io: Move qemu_strsep() to cutils.c > qemu-io: Move functions for registering and running commands > qemu-io: Move command_loop() and friends > qemu-io: Move remaining helpers from cmd.c > qemu-io: Interface cleanup > qemu-io: Use the qemu version for -V > Make qemu-io commands available in HMP > > Makefile | 2 +- > Makefile.objs | 1 + > cmd.c | 612 ------------- > cmd.h | 79 -- > hmp-commands.hx | 16 + > hmp.c | 18 + > hmp.h | 1 + > include/qemu-common.h | 3 + > include/qemu-io.h | 46 + > monitor.c | 8 +- > qemu-img.c | 10 +- > qemu-io-cmds.c | 2118 ++++++++++++++++++++++++++++++++++++++++++++ > qemu-io.c | 1990 ++++------------------------------------- > tests/qemu-iotests/049.out | 8 +- > util/cutils.c | 25 + > 15 files changed, 2416 insertions(+), 2521 deletions(-) > delete mode 100644 cmd.c > delete mode 100644 cmd.h > create mode 100644 include/qemu-io.h > create mode 100644 qemu-io-cmds.c > > -- > 1.8.1.4 > On IRC kwolf explained that he moved cmd.c into qemu-io-cmds.c since there are no other users and cmd.c uses global state (it's not easily reusable anyway). I'm happy with dropping cmd.c now. Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan