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

[Xen-changelog] [xen-unstable] xl: code motion of vncviewer() and `struct domain_create`


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Fri, 18 May 2012 17:11:09 +0000
  • Delivery-date: Fri, 18 May 2012 17:11:17 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Goncalo Gomes <Goncalo.Gomes@xxxxxxxxxxxxx>
# Date 1337092912 -3600
# Node ID 0768e0afdc6b191bd90f22f7e4f2109f968e2103
# Parent  7fb7341085e4fa08e3d14c0fcf1a501e4e6bbff6
xl: code motion of vncviewer() and `struct domain_create`

Signed-off-by: Goncalo Gomes <Goncalo.Gomes@xxxxxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r 7fb7341085e4 -r 0768e0afdc6b tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Tue May 15 15:41:52 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Tue May 15 15:41:52 2012 +0100
@@ -122,6 +122,24 @@ static const char *action_on_shutdown_na
 
 #define SAVEFILE_BYTEORDER_VALUE ((uint32_t)0x01020304UL)
 
+struct domain_create {
+    int debug;
+    int daemonize;
+    int monitor; /* handle guest reboots etc */
+    int paused;
+    int dryrun;
+    int quiet;
+    int console_autoconnect;
+    const char *config_file;
+    const char *extra_config; /* extra config string */
+    const char *restore_file;
+    int migrate_fd; /* -1 means none */
+    char **migration_domname_r; /* from malloc */
+    int incr_generationid;
+};
+
+
+
 static int qualifier_to_id(const char *p, uint32_t *id_r)
 {
     int i, alldigit;
@@ -188,6 +206,14 @@ static void find_domain(const char *p)
     common_domname = was_name ? p : libxl_domid_to_name(ctx, domid);
 }
 
+static int vncviewer(const char *domain_spec, int autopass)
+{
+    find_domain(domain_spec);
+    libxl_vncviewer_exec(ctx, domid, autopass);
+    fprintf(stderr, "Unable to execute vncviewer\n");
+    return 1;
+}
+
 static int acquire_lock(void)
 {
     int rc;
@@ -1418,22 +1444,6 @@ static int preserve_domain(libxl_ctx *ct
     return rc == 0 ? 1 : 0;
 }
 
-struct domain_create {
-    int debug;
-    int daemonize;
-    int monitor; /* handle guest reboots etc */
-    int paused;
-    int dryrun;
-    int quiet;
-    int console_autoconnect;
-    const char *config_file;
-    const char *extra_config; /* extra config string */
-    const char *restore_file;
-    int migrate_fd; /* -1 means none */
-    char **migration_domname_r; /* from malloc */
-    int incr_generationid;
-};
-
 static int freemem(libxl_domain_build_info *b_info)
 {
     int rc, retries = 3;
@@ -2220,14 +2230,6 @@ int main_console(int argc, char **argv)
     return 1;
 }
 
-static int vncviewer(const char *domain_spec, int autopass)
-{
-    find_domain(domain_spec);
-    libxl_vncviewer_exec(ctx, domid, autopass);
-    fprintf(stderr, "Unable to execute vncviewer\n");
-    return 1;
-}
-
 int main_vncviewer(int argc, char **argv)
 {
     static const struct option long_options[] = {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.