Rename 'qemu' as 'hv', 'LIBGUESTFS_QEMU' as 'LIBGUESTFS_HV'.

This commit is contained in:
Richard W.M. Jones
2013-08-13 22:28:28 +01:00
parent 46763bcc0b
commit 78dbd08dd2
14 changed files with 203 additions and 132 deletions

View File

@@ -245,12 +245,14 @@ main (int argc, char *argv[])
printf ("guestfs_get_cachedir: %s\n", p ? : "(null)");
free (p);
printf ("guestfs_get_direct: %d\n", guestfs_get_direct (g));
p = guestfs_get_hv (g);
printf ("guestfs_get_hv: %s\n", p);
free (p);
printf ("guestfs_get_memsize: %d\n", guestfs_get_memsize (g));
printf ("guestfs_get_network: %d\n", guestfs_get_network (g));
printf ("guestfs_get_path: %s\n", guestfs_get_path (g) ? : "(null)");
printf ("guestfs_get_pgroup: %d\n", guestfs_get_pgroup (g));
printf ("guestfs_get_program: %s\n", guestfs_get_program (g));
printf ("guestfs_get_qemu: %s\n", guestfs_get_qemu (g));
printf ("guestfs_get_recovery_proc: %d\n", guestfs_get_recovery_proc (g));
printf ("guestfs_get_selinux: %d\n", guestfs_get_selinux (g));
printf ("guestfs_get_smp: %d\n", guestfs_get_smp (g));
@@ -338,9 +340,10 @@ set_qemu (guestfs_h *g, const char *path, int use_wrapper)
int fd;
FILE *fp;
if (getenv ("LIBGUESTFS_QEMU")) {
if (getenv ("LIBGUESTFS_QEMU") != NULL ||
getenv ("LIBGUESTFS_HV") != NULL) {
fprintf (stderr,
_("LIBGUESTFS_QEMU environment variable is already set, so\n"
_("LIBGUESTFS_HV/LIBGUESTFS_QEMU environment variable is already set, so\n"
"--qemu/--qemudir options cannot be used.\n"));
exit (EXIT_FAILURE);
}
@@ -353,7 +356,7 @@ set_qemu (guestfs_h *g, const char *path, int use_wrapper)
exit (EXIT_FAILURE);
}
guestfs_set_qemu (g, path);
guestfs_set_hv (g, path);
return;
}
@@ -391,6 +394,6 @@ set_qemu (guestfs_h *g, const char *path, int use_wrapper)
host_cpu, path);
fclose (fp);
guestfs_set_qemu (g, qemuwrapper);
guestfs_set_hv (g, qemuwrapper);
atexit (cleanup_wrapper);
}