int cmdline_size;
int verbose;
+ int autosync;
/* Callbacks. */
guestfs_abort_cb abort_cb;
if (g->verbose)
fprintf (stderr, "closing guestfs handle %p (state %d)\n", g, g->state);
+ /* Try to sync if autosync flag is set. */
+ if (g->autosync && g->state == READY)
+ guestfs_sync (g);
+
/* Remove any handlers that might be called back before we kill the
* subprocess.
*/
return g->verbose;
}
+void
+guestfs_set_autosync (guestfs_h *g, int a)
+{
+ g->autosync = a;
+}
+
+int
+guestfs_get_autosync (guestfs_h *g)
+{
+ return g->autosync;
+}
+
/* Add a string to the current command line. */
static void
incr_cmdline_size (guestfs_h *g)