#include <sys/select.h>
#include <dirent.h>
#include <signal.h>
+#include <assert.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
}
int
+guestfs___checkpoint_cmdline (guestfs_h *g)
+{
+ return g->cmdline_size;
+}
+
+void
+guestfs___rollback_cmdline (guestfs_h *g, int pos)
+{
+ int i;
+
+ assert (g->cmdline_size >= pos);
+
+ for (i = g->cmdline_size - 1; i >= pos; --i)
+ free (g->cmdline[i]);
+
+ g->cmdline_size = pos;
+}
+
+/* Internal command to return the command line. */
+char **
+guestfs__debug_cmdline (guestfs_h *g)
+{
+ int i;
+ char **r;
+
+ if (g->cmdline == NULL) {
+ r = safe_malloc (g, sizeof (char *) * 1);
+ r[0] = NULL;
+ return r;
+ }
+
+ r = safe_malloc (g, sizeof (char *) * (g->cmdline_size + 1));
+ r[0] = safe_strdup (g, g->qemu); /* g->cmdline[0] is always NULL */
+
+ for (i = 1; i < g->cmdline_size; ++i)
+ r[i] = safe_strdup (g, g->cmdline[i]);
+
+ r[g->cmdline_size] = NULL;
+
+ return r; /* caller frees */
+}
+
+int
guestfs__config (guestfs_h *g,
const char *qemu_param, const char *qemu_value)
{