[Spice-devel] [PATCH 02/11] Rename SpiceCharDeviceCallbacks to RedCharDeviceCallbacks

Pavel Grunt pgrunt at redhat.com
Fri Apr 1 13:23:29 UTC 2016


On Fri, 2016-04-01 at 13:37 +0100, Frediano Ziglio wrote:
> The structure is an internal one so should not have the Spice prefix
> but use the Red one.
Acked-by: Pavel Grunt <pgrunt at redhat.com>
> ---
>  server/char-device.c | 4 ++--
>  server/char-device.h | 6 +++---
>  server/reds.c        | 2 +-
>  server/smartcard.c   | 2 +-
>  server/spicevmc.c    | 2 +-
>  5 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/server/char-device.c b/server/char-device.c
> index 22f2de2..4b15217 100644
> --- a/server/char-device.c
> +++ b/server/char-device.c
> @@ -69,7 +69,7 @@ struct RedCharDevicePrivate {
>      int during_read_from_device;
>      int during_write_to_device;
>  
> -    SpiceCharDeviceCallbacks cbs;
> +    RedCharDeviceCallbacks cbs;
>      void *opaque;
>      SpiceServer *reds;
>  };
> @@ -724,7 +724,7 @@ RedCharDevice
> *red_char_device_create(SpiceCharDeviceInstance *sin,
>                                        RedsState *reds,
>                                        uint32_t
> client_tokens_interval,
>                                        uint32_t self_tokens,
> -                                      SpiceCharDeviceCallbacks *cbs,
> +                                      RedCharDeviceCallbacks *cbs,
>                                        void *opaque)
>  {
>      RedCharDevice *char_dev;
> diff --git a/server/char-device.h b/server/char-device.h
> index b0efa1f..831631b 100644
> --- a/server/char-device.h
> +++ b/server/char-device.h
> @@ -99,7 +99,7 @@ typedef struct RedCharDeviceWriteBuffer {
>  
>  typedef void RedCharDeviceMsgToClient;
>  
> -typedef struct SpiceCharDeviceCallbacks {
> +typedef struct RedCharDeviceCallbacks {
>      /*
>       * Messages that are addressed to the client can be queued in
> case we have
>       * multiple clients and some of them don't have enough tokens.
> @@ -129,13 +129,13 @@ typedef struct SpiceCharDeviceCallbacks {
>       * due to slow flow or due to some other error.
>       * The called instance should disconnect the client, or at least
> the corresponding channel */
>      void (*remove_client)(RedClient *client, void *opaque);
> -} SpiceCharDeviceCallbacks;
> +} RedCharDeviceCallbacks;
>  
>  RedCharDevice *red_char_device_create(SpiceCharDeviceInstance *sin,
>                                        struct RedsState *reds,
>                                        uint32_t
> client_tokens_interval,
>                                        uint32_t self_tokens,
> -                                      SpiceCharDeviceCallbacks *cbs,
> +                                      RedCharDeviceCallbacks *cbs,
>                                        void *opaque);
>  
>  void red_char_device_reset_dev_instance(RedCharDevice *dev,
> diff --git a/server/reds.c b/server/reds.c
> index d913539..03bc207 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -2972,7 +2972,7 @@ static RedCharDevice
> *attach_to_red_agent(RedsState *reds, SpiceCharDeviceInstan
>  {
>      VDIPortState *state = &reds->agent_state;
>      SpiceCharDeviceInterface *sif;
> -    SpiceCharDeviceCallbacks char_dev_state_cbs;
> +    RedCharDeviceCallbacks char_dev_state_cbs;
>  
>      if (!state->base) {
>          char_dev_state_cbs.read_one_msg_from_device =
> vdi_port_read_one_msg_from_device;
> diff --git a/server/smartcard.c b/server/smartcard.c
> index b3261d8..03782e2 100644
> --- a/server/smartcard.c
> +++ b/server/smartcard.c
> @@ -276,7 +276,7 @@ static SpiceCharDeviceInstance
> *smartcard_readers_get_unattached(void)
>  static SmartCardDeviceState *smartcard_device_state_new(RedsState
> *reds, SpiceCharDeviceInstance *sin)
>  {
>      SmartCardDeviceState *st;
> -    SpiceCharDeviceCallbacks chardev_cbs = { NULL, };
> +    RedCharDeviceCallbacks chardev_cbs = { NULL, };
>  
>      chardev_cbs.read_one_msg_from_device =
> smartcard_read_msg_from_device;
>      chardev_cbs.ref_msg_to_client = smartcard_ref_msg_to_client;
> diff --git a/server/spicevmc.c b/server/spicevmc.c
> index d1e8222..3d5baea 100644
> --- a/server/spicevmc.c
> +++ b/server/spicevmc.c
> @@ -507,7 +507,7 @@ RedCharDevice *spicevmc_device_connect(RedsState
> *reds,
>      SpiceVmcState *state;
>      ChannelCbs channel_cbs = { NULL, };
>      ClientCbs client_cbs = { NULL, };
> -    SpiceCharDeviceCallbacks char_dev_cbs = {NULL, };
> +    RedCharDeviceCallbacks char_dev_cbs = {NULL, };
>  
>      channel_cbs.config_socket =
> spicevmc_red_channel_client_config_socket;
>      channel_cbs.on_disconnect =
> spicevmc_red_channel_client_on_disconnect;


More information about the Spice-devel mailing list