diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-06-02 14:25:25 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-06-02 14:25:25 +0100 |
commit | d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e (patch) | |
tree | 48c33472221810fbe42a515b217f82d3da3bd04f /java/com/redhat/et/libguestfs/GuestFS.java | |
parent | bfdc03be234d6d95f18450846433bce4f97e184c (diff) | |
download | libguestfs-d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e.tar.gz libguestfs-d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e.tar.xz libguestfs-d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e.zip |
Generated code for 'add_drive_ro' call.
Diffstat (limited to 'java/com/redhat/et/libguestfs/GuestFS.java')
-rw-r--r-- | java/com/redhat/et/libguestfs/GuestFS.java | 46 |
1 files changed, 46 insertions, 0 deletions
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<String,String> test0rhashtableerr () * This is equivalent to the qemu parameter "-drive * file=filename". * <p> + * 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. + * <p> * @throws LibGuestFSException */ public void add_drive (String filename) @@ -450,6 +456,12 @@ public HashMap<String,String> test0rhashtableerr () * This is equivalent to the qemu parameter "-cdrom * filename". * <p> + * 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. + * <p> * @throws LibGuestFSException */ public void add_cdrom (String filename) @@ -463,6 +475,40 @@ public HashMap<String,String> test0rhashtableerr () throws LibGuestFSException; /** + * add a drive in snapshot mode (read-only) + * <p> + * This adds a drive in snapshot mode, making it + * effectively read-only. + * <p> + * 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. + * <p> + * This is equivalent to the qemu parameter "-drive + * file=filename,snapshot=on". + * <p> + * 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. + * <p> + * @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 * <p> * This can be used to add arbitrary qemu command line |