From d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Tue, 2 Jun 2009 14:25:25 +0100 Subject: Generated code for 'add_drive_ro' call. --- java/com/redhat/et/libguestfs/GuestFS.java | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'java/com/redhat/et/libguestfs/GuestFS.java') diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java index d340b8cb..1d00547c 100644 --- a/java/com/redhat/et/libguestfs/GuestFS.java +++ b/java/com/redhat/et/libguestfs/GuestFS.java @@ -429,6 +429,12 @@ public HashMap test0rhashtableerr () * This is equivalent to the qemu parameter "-drive * file=filename". *

+ * Note that this call checks for the existence of + * "filename". This stops you from specifying other types + * of drive which are supported by qemu such as "nbd:" and + * "http:" URLs. To specify those, use the general + * "g.config" call instead. + *

* @throws LibGuestFSException */ public void add_drive (String filename) @@ -450,6 +456,12 @@ public HashMap test0rhashtableerr () * This is equivalent to the qemu parameter "-cdrom * filename". *

+ * Note that this call checks for the existence of + * "filename". This stops you from specifying other types + * of drive which are supported by qemu such as "nbd:" and + * "http:" URLs. To specify those, use the general + * "g.config" call instead. + *

* @throws LibGuestFSException */ public void add_cdrom (String filename) @@ -462,6 +474,40 @@ public HashMap test0rhashtableerr () private native void _add_cdrom (long g, String filename) throws LibGuestFSException; + /** + * add a drive in snapshot mode (read-only) + *

+ * This adds a drive in snapshot mode, making it + * effectively read-only. + *

+ * Note that writes to the device are allowed, and will be + * seen for the duration of the guestfs handle, but they + * are written to a temporary file which is discarded as + * soon as the guestfs handle is closed. We don't currently + * have any method to enable changes to be committed, + * although qemu can support this. + *

+ * This is equivalent to the qemu parameter "-drive + * file=filename,snapshot=on". + *

+ * Note that this call checks for the existence of + * "filename". This stops you from specifying other types + * of drive which are supported by qemu such as "nbd:" and + * "http:" URLs. To specify those, use the general + * "g.config" call instead. + *

+ * @throws LibGuestFSException + */ + public void add_drive_ro (String filename) + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("add_drive_ro: handle is closed"); + _add_drive_ro (g, filename); + } + private native void _add_drive_ro (long g, String filename) + throws LibGuestFSException; + /** * add qemu parameters *

-- cgit