+ return launch_appliance (g);
+}
+
+static int
+launch_appliance (guestfs_h *g)
+{
+ int r;
+ int wfd[2], rfd[2];
+ char guestfsd_sock[256];
+ struct sockaddr_un addr;
+
+ /* At present you must add drives before starting the appliance. In
+ * future when we enable hotplugging you won't need to do this.
+ */
+ if (!g->cmdline) {
+ error (g, _("you must call guestfs_add_drive before guestfs_launch"));
+ return -1;
+ }
+
+ /* Start the clock ... */
+ gettimeofday (&g->launch_t, NULL);
+