| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The methods $h->set_progress_callback and $h->clear_progress_callback
have been removed, and replaced with a complete mechanism for setting
and deleting general-purpose events.
This also updates virt-resize to use the new API.
|
|
|
|
|
|
| |
The functions set_progress_callback and clear_progress_callback have
been removed, and replaced with a complete mechanism for setting and
deleting general-purpose events.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This API allows more than one callback to be registered for each
event, makes it possible to call the API from other languages, and
allows [nearly all] log, debug and trace messages to be rerouted from
stderr.
An older version of this API was discussed on the mailing list here:
https://www.redhat.com/archives/libguestfs/2010-December/msg00081.html
https://www.redhat.com/archives/libguestfs/2011-January/msg00012.html
This also updates guestfish to use the new API for its progress bars.
|
|
|
|
|
|
|
|
| |
the private data area.
This commit adds new APIs for walking over the keys and pointers in
the private data area associated with each handle (note this is only
applicable to the C API).
|
|
|
|
| |
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
|
|
|
|
| |
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
|
| |
|
|
|
|
| |
Left over from pre-virtio-serial days.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/etc/redhat-release on Red Hat Desktop contains the following
string:
Red Hat Desktop release 4 (Nahant Update 8)
Previously we matched against the string "Red Hat Enterprise Linux"
but since this does not contain that string, this distro wasn't being
detected correctly.
Note this also changes the obsolete Perl code, for the benefit of
virt-v2v.
|
|
|
|
| |
Fix required by gcc 4.6.0.
|
|
|
|
|
|
|
|
| |
There was a lot of repeated code to map return types (eg. RErr)
to error cases (eg. -1 or NULL).
This commit introduces an error code type and two functions to
map return types to error codes and error codes to strings.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we expanded the code for 'trace_return' unconditionally for
all non-daemon functions. However this code was not prepared to
handle all error conditions, and in fact would segfault if it tried to
print RStringList or RHashtable where r == NULL.
We need to make the code conditional on the return value, calling
either 'trace_return' or 'trace_return_error' as appropriate.
Note the difficult case for RConstOptString which returns NULL in
non-error cases.
|
|
|
|
| |
This updates commit 182a2ceae6d6f50448159e24d8b5c0c92f44407f.
|
|
|
|
| |
http://www.transifex.net/projects/p/libguestfs/
|
| |
|
|
|
|
|
|
|
| |
qemu-img used to allow you to specify a fractional image size in bytes
(or at least, it used to ignore the part after the decimal place). In
qemu-img 0.14 it no longer does this so we round down the size to a
whole number of bytes.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Creating a HashMap directly from JNI is possible but very tedious
(see: http://java.sun.com/docs/books/jni/html/fldmeth.html#26254)
Instead we use the existing code to return hashes from JNI as plain
String[], then add some code in the Java wrapper to convert these to
HashMap<String,String>.
|
|
|
|
|
|
|
|
| |
There's no point returning the specific HashMap type here.
Return the generic interface type instead.
Note that no users are actually calling these functions yet,
since at present they always fail.
|
|
|
|
|
| |
In functions that don't have javadoc, the function prototype wasn't
being indented correctly.
|
|
|
|
|
|
| |
If a test.img file was left over from a previous run, then it
would cause the subsequent test to fail. Therefore remove any
old test.img file.
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that Java assertions are disabled by default. You have
to add the 'java -ea' flag to the JVM. Who knew ..?
Because of this oversight, the tests weren't actually performing the
assertions that we wanted (although in fact none of the assertions
were failing).
This change enables assertions when running the tests.
|
| |
|
|
|
|
| |
This updates commit 7eb012f3710bb554d5fc2c4229036901b0b5ad90.
|
|
|
|
|
|
| |
The other programs have the variable, but the flag is not enabled
either because it doesn't make sense or because the implications are
not well understood.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This optional flag controls whether this API call will try to connect
to a running virtual machine 'guestfsd' process.
If the flag is given and the virtual machine is running, then the
libvirt XML is parsed looking for a suitable <channel> element, and
'guestfs_set_attach_method' is called with the corresponding
virtio-serial socket path.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow connections to a Unix domain socket which is connected
(via virtio-serial) to a guestfsd running free in an existing
guest.
In order to use this you have to add the following element
to the libvirt XML:
<channel type='unix'>
<source mode='bind' path='/tmp/socket'/>
<target type='virtio' name='org.libguestfs.channel.0'/>
</channel>
(or perform the equivalent on the qemu command line).
Then in guestfish, you can do:
guestfish \
attach-method unix:/tmp/socket : \
run : \
ll /
(or any other commands as desired).
|
|
|
|
| |
This option was not being used.
|
|
|
|
|
|
|
|
| |
This changes several aspects of the daemon. Currently:
* sysroot will be "" (ie. operate directly on /)
* CHROOT_IN/CHROOT_OUT are disabled
* autosync doesn't try to unmount everything
|
|
|
|
| |
Ensure the daemon always starts with current directory == root.
|
|
|
|
|
|
|
|
|
|
| |
These allow you to get and set the attach method. The format
is one of:
* appliance
* unix:<path>
It's stored broken out into an enum and a string in the handle.
|
|
|
|
| |
This is just code motion.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since Fedora util-linux 2.19, the %post script does:
rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab
We are no longer running %post scripts, so this means that /etc/mtab
is a plain file in the appliance. Usual 'mount' still updates it, but
for some reason mount.ntfs does *not* update it in Fedora 15, meaning
that you couldn't mount and then operate on NTFS partitions.
It seems better to always parse /proc/mounts (ie. what the kernel
thinks is mounted) unconditionally, rather than relying on the
capriciousness of the external mount command.
Therefore, parse /proc/mounts instead of /etc/mtab, but add a note
saying that in future we should really be parsing
/proc/self/mountinfo, but that needs a custom parser, and the format
is rather tricky:
http://lxr.linux.no/#linux+v2.6.37/Documentation/filesystems/proc.txt#L1462
|
| |
|
|
|
|
| |
This updates commit 477eebc83dcd33d00d34398692692dae6af04f22.
|
| |
|