diff options
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | fish/fish.c | 2 | ||||
-rw-r--r-- | fuse/guestmount.c | 1 | ||||
-rw-r--r-- | generator/generator_actions.ml | 6 | ||||
-rw-r--r-- | src/guestfs.c | 1 | ||||
-rw-r--r-- | src/guestfs.pod | 3 |
6 files changed, 7 insertions, 7 deletions
@@ -181,7 +181,6 @@ To mount read-only, add C<ro =E<gt> 1> like this: 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\", \"/\"); diff --git a/fish/fish.c b/fish/fish.c index 7cb2e714..8da4ffdd 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -230,8 +230,6 @@ main (int argc, char *argv[]) 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 diff --git a/fuse/guestmount.c b/fuse/guestmount.c index 96650591..d17982a7 100644 --- a/fuse/guestmount.c +++ b/fuse/guestmount.c @@ -982,7 +982,6 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); } - guestfs_set_autosync (g, 1); guestfs_set_recovery_proc (g, 0); ADD_FUSE_ARG (program_name); diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index 38f1db3b..8add55fe 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -286,11 +286,11 @@ best effort attempt to run C<guestfs_umount_all> followed by 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", "\ diff --git a/src/guestfs.c b/src/guestfs.c index 325bdb0c..df13d517 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -100,6 +100,7 @@ guestfs_create (void) g->error_cb_data = NULL; g->recovery_proc = 1; + g->autosync = 1; str = getenv ("LIBGUESTFS_DEBUG"); g->verbose = str != NULL && STREQ (str, "1"); diff --git a/src/guestfs.pod b/src/guestfs.pod index c1e595c7..305aa382 100644 --- a/src/guestfs.pod +++ b/src/guestfs.pod @@ -701,6 +701,9 @@ Note that in L<guestfish(3)> autosync is the default. So quick and 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 |