[libvirt] [PATCH 1/3] qemu: refactor: use switch for enum in qemuProcessGraphicsReservePorts

Nikolay Shirokovskiy nshirokovskiy at virtuozzo.com
Thu Dec 8 13:48:00 UTC 2016

On 08.12.2016 16:21, John Ferlan wrote:
> On 11/22/2016 06:09 AM, Nikolay Shirokovskiy wrote:
>> ---
>>  src/qemu/qemu_process.c | 30 +++++++++++++++++++++---------
>>  1 file changed, 21 insertions(+), 9 deletions(-)
> ACK - although I'll reword commit a bit:
>     qemu: Refactor qemuProcessGraphicsReservePorts
>     Use switch for enums rather than if/else conditions.


> FWIW: After reading patch 2, why not alter the code in qemuProcessStop
> in order to have a switch too?  In fact that code could be split out
> into a qemuProcessGraphicsUnreservePorts function.  If you want to make
> a v2 to do then, then let me know.

I'd better offload the change you suggest to a different series/patch.

This patch on the other hand is correlated with next one - you can not add extra vnc logic
to qemuProcessGraphicsReservePorts without changing its overall control flow.
So does this patch.


More information about the libvir-list mailing list