From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe36N-000390-4D for qemu-devel@nongnu.org; Tue, 05 Jul 2011 06:43:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qe36H-0000wm-R3 for qemu-devel@nongnu.org; Tue, 05 Jul 2011 06:43:34 -0400 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:44064) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe36F-0000tV-7x for qemu-devel@nongnu.org; Tue, 05 Jul 2011 06:43:28 -0400 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp08.in.ibm.com (8.14.4/8.13.1) with ESMTP id p65AR3EJ001383 for ; Tue, 5 Jul 2011 15:57:03 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p65AhMNt4182252 for ; Tue, 5 Jul 2011 16:13:22 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p65AhLCZ021480 for ; Tue, 5 Jul 2011 20:43:22 +1000 Message-ID: <4E12ED9A.7070805@in.ibm.com> Date: Tue, 05 Jul 2011 16:25:22 +0530 From: Supriya Kannery MIME-Version: 1.0 References: <20110704104237.28170.97021.sendpatchset@skannery> <20110704104320.28170.29248.sendpatchset@skannery> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [V4 Patch 3/4]Qemu: Command "block_set" for dynamic block params change List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Supriya Kannery , qemu-devel@nongnu.org, Christoph Hellwig On 07/04/2011 05:59 PM, Stefan Hajnoczi wrote: > On Mon, Jul 4, 2011 at 11:43 AM, Supriya Kannery > wrote: >> >> { >> + .name = "block_set", >> + .args_type = "device:B,name:s,enable:b", >> + .params = "device name enable", > > Perhaps: > > .args_type = "device:B,name:s,enable:b?", > .params = "device name [enable]", > > But I am not sure what the best way to express this is. > >> + .help = "Enable/Disable block device params like hostcache", > > Arguments (like "enable") should depend on the block parameter that is > being set: > > .help = "Set block device parameter" > > If there is no good way to support different optional arguments and > types then a json-string "value" argument would be best. > "device_add" is defined and implemented to handle multiple types of optional arguments. Will work on to see whether that approach can be adopted for block_set { .name = "device_add", .args_type = "device:O", .params = "driver[,prop=value][,...]", .help = "add device, like -device on the command line", .user_print = monitor_user_noop, .mhandler.cmd_new = do_device_add, }, > > Stefan