New API: set-backend-settings, get-backend-settings.

Allow settings (an arbitrary list of strings) to be passed to the
current backend.  This will allow us to tweak how the backend works,
eg. by forcing TCG.
This commit is contained in:
Richard W.M. Jones
2014-01-18 15:33:10 +00:00
parent 815e739d12
commit 1e4663858b
8 changed files with 162 additions and 0 deletions

View File

@@ -90,6 +90,7 @@ main (int argc, char *argv[])
size_t i;
struct guestfs_version *vers;
char *p;
char **pp;
guestfs_h *g;
char *qemu = NULL;
int qemu_use_wrapper;
@@ -230,6 +231,16 @@ main (int argc, char *argv[])
p = guestfs_get_backend (g);
printf ("guestfs_get_backend: %s\n", p ? : "(null)");
free (p);
pp = guestfs_get_backend_settings (g);
printf ("guestfs_get_backend_settings: [");
for (i = 0; pp[i] != NULL; ++i) {
if (i > 0)
printf (", ");
printf ("%s", pp[i]);
free (pp[i]);
}
printf ("]\n");
free (pp);
printf ("guestfs_get_autosync: %d\n", guestfs_get_autosync (g));
p = guestfs_get_cachedir (g);
printf ("guestfs_get_cachedir: %s\n", p ? : "(null)");