[Spice-devel] [PATCH vdagent-linux 1/4] vdagent: add option to change vdagentd socket
Hans de Goede
hdegoede at redhat.com
Mon Sep 2 08:06:32 PDT 2013
ACK.
On 09/02/2013 05:02 PM, Alon Levy wrote:
> Signed-off-by: Alon Levy <alevy at redhat.com>
> ---
> src/vdagent.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/src/vdagent.c b/src/vdagent.c
> index 10ebf6e..f270615 100644
> --- a/src/vdagent.c
> +++ b/src/vdagent.c
> @@ -43,6 +43,7 @@
> #include "vdagent-file-xfers.h"
>
> static const char *portdev = "/dev/virtio-ports/com.redhat.spice.0";
> +static const char *vdagentd_socket = VDAGENTD_SOCKET;
> static int debug = 0;
> static const char *fx_dir = NULL;
> static int fx_open_dir = -1;
> @@ -117,7 +118,7 @@ void daemon_read_complete(struct udscs_connection **connp,
> int client_setup(int reconnect)
> {
> while (!quit) {
> - client = udscs_connect(VDAGENTD_SOCKET, daemon_read_complete, NULL,
> + client = udscs_connect(vdagentd_socket, daemon_read_complete, NULL,
> vdagentd_messages, VDAGENTD_NO_MESSAGES,
> debug);
> if (client || !reconnect || quit) {
> @@ -137,6 +138,7 @@ static void usage(FILE *fp)
> " -h print this text\n"
> " -d log debug messages\n"
> " -s <port> set virtio serial port\n"
> + " -S <filename> set udcs socket\n"
> " -x don't daemonize\n"
> " -f <dir|xdg-desktop|xdg-download> file xfer save dir\n"
> " -o <0|1> open dir on file xfer completion\n",
> @@ -183,7 +185,7 @@ int main(int argc, char *argv[])
> struct sigaction act;
>
> for (;;) {
> - if (-1 == (c = getopt(argc, argv, "-dxhys:f:o:")))
> + if (-1 == (c = getopt(argc, argv, "-dxhys:f:o:S:")))
> break;
> switch (c) {
> case 'd':
> @@ -207,6 +209,9 @@ int main(int argc, char *argv[])
> case 'o':
> fx_open_dir = atoi(optarg);
> break;
> + case 'S':
> + vdagentd_socket = optarg;
> + break;
> default:
> fputs("\n", stderr);
> usage(stderr);
>
More information about the Spice-devel
mailing list