mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Generated code for 'set_memsize'/'get_memsize' calls.
This commit is contained in:
@@ -907,6 +907,57 @@ public HashMap<String,String> test0rhashtableerr ()
|
||||
private native void _end_busy (long g)
|
||||
throws LibGuestFSException;
|
||||
|
||||
/**
|
||||
* set memory allocated to the qemu subprocess
|
||||
* <p>
|
||||
* This sets the memory size in megabytes allocated to the
|
||||
* qemu subprocess. This only has any effect if called
|
||||
* before "g.launch".
|
||||
* <p>
|
||||
* You can also change this by setting the environment
|
||||
* variable "LIBGUESTFS_MEMSIZE" before the handle is
|
||||
* created.
|
||||
* <p>
|
||||
* For more information on the architecture of libguestfs,
|
||||
* see guestfs(3).
|
||||
* <p>
|
||||
* @throws LibGuestFSException
|
||||
*/
|
||||
public void set_memsize (int memsize)
|
||||
throws LibGuestFSException
|
||||
{
|
||||
if (g == 0)
|
||||
throw new LibGuestFSException ("set_memsize: handle is closed");
|
||||
_set_memsize (g, memsize);
|
||||
}
|
||||
private native void _set_memsize (long g, int memsize)
|
||||
throws LibGuestFSException;
|
||||
|
||||
/**
|
||||
* get memory allocated to the qemu subprocess
|
||||
* <p>
|
||||
* This gets the memory size in megabytes allocated to the
|
||||
* qemu subprocess.
|
||||
* <p>
|
||||
* If "g.set_memsize" was not called on this handle, and if
|
||||
* "LIBGUESTFS_MEMSIZE" was not set, then this returns the
|
||||
* compiled-in default value for memsize.
|
||||
* <p>
|
||||
* For more information on the architecture of libguestfs,
|
||||
* see guestfs(3).
|
||||
* <p>
|
||||
* @throws LibGuestFSException
|
||||
*/
|
||||
public int get_memsize ()
|
||||
throws LibGuestFSException
|
||||
{
|
||||
if (g == 0)
|
||||
throw new LibGuestFSException ("get_memsize: handle is closed");
|
||||
return _get_memsize (g);
|
||||
}
|
||||
private native int _get_memsize (long g)
|
||||
throws LibGuestFSException;
|
||||
|
||||
/**
|
||||
* mount a guest disk at a position in the filesystem
|
||||
* <p>
|
||||
|
||||
@@ -1401,6 +1401,37 @@ Java_com_redhat_et_libguestfs_GuestFS__1end_1busy
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_redhat_et_libguestfs_GuestFS__1set_1memsize
|
||||
(JNIEnv *env, jobject obj, jlong jg, jint jmemsize)
|
||||
{
|
||||
guestfs_h *g = (guestfs_h *) (long) jg;
|
||||
int r;
|
||||
int memsize;
|
||||
|
||||
memsize = jmemsize;
|
||||
r = guestfs_set_memsize (g, memsize);
|
||||
if (r == -1) {
|
||||
throw_exception (env, guestfs_last_error (g));
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_com_redhat_et_libguestfs_GuestFS__1get_1memsize
|
||||
(JNIEnv *env, jobject obj, jlong jg)
|
||||
{
|
||||
guestfs_h *g = (guestfs_h *) (long) jg;
|
||||
int r;
|
||||
|
||||
r = guestfs_get_memsize (g);
|
||||
if (r == -1) {
|
||||
throw_exception (env, guestfs_last_error (g));
|
||||
return 0;
|
||||
}
|
||||
return (jint) r;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_redhat_et_libguestfs_GuestFS__1mount
|
||||
(JNIEnv *env, jobject obj, jlong jg, jstring jdevice, jstring jmountpoint)
|
||||
|
||||
Reference in New Issue
Block a user