[Spice-devel] vdagent: Mark vdagent and vdagentd functions static
Pavel Grunt
pgrunt at redhat.com
Mon Jan 4 04:42:20 PST 2016
Acked-by: Pavel Grunt <pgrunt at redhat.com>
Thanks,
Pavel
On Mon, 2015-12-28 at 14:12 +0100, Francois Gouget wrote:
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
> src/vdagent-file-xfers.c | 2 +-
> src/vdagent.c | 8 ++++----
> src/vdagentd.c | 20 ++++++++++----------
> 3 files changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/src/vdagent-file-xfers.c b/src/vdagent-file-xfers.c
> index 0dc549b..82691c3 100644
> --- a/src/vdagent-file-xfers.c
> +++ b/src/vdagent-file-xfers.c
> @@ -104,7 +104,7 @@ void vdagent_file_xfers_destroy(struct
> vdagent_file_xfers *xfers)
> g_free(xfers);
> }
>
> -AgentFileXferTask *vdagent_file_xfers_get_task(
> +static AgentFileXferTask *vdagent_file_xfers_get_task(
> struct vdagent_file_xfers *xfers, uint32_t id)
> {
> AgentFileXferTask *task;
> diff --git a/src/vdagent.c b/src/vdagent.c
> index d3ca0c3..4bda38c 100644
> --- a/src/vdagent.c
> +++ b/src/vdagent.c
> @@ -55,7 +55,7 @@ static struct udscs_connection *client = NULL;
> static int quit = 0;
> static int version_mismatch = 0;
>
> -void daemon_read_complete(struct udscs_connection **connp,
> +static void daemon_read_complete(struct udscs_connection **connp,
> struct udscs_message_header *header, uint8_t *data)
> {
> switch (header->type) {
> @@ -145,7 +145,7 @@ void daemon_read_complete(struct udscs_connection
> **connp,
> }
> }
>
> -int client_setup(int reconnect)
> +static int client_setup(int reconnect)
> {
> while (!quit) {
> client = udscs_connect(vdagentd_socket,
> daemon_read_complete, NULL,
> @@ -185,7 +185,7 @@ static void quit_handler(int sig)
> to 10 seconds to get an 'all clear' from the child
> before we exit. If we don't, we're able to exit with a
> status that indicates an error occured */
> -void wait_and_exit(int s)
> +static void wait_and_exit(int s)
> {
> char buf[4];
> struct pollfd p;
> @@ -199,7 +199,7 @@ void wait_and_exit(int s)
> exit(1);
> }
>
> -int daemonize(void)
> +static int daemonize(void)
> {
> int x;
> int fd[2];
> diff --git a/src/vdagentd.c b/src/vdagentd.c
> index 8f7ab85..a493baf 100644
> --- a/src/vdagentd.c
> +++ b/src/vdagentd.c
> @@ -307,7 +307,7 @@ static void do_client_file_xfer(struct
> vdagent_virtio_port *vport,
> udscs_write(conn, msg_type, 0, 0, data, message_header->size);
> }
>
> -int virtio_port_read_complete(
> +static int virtio_port_read_complete(
> struct vdagent_virtio_port *vport,
> int port_nr,
> VDAgentMessage *message_header,
> @@ -442,7 +442,7 @@ static void virtio_write_clipboard(uint8_t
> selection, uint32_t msg_type,
> }
>
> /* vdagentd <-> vdagent communication handling */
> -int do_agent_clipboard(struct udscs_connection *conn,
> +static int do_agent_clipboard(struct udscs_connection *conn,
> struct udscs_message_header *header, const uint8_t *data)
> {
> uint8_t selection = header->arg1;
> @@ -594,7 +594,7 @@ static int
> connection_matches_active_session(struct udscs_connection **connp,
> return 1;
> }
>
> -void release_clipboards(void)
> +static void release_clipboards(void)
> {
> uint8_t sel;
>
> @@ -607,7 +607,7 @@ void release_clipboards(void)
> }
> }
>
> -void update_active_session_connection(struct udscs_connection
> *new_conn)
> +static void update_active_session_connection(struct udscs_connection
> *new_conn)
> {
> if (session_info) {
> new_conn = NULL;
> @@ -645,7 +645,7 @@ void update_active_session_connection(struct
> udscs_connection *new_conn)
> check_xorg_resolution();
> }
>
> -gboolean remove_active_xfers(gpointer key, gpointer value, gpointer
> conn)
> +static gboolean remove_active_xfers(gpointer key, gpointer value,
> gpointer conn)
> {
> if (value == conn) {
> cancel_file_xfer(virtio_port, "Agent disc; cancelling file-
> xfer %u",
> @@ -655,7 +655,7 @@ gboolean remove_active_xfers(gpointer key,
> gpointer value, gpointer conn)
> return 0;
> }
>
> -void agent_connect(struct udscs_connection *conn)
> +static void agent_connect(struct udscs_connection *conn)
> {
> struct agent_data *agent_data;
>
> @@ -677,7 +677,7 @@ void agent_connect(struct udscs_connection *conn)
> update_active_session_connection(conn);
> }
>
> -void agent_disconnect(struct udscs_connection *conn)
> +static void agent_disconnect(struct udscs_connection *conn)
> {
> struct agent_data *agent_data = udscs_get_user_data(conn);
>
> @@ -691,7 +691,7 @@ void agent_disconnect(struct udscs_connection
> *conn)
> free(agent_data);
> }
>
> -void agent_read_complete(struct udscs_connection **connp,
> +static void agent_read_complete(struct udscs_connection **connp,
> struct udscs_message_header *header, uint8_t *data)
> {
> struct agent_data *agent_data = udscs_get_user_data(*connp);
> @@ -791,7 +791,7 @@ static void usage(FILE *fp)
> ,VERSION, portdev, vdagentd_socket, uinput_device);
> }
>
> -void daemonize(void)
> +static void daemonize(void)
> {
> int x;
> FILE *pidfile;
> @@ -817,7 +817,7 @@ void daemonize(void)
> }
> }
>
> -void main_loop(void)
> +static void main_loop(void)
> {
> fd_set readfds, writefds;
> int n, nfds;
More information about the Spice-devel
mailing list