]> git.proxmox.com Git - mirror_qemu.git/commit - qapi/opts-visitor.c
QemuOpts: change opt->name|str from (const char *) to (char *)
authorChunyan Liu <cyliu@suse.com>
Thu, 5 Jun 2014 09:20:44 +0000 (17:20 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 16 Jun 2014 09:23:20 +0000 (17:23 +0800)
commitdc8622f2bf9174cd42932ad86bcc98c6f7c98832
tree14e4d35b5b4bd428a0c0206d8200c31314f5fe7e
parente36af94f868fe5b897c4903126e11fdf25fa4739
QemuOpts: change opt->name|str from (const char *) to (char *)

qemu_opt_del() already assumes that all QemuOpt instances contain
malloc'd name and value; but it had to cast away const because
opts_start_struct() was doing its own thing and using static storage
instead.  By using the correct type and malloced strings everywhere, the
usage of this struct becomes clearer.

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Leandro Dorileo <l@dorileo.org>
Signed-off-by: Chunyan Liu <cyliu@suse.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
include/qemu/option_int.h
qapi/opts-visitor.c
util/qemu-option.c