[Qemu-devel] [PATCH] check NULL opts in qemu_opt_get functions

2014-06-17 Thread Chunyan Liu
Some places will call bdrv_create_file(filename, NULL, &local_err), where opts is NULL. Check NULL in qemu_opt_get and qemu_opt_get_*_del functions, to avoid extra effort of checking opts before calling them every time. Signed-off-by: Chunyan Liu --- Fix reported bugs: http://lists.gnu

[Qemu-devel] [RFC PATCH V3 0/2] support xen HVM direct kernel boot

2014-06-19 Thread Chunyan Liu
here: http://thread.gmane.org/gmane.comp.emulators.qemu/277514 v1 is here: http://lists.gnu.org/archive/html/qemu-devel/2014-05/msg06233.html Chunyan Liu (2): xen: pass kernel initrd to qemu qemu: support xen hvm direct kernel boot docs/man/xl.cfg.pod.5 | 57 ++

[Qemu-devel] [RFC PATCH V3 1/2] xen: pass kernel initrd to qemu

2014-06-19 Thread Chunyan Liu
lt" ramdisk="/mnt/initrd-3.0.13-0.27-default" root="/dev/hda2" extra="console=tty0 console=ttyS0" Signed-off-by: Chunyan Liu --- docs/man/xl.cfg.pod.5 | 57 +-- tools/libxl/libxl.h | 13 ++

[Qemu-devel] [RFC PATCH V3 2/2] qemu: support xen hvm direct kernel boot

2014-06-19 Thread Chunyan Liu
n xen uses seabios. Signed-off-by: Chunyan Liu --- hw/i386/pc.c | 22 ++ hw/i386/pc_piix.c | 7 +++ hw/i386/xen/xen_apic.c | 1 + include/hw/i386/pc.h | 5 + 4 files changed, 35 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 3e0ecf1..e0

[Qemu-devel] [PATCH V3] qemu-img create: add 'nocow' option

2014-06-23 Thread Chunyan Liu
reating file by calling qemu_open directly. For them, do the same setting NOCOW flag ioctl work in them separately. Signed-off-by: Chunyan Liu --- Changes to v2: * based on QemuOpts instead of old QEMUOptionParameters * add nocow description in man page and html doc Old v2 is here: http:

[Qemu-devel] [PATCH 0/2] fix: unix sockets created for virtio-serail has insufficient permissions

2014-09-02 Thread Chunyan Liu
and a libvirt patch: qemu patch: adds a new 'umask' option to -chardev, so that user can change the umask. libvirt patch: pass 'umask=0x002' paramter to qemu command line for virtio-serial device Chunyan Liu (2): qemu side: add 'umask' option to chardev lib

[Qemu-devel] [PATCH 1/2] add 'umask' option to -chardev

2014-09-02 Thread Chunyan Liu
efault is 022), then create unix sockets with expected permissions. Signed-off-by: Chunyan Liu --- This is patch for qemu. qemu-char.c | 3 +++ qemu-options.hx | 9 +++-- util/qemu-sockets.c | 12 +++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/qemu-

[Qemu-devel] [PATCH 2/2] qemu: add umask(002) to virtio-serial chardev commandline

2014-09-02 Thread Chunyan Liu
n case. In qemu side, there is another patch to handle the 'umask' option to overwrite default umask(022). With these changes, unix socket created for virtio-serial device can have expected permissions. Signed-off-by: Chunyan Liu --- This is patch for libvirt. src/qemu/qemu_comma

[Qemu-devel] [PATCH V2] fix: unix sockets created for virtio-serail has insufficient permissions

2014-09-02 Thread Chunyan Liu
srwxr-xr-x 1 qemu qemu 0 21. Jul 14:19 /tmp/somefile.sock Other users in the same group (like real user, test engines, etc) cannot write to this socket. Signed-off-by: Chunyan Liu --- Changes: * set umask(002) to the whole qemu process instead of calling umask in qemu unix_listen_opts

[Qemu-devel] [PATCH] vnc: add additional key up event before repeated key down

2014-09-04 Thread Chunyan Liu
nt (if the key is not a control key). Signed-off-by: Chunyan Liu --- ui/vnc.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/ui/vnc.c b/ui/vnc.c index f8d9b7d..a265378 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1659,6 +1659,25 @@ static void do_key_event(VncState *vs, int

[Qemu-devel] [RESEND PATCH V3] qemu-img info: show nocow info

2014-07-29 Thread Chunyan Liu
Add nocow info in 'qemu-img info' output to show whether the file currently has NOCOW flag set or not. Signed-off-by: Chunyan Liu Acked-by: Eric Blake --- Resend for QEMU 2.2. Change json version comment. block/qapi.c | 25 + qapi/block-core.json |

[Qemu-devel] [RESEND PATCH V3] qemu-img info: show nocow info

2014-07-29 Thread Chunyan Liu
Add nocow info in 'qemu-img info' output to show whether the file currently has NOCOW flag set or not. Signed-off-by: Chunyan Liu Reviewed-by: Eric Blake --- Resend for QEMU 2.2. Change json version comment. Add Reviewed-by. block/qapi.c | 25 +

[Qemu-devel] [PATCH][resend] Add -f option to qemu-nbd

2012-01-18 Thread Chunyan Liu
Stefan, could you help commit it if it's OK? Thanks. Same as in thread: http://lists.gnu.org/archive/html/qemu-devel/2011-12/msg01083.html but rebase it to latest code. Add -f option to qemu-nbd to find a free nbd device for user and connect disk image to that device. syntax: qemu-nbd -f disk.img

Re: [Qemu-devel] [PATCH][resend] Add -f option to qemu-nbd

2012-01-19 Thread Chunyan Liu
Thanks, Paolo! 2012/1/18 Paolo Bonzini : > On 01/18/2012 09:48 AM, Chunyan Liu wrote: >> >> Stefan, could you help commit it if it's OK? Thanks. >> Same as in thread: >> http://lists.gnu.org/archive/html/qemu-devel/2011-12/msg01083.html >> but rebase it to la

Re: [Qemu-devel] [PATCH][resend] Add -f option to qemu-nbd

2012-01-19 Thread Chunyan Liu
2012/1/18 Paolo Bonzini : > On 01/18/2012 11:56 AM, Michael Tokarev wrote: >> >> On 18.01.2012 12:48, Chunyan Liu wrote: >>> >>> Stefan, could you help commit it if it's OK? Thanks. >>> Same as in thread: >>> http://lists.gnu.org/archive/ht

[Qemu-devel] [PATCH] Support logging xen-guest console

2011-06-20 Thread Chunyan Liu
Add code to support logging xen-domU console, as what xenconsoled does. Log info will be saved in /var/log/xen/console/guest-domUname.log. Signed-off-by: Chunyan Liu --- hw/xen_console.c | 63 ++ 1 files changed, 63 insertions(+), 0

[Qemu-devel] [PATCH] Support logging xen-guest console

2011-06-20 Thread Chunyan Liu
Add code to support logging xen-domU console, as what xenconsoled does. Log info will be saved in /var/log/xen/console/guest-domUname.log. Signed-off-by: Chunyan Liu --- hw/xen_console.c | 63 ++ 1 files changed, 63 insertions(+), 0

[Qemu-devel] [PATCH V2] Support logging xen-guest console

2011-06-22 Thread Chunyan Liu
Add code to support logging xen-domU console, as what xenconsoled does. Log info will be saved in /var/log/xen/console/guest-domUname.log. Signed-off-by: Chunyan Liu --- hw/xen_console.c | 71 ++ 1 files changed, 71 insertions(+), 0

[Qemu-devel] [PATCH V3] Support logging xen-guest console

2011-06-30 Thread Chunyan Liu
Add code to support logging xen-domU console, as what xenconsoled does. To enable logging, set environment variable XENCONSOLED_TRACE=guest and XENCONSOLED_LOGDIR=, log file will be saved in . Signed-off-by: Chunyan Liu --- hw/xen_console.c | 82

[Qemu-devel] [PATCH V2] Add "tee" option to qemu char device

2011-07-14 Thread Chunyan Liu
Add "tee" backend to char device. It could be used as follows: -serial tee:filepath,pty -chardev tee,tee_fpath=path,tee_backend=pty,,path=path,,[mux=on|off] With "tee" option, "pty" output would be duplicated to filepath. Related thread: http://lists.nongnu.org/archive/html/qemu-devel/2011-

[Qemu-devel] [PATCH] Add -f option to qemu-nbd

2011-11-15 Thread Chunyan Liu
u-nbd to support finding a free nbd device for users. Please review and share your comments. Thanks. Signed-off-by: Chunyan Liu --- qemu-nbd.c | 65 +++- 1 files changed, 64 insertions(+), 1 deletions(-) diff --git a/qemu-nbd.c b/qemu-

Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts

2014-03-23 Thread Chunyan Liu
2014-03-21 20:31 GMT+08:00 Leandro Dorileo : > On Fri, Mar 21, 2014 at 06:09:22PM +0800, Chunyan Liu wrote: > > 2014-03-21 8:07 GMT+08:00 Leandro Dorileo : > > > > > Hi Chunyan, > > > > > > On Mon, Mar 10, 2014 at 03:31:36PM +0800, Chunyan Liu wrot

Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts

2014-03-25 Thread Chunyan Liu
2014-03-24 23:00 GMT+08:00 Leandro Dorileo : > Hi Chunyan, > > On Mon, Mar 24, 2014 at 11:02:14AM +0800, Chunyan Liu wrote: > > 2014-03-21 20:31 GMT+08:00 Leandro Dorileo : > > > > > On Fri, Mar 21, 2014 at 06:09:22PM +0800, Chunyan Liu wrote: > > > >

Re: [Qemu-devel] [PATCH v23 07/32] add qemu_opts_print_help to replace print_option_help

2014-03-25 Thread Chunyan Liu
2014-03-26 4:43 GMT+08:00 Eric Blake : > On 03/21/2014 04:12 AM, Chunyan Liu wrote: > > print_option_help takes QEMUOptionParameter as parameter, add > > qemu_opts_print_help to take QemuOptsList as parameter for later > > replace work. > > > > Signed-off-by

Re: [Qemu-devel] [PATCH v23 08/32] add convert functions between QEMUOptionParameter to QemuOpts

2014-03-25 Thread Chunyan Liu
2014-03-26 5:35 GMT+08:00 Eric Blake : > On 03/21/2014 04:12 AM, Chunyan Liu wrote: > > Add two temp convert functions between QEMUOptionParameter to QemuOpts, > > s/convert/conversion/ here and in subject > > > so that next patch can use it. It will simplify later pat

Re: [Qemu-devel] [PATCH v23 08/32] add convert functions between QEMUOptionParameter to QemuOpts

2014-03-25 Thread Chunyan Liu
2014-03-26 5:35 GMT+08:00 Eric Blake : > On 03/21/2014 04:12 AM, Chunyan Liu wrote: > > Add two temp convert functions between QEMUOptionParameter to QemuOpts, > > s/convert/conversion/ here and in subject > > > so that next patch can use it. It will simplify later pat

Re: [Qemu-devel] [PATCH v23 12/32] qcow2.c: remove 'assigned' check in amend

2014-03-26 Thread Chunyan Liu
2014-03-26 3:25 GMT+08:00 Leandro Dorileo : > On Fri, Mar 21, 2014 at 06:12:23PM +0800, Chunyan Liu wrote: > > In QEMUOptionParameter and QemuOptsList conversion, 'assigned' info > > is lost. In current code, only qcow2 amend uses 'assigned' for a check. > &g

Re: [Qemu-devel] [PATCH v23 00/32] replace QEMUOptionParameter with QemuOpts

2014-03-27 Thread Chunyan Liu
2014-03-26 23:18 GMT+08:00 Stefan Hajnoczi : > On Tue, Mar 25, 2014 at 06:09:40PM +, Leandro Dorileo wrote: > > On Fri, Mar 21, 2014 at 06:12:11PM +0800, Chunyan Liu wrote: > > > This patch series is to replace QEMUOptionParameter with QemuOpts, so > that only > >

Re: [Qemu-devel] [PATCH v23 12/32] qcow2.c: remove 'assigned' check in amend

2014-03-27 Thread Chunyan Liu
2014-03-26 15:37 GMT+08:00 Chunyan Liu : > > > > 2014-03-26 3:25 GMT+08:00 Leandro Dorileo : > > On Fri, Mar 21, 2014 at 06:12:23PM +0800, Chunyan Liu wrote: >> > In QEMUOptionParameter and QemuOptsList conversion, 'assigned' info >> > is lost. In

Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
2014-03-25 15:15 GMT+08:00 Chunyan Liu : > > > > 2014-03-24 23:00 GMT+08:00 Leandro Dorileo : > > Hi Chunyan, >> >> On Mon, Mar 24, 2014 at 11:02:14AM +0800, Chunyan Liu wrote: >> > 2014-03-21 20:31 GMT+08:00 Leandro Dorileo : >> > >> >

[Qemu-devel] [PATCH v24 01/31] QemuOpts: move find_desc_by_name ahead for later calling

2014-04-03 Thread Chunyan Liu
Reviewed-by: Eric Blake Signed-off-by: Chunyan Liu --- util/qemu-option.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/util/qemu-option.c b/util/qemu-option.c index 9d898af..e6d10bc 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c

[Qemu-devel] [PATCH v24 00/31] replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
u_opt_get_*_del, after get option, delete all settings to this option (since in qemu_opt_set, if set option many times, there will be many opts in the list for the same option). * Some other fixes for qemu-iotests * Other fixes to v23 comments Chunyan Liu (31): QemuOpts: move find_de

[Qemu-devel] [PATCH v24 05/31] QemuOpts: move qemu_opt_del ahead for later calling

2014-04-03 Thread Chunyan Liu
In later patch, qemu_opt_get_del functions will be added, they will first get the option value, then call qemu_opt_del to remove the option from opt list. To prepare for that purpose, move qemu_opt_del ahead first. Reviewed-by: Eric Blake Signed-off-by: Chunyan Liu --- util/qemu-option.c | 16

[Qemu-devel] [PATCH v24 09/31] QemuOpts: add qemu_opts_append to replace append_option_parameters

2014-04-03 Thread Chunyan Liu
For later merge .create_opts of drv and proto_drv in qemu-img commands. Reviewed-by: Leandro Dorileo Signed-off-by: Chunyan Liu --- Changes: * some fixes for spelling and space include/qemu/option.h | 5 util/qemu-option.c| 65 +++ 2

[Qemu-devel] [PATCH v24 02/31] QemuOpts: add def_value_str to QemuOptDesc

2014-04-03 Thread Chunyan Liu
Improve qemu_opts_print: if option is set, print opt->str; otherwise, if desc->def_value_str is set, also print it. Reviewed-by: Eric Blake Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- include/qemu/option.h | 3 ++- util/qemu-o

[Qemu-devel] [PATCH v24 03/31] qapi: output def_value_str when query command line options

2014-04-03 Thread Chunyan Liu
Change qapi interfaces to output the newly added def_value_str when querying command line options. Reviewed-by: Eric Blake Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- qapi-schema.json | 6 +- qmp-commands.hx| 2 ++ util/qemu-config.c | 4 3 files changed, 11

[Qemu-devel] [PATCH v24 04/31] QemuOpts: change opt->name|str from (const char *) to (char *)

2014-04-03 Thread Chunyan Liu
truct becomes clearer. Signed-off-by: Chunyan Liu --- Changes: * Add explaination to this change. * Remove extra space before char *name, char *str; include/qemu/option_int.h | 4 ++-- qapi/opts-visitor.c | 10 +++--- util/qemu-option.c| 4 ++-- 3 files changed, 11 insertions(

[Qemu-devel] [PATCH v24 10/31] QemuOpts: check NULL input for qemu_opts_del

2014-04-03 Thread Chunyan Liu
To simplify later using of qemu_opts_del, accept NULL input. Reviewed-by: Eric Blake Signed-off-by: Chunyan Liu --- util/qemu-option.c | 4 1 file changed, 4 insertions(+) diff --git a/util/qemu-option.c b/util/qemu-option.c index c9df671..c4c7545 100644 --- a/util/qemu-option.c +++ b

[Qemu-devel] [PATCH v24 06/31] QemuOpts: add qemu_opt_get_*_del functions for replace work

2014-04-03 Thread Chunyan Liu
t_get returns (const char *), and could not change to (char *), since in one case, it will return desc->def_value_str, which is (const char *). Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- Changes: * Update description. * After qemu_opt_get, delete all opt(s) related to th

[Qemu-devel] [PATCH v24 11/31] qemu_opts_print: change fprintf stderr to printf

2014-04-03 Thread Chunyan Liu
changes, remove last printf and print size/number with opt->value.uint instead of opt->str. Signed-off-by: Chunyan Liu --- Changes: * remove last printf * add printf opt->value.uint for size/number type, keep same with QEMUOptionParameter print. (e.g. 10M printed as 10485760)

[Qemu-devel] [PATCH v24 08/31] QemuOpts: add conversion between QEMUOptionParameter to QemuOpts

2014-04-03 Thread Chunyan Liu
Add two temp conversion functions between QEMUOptionParameter to QemuOpts, so that next patch can use it. It will simplify later patch for easier review. And will be finally removed after all backend drivers switch to QemuOpts. Signed-off-by: Chunyan Liu --- Changes: * fix two dead assignment

[Qemu-devel] [PATCH v24 19/31] qed.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
r. That is, .def_value_str = stringify(QED_DEFAULT_CLUSTER_SIZE), so the QED_DEFAULT_CLUSTER_SIZE could not be a expression. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- Changes: * add explanation to move QED_DEFAULT_CLUSTER_SIZE to define block/q

[Qemu-devel] [PATCH v24 07/31] QemuOpts: add qemu_opts_print_help to replace print_option_help

2014-04-03 Thread Chunyan Liu
print_option_help takes QEMUOptionParameter as parameter, add qemu_opts_print_help to take QemuOptsList as parameter for later replace work. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- Changes: * check non-empty list include/qemu/option.h | 1 + util/qemu-option.c| 13

[Qemu-devel] [PATCH v24 15/31] gluster.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/gluster.c | 81 ++--- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/block/gluster.c b/block/gluster.c

[Qemu-devel] [PATCH v24 13/31] vvfat.c: handle cross_driver's create_options and create_opts

2014-04-03 Thread Chunyan Liu
vvfat shares create options of qcow driver. To avoid vvfat broken when qcow driver changes from QEMUOptionParameter to QemuOpts, let it able to handle both cases. Signed-off-by: Chunyan Liu --- Changes: * Initialize opts and create_opts to NULL block/vvfat.c | 19 ++- 1 file

[Qemu-devel] [PATCH v24 14/31] cow.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/cow.c | 54 ++ 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/block/cow.c b/block/cow.c index 26cf4a5

[Qemu-devel] [PATCH v24 20/31] raw-posix.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/raw-posix.c | 59 +-- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index 1688e16..e72f449

[Qemu-devel] [PATCH v24 29/31] vpc.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vpc.c | 62 + 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index 2e25f57..8ebf424 100644 --- a

[Qemu-devel] [PATCH v24 31/31] QemuOpts: cleanup tmp 'allocated' member from QemuOptsList

2014-04-03 Thread Chunyan Liu
o, we can remove the 'allocated' member from QemuOptsList definition to keep code clean. Signed-off-by: Chunyan Liu --- include/qemu/option.h | 5 - util/qemu-option.c| 26 ++ 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/include/qemu/option.h

[Qemu-devel] [PATCH v24 25/31] ssh.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/ssh.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index aa63c9d..3a5eead 100644 --- a/block/ssh.c +++ b/block/ssh.c

[Qemu-devel] [PATCH v24 26/31] vdi.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vdi.c | 73 + 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index 820cd37..950cf46 100644 --- a/block/vdi.c +++ b/block/vdi.c

[Qemu-devel] [PATCH v24 22/31] raw_bsd.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/raw_bsd.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index 9ae5fc2..ee797fd 100644 --- a/block/raw_bsd.c +++ b

[Qemu-devel] [PATCH v24 28/31] vmdk.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vmdk.c | 123 ++- 1 file changed, 63 insertions(+), 60 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index d87c8f6..f9b68a0 100644

[Qemu-devel] [PATCH v24 21/31] raw-win32.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/raw-win32.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/block/raw-win32.c b/block/raw-win32.c index 48cb2c2..b00d7fc 100644 --- a/block

[Qemu-devel] [PATCH v24 17/31] qcow.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/qcow.c | 72 ++-- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 9411aef..b4ce133 100644

[Qemu-devel] [PATCH v24 24/31] sheepdog.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/sheepdog.c | 108 --- 1 file changed, 55 insertions(+), 53 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 0eb33ee..9f280f6

[Qemu-devel] [PATCH v24 27/31] vhdx.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vhdx.c | 99 +--- block/vhdx.h | 1 + 2 files changed, 48 insertions(+), 52 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index

[Qemu-devel] [PATCH v24 30/31] cleanup QEMUOptionParameter

2014-04-03 Thread Chunyan Liu
Now that all backend drivers are using QemuOpts, remove all QEMUOptionParameter related codes. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block.c | 85 ++--- block/cow.c | 4 +- block/gluster.c | 8 +- block/iscsi.c

[Qemu-devel] [PATCH v24 18/31] qcow2.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- Changes: * Use qemu_opt_find to judge if the option is set explicitly, replace .assinged check in QEMUOptionParameter * In qcow2_amend_options, use qemu_opt_get instead of qemu_opt_get_*_del block/qcow2.c | 264

[Qemu-devel] [PATCH v24 16/31] iscsi.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/iscsi.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index b490e98..9572cd3 100644 --- a/block/iscsi.c +++ b

[Qemu-devel] [PATCH v24 23/31] rbd.c: replace QEMUOptionParameter with QemuOpts

2014-04-03 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/rbd.c | 63 + 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index dbc79f4..f878877 100644 --- a

[Qemu-devel] [PATCH v24 12/31] change block layer to support both QemuOpts and QEMUOptionParamter

2014-04-03 Thread Chunyan Liu
Change block layer to support both QemuOpts and QEMUOptionParameter. After this patch, it will change backend drivers one by one. At the end, QEMUOptionParameter will be removed and only QemuOpts is kept. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block.c

Re: [Qemu-devel] [PATCH v24 00/31] replace QEMUOptionParameter with QemuOpts

2014-04-09 Thread Chunyan Liu
2014-04-08 9:12 GMT+08:00 Leandro Dorileo : > On Thu, Apr 03, 2014 at 05:54:18PM +0800, Chunyan Liu wrote: > > This patch series is to replace QEMUOptionParameter with QemuOpts, so > that only > > one Qemu Option structure is kept in QEMU code. > > > > --- >

Re: [Qemu-devel] [PATCH v24 02/31] QemuOpts: add def_value_str to QemuOptDesc

2014-04-09 Thread Chunyan Liu
2014-04-08 9:31 GMT+08:00 Leandro Dorileo : > On Thu, Apr 03, 2014 at 05:54:20PM +0800, Chunyan Liu wrote: > > Add def_value_str (default value) to QemuOptDesc, to replace function of > the > > default value in QEMUOptionParameter. > > > > Improve qemu_opts_get_*

[Qemu-devel] [PATCH v25 01/31] QemuOpts: move find_desc_by_name ahead for later calling

2014-04-10 Thread Chunyan Liu
Reviewed-by: Leandro Dorileo Reviewed-by: Eric Blake Signed-off-by: Chunyan Liu --- util/qemu-option.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/util/qemu-option.c b/util/qemu-option.c index 9d898af..e6d10bc 100644 --- a/util/qemu

[Qemu-devel] [PATCH v25 02/31] QemuOpts: add def_value_str to QemuOptDesc

2014-04-10 Thread Chunyan Liu
viewed-by: Eric Blake Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- changes: * Following Leandro's comment: merge v24 0002-QemuOpts-add-def_value_str-to-QemuOptDesc.patch and v24 0011-qemu_opts_print-change-fprintf-stderr-to-printf.patch into one. include/qemu/option.h

[Qemu-devel] [PATCH v25 04/31] QemuOpts: change opt->name|str from (const char *) to (char *)

2014-04-10 Thread Chunyan Liu
truct becomes clearer. Reviewed-by: Leandro Dorileo Signed-off-by: Chunyan Liu --- include/qemu/option_int.h | 4 ++-- qapi/opts-visitor.c | 10 +++--- util/qemu-option.c| 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/qemu/option_int.h b/include

[Qemu-devel] [PATCH v25 05/31] QemuOpts: move qemu_opt_del ahead for later calling

2014-04-10 Thread Chunyan Liu
In later patch, qemu_opt_get_del functions will be added, they will first get the option value, then call qemu_opt_del to remove the option from opt list. To prepare for that purpose, move qemu_opt_del ahead first. Reviewed-by: Leandro Dorileo Reviewed-by: Eric Blake Signed-off-by: Chunyan Liu

[Qemu-devel] [PATCH v25 03/31] qapi: output def_value_str when query command line options

2014-04-10 Thread Chunyan Liu
Change qapi interfaces to output the newly added def_value_str when querying command line options. Reviewed-by: Eric Blake Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- changes: * Following Leandro's comment: update description of @default qapi-schema.json

[Qemu-devel] [PATCH v25 08/31] QemuOpts: add conversion between QEMUOptionParameter to QemuOpts

2014-04-10 Thread Chunyan Liu
Add two temp conversion functions between QEMUOptionParameter to QemuOpts, so that next patch can use it. It will simplify later patch for easier review. And will be finally removed after all backend drivers switch to QemuOpts. Signed-off-by: Chunyan Liu --- include/qemu/option.h | 8

[Qemu-devel] [PATCH v25 09/31] QemuOpts: add qemu_opts_append to replace append_option_parameters

2014-04-10 Thread Chunyan Liu
For later merge .create_opts of drv and proto_drv in qemu-img commands. Reviewed-by: Leandro Dorileo Signed-off-by: Chunyan Liu --- include/qemu/option.h | 5 util/qemu-option.c| 65 +++ 2 files changed, 70 insertions(+) diff --git a

[Qemu-devel] [PATCH v25 00/31] replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
b.com/chunyanliu/qemu/commits/QemuOpts Chunyan Liu (31): QemuOpts: move find_desc_by_name ahead for later calling QemuOpts: add def_value_str to QemuOptDesc qapi: output def_value_str when query command line options QemuOpts: change opt->name|str from (const char *) to (char *) QemuOp

[Qemu-devel] [PATCH v25 06/31] QemuOpts: add qemu_opt_get_*_del functions for replace work

2014-04-10 Thread Chunyan Liu
t_get returns (const char *), and could not change to (char *), since in one case, it will return desc->def_value_str, which is (const char *). Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- include/qemu/option.h | 6 +++ util/qemu-option.c

[Qemu-devel] [PATCH v25 13/31] cow.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/cow.c | 54 ++ 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/block/cow.c b/block/cow.c index 26cf4a5

[Qemu-devel] [PATCH v25 20/31] raw-posix.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/raw-posix.c | 59 +-- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index 1688e16..e72f449

[Qemu-devel] [PATCH v25 07/31] QemuOpts: add qemu_opts_print_help to replace print_option_help

2014-04-10 Thread Chunyan Liu
print_option_help takes QEMUOptionParameter as parameter, add qemu_opts_print_help to take QemuOptsList as parameter for later replace work. Reviewed-by: Leandro Dorileo Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- include/qemu/option.h | 1 + util/qemu-option.c| 13

[Qemu-devel] [PATCH v25 10/31] QemuOpts: check NULL input for qemu_opts_del

2014-04-10 Thread Chunyan Liu
To simplify later using of qemu_opts_del, accept NULL input. Reviewed-by: Eric Blake Signed-off-by: Chunyan Liu --- util/qemu-option.c | 4 1 file changed, 4 insertions(+) diff --git a/util/qemu-option.c b/util/qemu-option.c index d1e4d94..6222cd6 100644 --- a/util/qemu-option.c +++ b

[Qemu-devel] [PATCH v25 22/31] raw_bsd.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/raw_bsd.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index 9ae5fc2..ee797fd 100644 --- a/block/raw_bsd.c +++ b

[Qemu-devel] [PATCH v25 11/31] change block layer to support both QemuOpts and QEMUOptionParamter

2014-04-10 Thread Chunyan Liu
Change block layer to support both QemuOpts and QEMUOptionParameter. After this patch, it will change backend drivers one by one. At the end, QEMUOptionParameter will be removed and only QemuOpts is kept. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block.c

[Qemu-devel] [PATCH v25 15/31] iscsi.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/iscsi.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 64a509f..8544281 100644 --- a/block/iscsi.c +++ b

[Qemu-devel] [PATCH v25 23/31] rbd.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/rbd.c | 63 + 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index dbc79f4..f878877 100644 --- a

[Qemu-devel] [PATCH v25 17/31] qcow.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/qcow.c | 72 ++-- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 9411aef..b4ce133 100644

[Qemu-devel] [PATCH v25 14/31] gluster.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/gluster.c | 81 ++--- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/block/gluster.c b/block/gluster.c

[Qemu-devel] [PATCH v25 12/31] vvfat.c: handle cross_driver's create_options and create_opts

2014-04-10 Thread Chunyan Liu
vvfat shares create options of qcow driver. To avoid vvfat broken when qcow driver changes from QEMUOptionParameter to QemuOpts, let it able to handle both cases. Signed-off-by: Chunyan Liu --- block/vvfat.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PATCH v25 19/31] qed.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
r. That is, .def_value_str = stringify(QED_DEFAULT_CLUSTER_SIZE), so the QED_DEFAULT_CLUSTER_SIZE could not be a expression. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/qed.c | 114 block/qed.h | 3 +- 2 files changed, 61

[Qemu-devel] [PATCH v25 26/31] vdi.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vdi.c | 73 + 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index 820cd37..950cf46 100644 --- a/block/vdi.c +++ b/block/vdi.c

[Qemu-devel] [PATCH v25 16/31] nfs.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Signed-off-by: Chunyan Liu --- block/nfs.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 98aa363..664ceeb 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -357,20 +357,14 @@ static int nfs_file_open(BlockDriverState *bs, QDict

[Qemu-devel] [PATCH v25 28/31] vmdk.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vmdk.c | 123 ++- 1 file changed, 63 insertions(+), 60 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index d87c8f6..f9b68a0 100644

[Qemu-devel] [PATCH v25 24/31] sheepdog.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/sheepdog.c | 108 --- 1 file changed, 55 insertions(+), 53 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 0eb33ee..9f280f6

[Qemu-devel] [PATCH v25 18/31] qcow2.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/qcow2.c | 265 +++--- include/qemu/option.h | 1 + util/qemu-option.c| 2 +- 3 files changed, 143 insertions(+), 125 deletions(-) diff --git a/block/qcow2.c b/block

[Qemu-devel] [PATCH v25 29/31] vpc.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vpc.c | 62 + 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index 2e25f57..8ebf424 100644 --- a

[Qemu-devel] [PATCH v25 21/31] raw-win32.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/raw-win32.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/block/raw-win32.c b/block/raw-win32.c index 48cb2c2..b00d7fc 100644 --- a/block

[Qemu-devel] [PATCH v25 27/31] vhdx.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vhdx.c | 99 +--- block/vhdx.h | 1 + 2 files changed, 48 insertions(+), 52 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index

[Qemu-devel] [PATCH v25 30/31] cleanup QEMUOptionParameter

2014-04-10 Thread Chunyan Liu
Now that all backend drivers are using QemuOpts, remove all QEMUOptionParameter related codes. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block.c | 86 ++ block/cow.c | 4 +- block/gluster.c | 8 +- block/iscsi.c

[Qemu-devel] [PATCH v25 25/31] ssh.c: replace QEMUOptionParameter with QemuOpts

2014-04-10 Thread Chunyan Liu
Reviewed-by: Stefan Hajnoczi Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/ssh.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index aa63c9d..3a5eead 100644 --- a/block/ssh.c +++ b/block/ssh.c

[Qemu-devel] [PATCH v25 31/31] QemuOpts: cleanup tmp 'allocated' member from QemuOptsList

2014-04-10 Thread Chunyan Liu
o, we can remove the 'allocated' member from QemuOptsList definition to keep code clean. Signed-off-by: Chunyan Liu --- include/qemu/option.h | 5 - util/qemu-option.c| 26 ++ 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/include/qemu/option.h

[Qemu-devel] [v19 01/25] add def_value_str to QemuOptDesc

2014-01-20 Thread Chunyan Liu
Add def_value_str (default value) to QemuOptDesc, to replace function of the default value in QEMUOptionParameter. And improved related functions. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- include/qemu/option.h |3 +- util/qemu-option.c| 76

[Qemu-devel] [v19 02/25] qapi: output def_value_str when query command line options

2014-01-20 Thread Chunyan Liu
Change qapi interfaces to output the newly added def_value_str when query command line options. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- qapi-schema.json |8 ++-- qmp-commands.hx|2 ++ util/qemu-config.c |4 3 files changed, 12 insertions(+), 2

[Qemu-devel] [v19 03/25] improve some functions in qemu-option.c

2014-01-20 Thread Chunyan Liu
Improve opt_get and opt_set group of functions. For opt_get, check and handle NUlL input; for opt_set, when set to an existing option, rewrite the option with new value. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- util/qemu-option.c | 80

[Qemu-devel] [v19 06/25] cow.c: replace QEMUOptionParameter with QemuOpts

2014-01-20 Thread Chunyan Liu
cow.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/cow.c | 46 ++ 1 files changed, 22 insertions(+), 24 deletions(-) diff --git a/block/cow.c b/block/cow.c index 6318228..6688a87

  1   2   3   4   5   >