OSDN Git Service

Never overwrite a QemuOpt
authorMark McLoughlin <markmc@redhat.com>
Tue, 6 Oct 2009 11:17:04 +0000 (12:17 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 6 Oct 2009 19:36:11 +0000 (14:36 -0500)
commitdc9ca4ba27be4fe6a0284061b8f056c4364fb0d9
treebe8bc7fbdb8090b89e1b0e3b3b7fdf5cc0d1506f
parent5dc519ef9207bd7d209c31cf885a6c849c615f98
Never overwrite a QemuOpt

Rather than overwriting a QemuOpt, just add a new one to the tail and
always do a reverse search for parameters to preserve the same
behaviour. We use this order so that foreach() iterates over the opts
in their original order.

This will allow us handle options where multiple values for the same
parameter is allowed - e.g. -net user,hostfwd=

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-option.c