[Spice-devel] [PATCH linux/vd-agent 07/11] vdagent: use G_OPTION_FLAG_NONE

marcandre.lureau at redhat.com marcandre.lureau at redhat.com
Fri Mar 22 15:12:42 UTC 2019


From: Marc-André Lureau <marcandre.lureau at redhat.com>

Improve readability a bit, reindent slightly.

Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
 src/vdagent/vdagent.c | 37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/src/vdagent/vdagent.c b/src/vdagent/vdagent.c
index 13ef29f..61aeac7 100644
--- a/src/vdagent/vdagent.c
+++ b/src/vdagent/vdagent.c
@@ -66,25 +66,32 @@ static gchar *portdev = NULL;
 static gchar *vdagentd_socket = NULL;
 
 static GOptionEntry entries[] = {
-    { "debug", 'd', 0,
-       G_OPTION_ARG_NONE, &debug,
-       "Enable debug", NULL },
-    { "virtio-serial-port-path", 's', 0,
+    { "debug", 'd',
+      G_OPTION_FLAG_NONE,
+      G_OPTION_ARG_NONE, &debug,
+      "Enable debug", NULL },
+    { "virtio-serial-port-path", 's',
+      G_OPTION_FLAG_NONE,
       G_OPTION_ARG_STRING, &portdev,
       "Set virtio-serial path ("  DEFAULT_VIRTIO_PORT_PATH ")", NULL },
-    { "vdagentd-socket", 'S', 0, G_OPTION_ARG_STRING,
-       &vdagentd_socket,
-       "Set spice-vdagentd socket (" VDAGENTD_SOCKET ")", NULL },
-    { "foreground", 'x', G_OPTION_FLAG_REVERSE,
-       G_OPTION_ARG_NONE, &do_daemonize,
-       "Do not daemonize the agent", NULL },
-    { "file-xfer-save-dir", 'f', 0,
+    { "vdagentd-socket", 'S',
+      G_OPTION_FLAG_NONE,
+      G_OPTION_ARG_STRING, &vdagentd_socket,
+      "Set spice-vdagentd socket (" VDAGENTD_SOCKET ")", NULL },
+    { "foreground", 'x',
+      G_OPTION_FLAG_REVERSE,
+      G_OPTION_ARG_NONE, &do_daemonize,
+      "Do not daemonize the agent", NULL },
+    { "file-xfer-save-dir", 'f',
+      G_OPTION_FLAG_NONE,
       G_OPTION_ARG_STRING, &fx_dir,
       "Set directory to file transfers files", "<dir|xdg-desktop|xdg-download>"},
-    { "file-xfer-open-dir", 'o', 0,
-       G_OPTION_ARG_INT, &fx_open_dir,
-       "Open directory after completing file transfer", "<0|1>" },
-    { "x11-abort-on-error", 'y', G_OPTION_FLAG_HIDDEN,
+    { "file-xfer-open-dir", 'o',
+      G_OPTION_FLAG_NONE,
+      G_OPTION_ARG_INT, &fx_open_dir,
+      "Open directory after completing file transfer", "<0|1>" },
+    { "x11-abort-on-error", 'y',
+      G_OPTION_FLAG_HIDDEN,
       G_OPTION_ARG_NONE, &x11_sync,
       "Aborts on errors from X11", NULL },
     { NULL }
-- 
2.21.0.4.g36eb1cb9cf



More information about the Spice-devel mailing list