summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-07-03 14:36:45 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-07-03 14:45:42 +0100
commit917550a117904ec1a06b77a7870a147014d71adb (patch)
tree31c0c80e38c5be1bad619060652b4ed724da3f82 /examples
parentc0a3c9ce70b98171e737e49e6dccc4457963f2ec (diff)
downloadlibguestfs-917550a117904ec1a06b77a7870a147014d71adb.tar.gz
libguestfs-917550a117904ec1a06b77a7870a147014d71adb.tar.xz
libguestfs-917550a117904ec1a06b77a7870a147014d71adb.zip
examples: In create_disk example, don't call set_autosync.
This is now set by default in all supported versions of libguestfs. It's just confusing if the examples refer to it.
Diffstat (limited to 'examples')
-rw-r--r--examples/create_disk.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/examples/create_disk.c b/examples/create_disk.c
index bcad6d85..5380888b 100644
--- a/examples/create_disk.c
+++ b/examples/create_disk.c
@@ -37,11 +37,6 @@ main (int argc, char *argv[])
/* Set the trace flag so that we can see each libguestfs call. */
guestfs_set_trace (g, 1);
- /* Set the autosync flag so that the disk will be synchronized
- * automatically when the libguestfs handle is closed.
- */
- guestfs_set_autosync (g, 1);
-
/* Add the disk image to libguestfs. */
if (guestfs_add_drive_opts (g, "disk.img",
GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", /* raw format */
@@ -104,10 +99,6 @@ main (int argc, char *argv[])
if (guestfs_upload (g, "/etc/resolv.conf", "/foo/resolv.conf") == -1)
exit (EXIT_FAILURE);
- /* Because 'autosync' was set (above) we can just close the handle
- * and the disk contents will be synchronized. You can also do
- * this manually by calling guestfs_umount_all and guestfs_sync.
- */
guestfs_close (g);
/* Free up the lists. */