X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=java%2Fcom%2Fredhat%2Fet%2Flibguestfs%2FGuestFS.java;h=2846a80b2293a4ec3e9a97efeae34a43f751eb78;hp=a6d6f6db06f823c6efaa28effe74984d5b58894b;hb=ca49c50e06834bbc68e21630a5552c57494f2b53;hpb=85ed8cef99c19b4143844991d14e0b848fecc5da diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java index a6d6f6d..2846a80 100644 --- a/java/com/redhat/et/libguestfs/GuestFS.java +++ b/java/com/redhat/et/libguestfs/GuestFS.java @@ -2914,4 +2914,41 @@ public class GuestFS { private native void _vg_activate (long g, boolean activate, String[] volgroups) throws LibGuestFSException; + /** + * resize an LVM logical volume + * + * This resizes (expands or shrinks) an existing LVM + * logical volume to "mbytes". When reducing, data in the + * reduced part is lost. + * + * @throws LibGuestFSException + */ + public void lvresize (String device, int mbytes) + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("lvresize: handle is closed"); + _lvresize (g, device, mbytes); + } + private native void _lvresize (long g, String device, int mbytes) + throws LibGuestFSException; + + /** + * resize an ext2/ext3 filesystem + * + * This resizes an ext2 or ext3 filesystem to match the + * size of the underlying device. + * + * @throws LibGuestFSException + */ + public void resize2fs (String device) + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("resize2fs: handle is closed"); + _resize2fs (g, device); + } + private native void _resize2fs (long g, String device) + throws LibGuestFSException; + }