diff options
Diffstat (limited to 'erlang/examples')
-rwxr-xr-x | erlang/examples/create_disk.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/erlang/examples/create_disk.erl b/erlang/examples/create_disk.erl index a0c90444..d192435a 100755 --- a/erlang/examples/create_disk.erl +++ b/erlang/examples/create_disk.erl @@ -51,6 +51,11 @@ main(_) -> % the disk image. ok = guestfs:upload(G, "/etc/resolv.conf", "/foo/resolv.conf"), + % Because we wrote to the disk and we want to detect write + % errors, call guestfs:shutdown. You don't need to do this: + % guestfs:close will do it implicitly. + ok = guestfs:shutdown(G), + % Note also that handles are automatically closed if they are % reaped by the garbage collector. You only need to call close % if you want to close the handle right away. |