qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 07/10] spice: add keyboard


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH v3 07/10] spice: add keyboard
Date: Thu, 26 Aug 2010 07:55:50 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Lightning/1.0b1 Thunderbird/3.0.6

On 08/26/2010 01:55 AM, Gerd Hoffmann wrote:
  Hi,

+
+ qemu_spice_input_init();

Why not pass spice_server to qemu_spice_input_init() and avoid the global?


We need the global anyway for the guest devices (not yet in this series). They are created using -device. Thus the initialization functions are not called from spice code and we can't simply pass a reference to spice_server.

Let's avoid it where we can and we'll do what we need to do for the guest devices.

In general, for the cases that we truly need a global, I'd prefer getting to it via a function instead of having a non-static variable.

Regards,

Anthony Liguori


cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]