#include "xen-vl-extra.c"
+void xenstore_dm_finished_startup(void);
+
/***********************************************************/
/* x86 ISA bus support */
/* terminal init */
memset(&display_state, 0, sizeof(display_state));
+
#ifdef CONFIG_STUBDOM
if (xenfb_pv_display_init(ds) == 0) {
} else
close(fd);
}
+
+ if (dom0_input)
+ dom0_driver_init(dom0_input);
+ xenstore_dm_finished_startup();
main_loop();
quit_timers();
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);
+}