summaryrefslogtreecommitdiffstats
path: root/java/t/GuestFS010Basic.java
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-07-03 13:22:45 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-07-07 11:32:46 +0100
commitdff126b7c5c322c942ec920fe9fb752137c2e25b (patch)
treeb0f3c70599ba1fbf8e581d3c0b623eb1ecc9f6f6 /java/t/GuestFS010Basic.java
parentb6ef5f47cf6355c860f659252a391293ae026a32 (diff)
downloadlibguestfs-dff126b7c5c322c942ec920fe9fb752137c2e25b.tar.gz
libguestfs-dff126b7c5c322c942ec920fe9fb752137c2e25b.tar.xz
libguestfs-dff126b7c5c322c942ec920fe9fb752137c2e25b.zip
New API: guestfs_shutdown: Cleanly shutdown the backend.
The new API splits orderly close into a two-step process: if (guestfs_shutdown (g) == -1) { /* handle the error, eg. qemu error */ } guestfs_close (g); Note that the explicit shutdown step is only necessary in the case where you have made changes to the disk image and want to handle write errors. Read the documentation for further information. This change also: - deprecates guestfs_kill_subprocess - turns guestfs_kill_subprocess into the same as guestfs_shutdown - changes guestfish and other tools to call shutdown + close where necessary (not for read-only tools) - updates documentation - updates examples (cherry picked from commit ffbf1475f7ae7c462db289ad4834391469e72edd)
Diffstat (limited to 'java/t/GuestFS010Basic.java')
-rw-r--r--java/t/GuestFS010Basic.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/java/t/GuestFS010Basic.java b/java/t/GuestFS010Basic.java
index 21f88dd3..a44fde1f 100644
--- a/java/t/GuestFS010Basic.java
+++ b/java/t/GuestFS010Basic.java
@@ -55,6 +55,7 @@ public class GuestFS010Basic
assert m.get ("/dev/VG/LV1").equals ("ext2");
assert m.get ("/dev/VG/LV2").equals ("unknown");
+ g.shutdown ();
g.close ();
File f2 = new File ("test.img");