This internal interface can be used to ensure that certain
operations are atomic.
#endif
extern int guestfs___feature_available (guestfs_h *g, const char *feature);
extern void guestfs___free_string_list (char **);
+extern int guestfs___checkpoint_cmdline (guestfs_h *g);
+extern void guestfs___rollback_cmdline (guestfs_h *g, int pos);
#define error(g,...) guestfs_error_errno((g),0,__VA_ARGS__)
#define perrorf guestfs_perrorf
#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;
+}
+
+int
guestfs__config (guestfs_h *g,
const char *qemu_param, const char *qemu_value)
{