which is equivalent to the following sequence of calls:
$h = Sys::Guestfs->new ();
- $h->set_autosync (1);
$h->add_drive_ro ($filename);
$h->launch ();
$h->mount_ro (\"/dev/sda1\", \"/\");
exit (EXIT_FAILURE);
}
- guestfs_set_autosync (g, 1);
-
/* If developing, add ./appliance to the path. Note that libtools
* interferes with this because uninstalled guestfish is a shell
* script that runs the real program with an absolute path. Detect
exit (EXIT_FAILURE);
}
- guestfs_set_autosync (g, 1);
guestfs_set_recovery_proc (g, 0);
ADD_FUSE_ARG (program_name);
C<guestfs_sync> when the handle is closed
(also if the program exits without closing handles).
-This is disabled by default (except in guestfish where it is
-enabled by default).");
+This is enabled by default (since libguestfs 1.5.24, previously it was
+disabled by default).");
("get_autosync", (RBool "autosync", [], []), -1, [],
- [InitNone, Always, TestRun (
+ [InitNone, Always, TestOutputTrue (
[["get_autosync"]])],
"get autosync mode",
"\
g->error_cb_data = NULL;
g->recovery_proc = 1;
+ g->autosync = 1;
str = getenv ("LIBGUESTFS_DEBUG");
g->verbose = str != NULL && STREQ (str, "1");
dirty guestfish scripts that forget to sync will work just fine, which
can make this very puzzling if you are trying to debug a problem.
+Update: Autosync is enabled by default for all API users starting from
+libguestfs 1.5.24.
+
=item Mount option C<-o sync> should not be the default.
If you use L</guestfs_mount>, then C<-o sync,noatime> are added