static void add_drives (struct drv *drv);
static void prepare_drives (struct drv *drv);
static void mount_mps (struct mp *mp);
+static int launch (void);
static void interactive (void);
static void shell_script (void);
static void script (int prompt);
int exit_on_error = 1;
int command_num = 0;
-int
-launch (guestfs_h *_g)
-{
- assert (_g == g);
-
- if (guestfs_is_config (g)) {
- if (guestfs_launch (g) == -1)
- return -1;
- }
- return 0;
-}
-
static void __attribute__((noreturn))
usage (int status)
{
* guest and mount them.
*/
if (next_prepared_drive > 1 || mps != NULL) {
- if (launch (g) == -1) exit (EXIT_FAILURE);
+ if (launch () == -1) exit (EXIT_FAILURE);
prepare_drives (drvs);
mount_mps (mps);
}
}
}
+static int
+launch (void)
+{
+ if (guestfs_is_config (g)) {
+ if (guestfs_launch (g) == -1)
+ return -1;
+ }
+ return 0;
+}
+
static void
interactive (void)
{
extern int count_strings (char *const *argv);
extern void print_strings (char *const *argv);
extern void print_table (char *const *argv);
-extern int launch (guestfs_h *);
extern int is_true (const char *str);
extern char **parse_string_list (const char *str);
extern int xwrite (int fd, const void *buf, size_t len);
*)
let non_daemon_functions = test_functions @ [
- ("launch", (RErr, []), -1, [FishAlias "run"; FishAction "launch"],
+ ("launch", (RErr, []), -1, [FishAlias "run"],
[],
"launch the qemu subprocess",
"\