]> xenbits.xensource.com Git - xenclient/ioemu.git/commitdiff
- Call the init of dom0_driver
authorJean Guyader <jean.guyader@eu.citrix.com>
Mon, 13 Oct 2008 10:20:38 +0000 (11:20 +0100)
committerJean Guyader <jean.guyader@eu.citrix.com>
Mon, 13 Oct 2008 10:22:57 +0000 (11:22 +0100)
  - Add dm-ready product patch

vl.c
xenstore.c

diff --git a/vl.c b/vl.c
index 9202aafb40f2cd663da1fdeabd917c64e48433b8..e1ac89504016c2039ce02213fd928674fe07bb8b 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -264,6 +264,8 @@ static int event_pending = 1;
 
 #include "xen-vl-extra.c"
 
+void xenstore_dm_finished_startup(void);
+
 /***********************************************************/
 /* x86 ISA bus support */
 
@@ -8757,6 +8759,7 @@ int main(int argc, char **argv)
 
     /* terminal init */
     memset(&display_state, 0, sizeof(display_state));
+
 #ifdef CONFIG_STUBDOM
     if (xenfb_pv_display_init(ds) == 0) {
     } else
@@ -8924,7 +8927,11 @@ int main(int argc, char **argv)
 
        close(fd);
     }
+    
+    if (dom0_input)
+        dom0_driver_init(dom0_input);
 
+    xenstore_dm_finished_startup();
     main_loop();
     quit_timers();
 
index 8281aa4492051f5f4147e4357fdaadc2a0ddadce..fe7782a1ce394ede1cb7ee063da9766574ef7822 100644 (file)
@@ -1323,3 +1323,27 @@ int *xenstore_get_domids(int *len)
         tab[i] = strtol(e[i], NULL, 10);
     return tab;
 }
+
+
+/* Advertise through xenstore that the device model is up and the
+   domain can be started. */
+void xenstore_dm_finished_startup(void)
+{
+    char *path;
+    char *buf = NULL;
+
+    path = xs_get_domain_path(xsh, domid);
+    if (!path) {
+        fprintf(logfile, "xs_get_domain_path() failed.\n");
+        goto out;
+    }
+    if (pasprintf(&buf, "%s/device-misc/dm-ready", path) == -1) {
+        fprintf(logfile, "pasprintf failed to get path.\n");
+        goto out;
+    }
+    if (xs_write(xsh, XBT_NULL, buf, "1", 1) == 0)
+        fprintf(logfile, "xs_write() dm-ready failed\n");
+ out:
+    free(buf);
+    free(path);
+}