mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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.
This commit is contained in:
@@ -15,10 +15,6 @@ f.close ()
|
||||
# Set the trace flag so that we can see each libguestfs call.
|
||||
g.set_trace (1)
|
||||
|
||||
# Set the autosync flag so that the disk will be synchronized
|
||||
# automatically when the libguestfs handle is closed.
|
||||
g.set_autosync (1)
|
||||
|
||||
# Attach the disk image to libguestfs.
|
||||
g.add_drive_opts (output, format = "raw", readonly = 0)
|
||||
|
||||
@@ -55,7 +51,4 @@ g.mkdir ("/foo")
|
||||
# the disk image.
|
||||
g.upload ("/etc/resolv.conf", "/foo/resolv.conf")
|
||||
|
||||
# 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 g.umount_all and g.sync.
|
||||
g.close ()
|
||||
|
||||
Reference in New Issue
Block a user