diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-05-13 17:51:14 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-05-13 17:51:14 +0100 |
commit | e8ecc08f663b44f3d79517affe52f137858dfe00 (patch) | |
tree | 0bee77cb454884699d671f5b1ef264ba4fde5f9e /java/com | |
parent | 5b17af107f75a0d6f3a39b88b9c18714014eb7af (diff) | |
download | libguestfs-e8ecc08f663b44f3d79517affe52f137858dfe00.tar.gz libguestfs-e8ecc08f663b44f3d79517affe52f137858dfe00.tar.xz libguestfs-e8ecc08f663b44f3d79517affe52f137858dfe00.zip |
Add 'append', LIBGUESTFS_APPEND to set additional kernel options.
Diffstat (limited to 'java/com')
-rw-r--r-- | java/com/redhat/et/libguestfs/GuestFS.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java index 70efb8d0..d0b34465 100644 --- a/java/com/redhat/et/libguestfs/GuestFS.java +++ b/java/com/redhat/et/libguestfs/GuestFS.java @@ -316,6 +316,54 @@ public class GuestFS { throws LibGuestFSException; /** + * add options to kernel command line + * + * This function is used to add additional options to the + * guest kernel command line. + * + * The default is "NULL" unless overridden by setting + * "LIBGUESTFS_APPEND" environment variable. + * + * The string "append" is stashed in the libguestfs handle, + * so the caller must make sure it remains valid for the + * lifetime of the handle. + * + * Setting "append" to "NULL" means *no* additional options + * are passed (libguestfs always adds a few of its own). + * + * @throws LibGuestFSException + */ + public void set_append (String append) + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("set_append: handle is closed"); + _set_append (g, append); + } + private native void _set_append (long g, String append) + throws LibGuestFSException; + + /** + * get the additional kernel options + * + * Return the additional kernel options which are added to + * the guest kernel command line. + * + * If "NULL" then no options are added. + * + * @throws LibGuestFSException + */ + public String get_append () + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("get_append: handle is closed"); + return _get_append (g); + } + private native String _get_append (long g) + throws LibGuestFSException; + + /** * set autosync mode * * If "autosync" is true, this enables autosync. Libguestfs |