| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
These are already defined in "guestfs-internal.h" which is
included in the .c file.
(cherry picked from commit 3cd272fc6acb043b4002dbcbbf741cecbc4820be)
|
|
|
|
| |
(cherry picked from commit 3905cc7ab496549b6ca0a0f67ec61d1d16968c33)
|
| |
|
|
|
|
| |
(cherry picked from commit 29925244c1be2d1d5f71d46eba205278624a1366)
|
|
|
|
|
|
|
|
| |
This is an update to commit 41f25ab3df5f306ac717fa7a6efd58328d30c1ae.
Internal functions should be named guestfs___* (3 underscores) to
avoid clashing with the implementation of actions (2 underscores).
(cherry picked from commit 737181bcd7b1de8c3a613d6282030c34efa78fb6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We split the library code into these separate files:
- guestfs.c: creating handles, closing handles, handle-related variables
- actions.c: generated library-side stubs for each action
- bindtests.c: generated code to test bindings
- launch.c: launching the appliance
- proto.c: the library side of the daemon communications protocol
This is just code movement.
Cherry picked from commit 41f25ab3df5f306ac717fa7a6efd58328d30c1ae
and rebased for stable branch.
|
|
|
|
|
|
| |
Rename these two generated files, in preparation for splitting
up the main src/guestfs.c file.
(cherry picked from commit a617f521a4f695a63ced1c734128dc6c05b7024f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some tests in the regressions directory deliberately print
error messages. As long as they still PASS, this is OK.
However these tests also printed some misleading messages
about what error to expect. Since error messages were slightly
different across distros, these messages were not accurate.
Therefore remove these messages, and replace with a general
message before all tests telling users not to worry about
errors from the tests as long as the tests don't fail.
(cherry picked from commit e7ee6eebed6ee3a5b56c0482ba2770e697d8febc)
|
|
|
|
| |
(cherry picked from commit 2fd8c259d3daa88b0cdf98090bb57f3dbd178432)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding the readonly=on option is not so clever. This causes
qemu to present the disk as read-only to the guest. (The
expected behaviour of snapshots=on,readonly=on was that it
would open the disk O_RDONLY but present a writable disk to
the guest).
Since the guest sees a read-only disk, we are unable to do any
recovery if a filesystem on the disk is inconsistent. This basically
prevents most accesses to live disk images.
What we really want is a qemu option which presents a writable
disk to the guest, but only opens the disk on the host side with
O_RDONLY, to alleviate the udev bug RHBZ#571714.
This reverts commit 676462684e05dd8341dd695762dd99a87d8ec022.
(cherry picked from commit 799d52be4f08f6c70c0e8ba1aa7367ba4cdd78c4)
|
|
|
|
|
|
| |
The 'name' parameter is not used on the right hand side of the
match, so it can be removed.
(cherry picked from commit 2e7da2a2f3bbc6d6db148d7dc2ce238bf56f34db)
|
|
|
|
|
|
|
|
|
|
| |
This resolves a warning from gcc 4.5:
assuming signed overflow does not occur when simplifying
conditional to constant
This page explains the issues in some detail:
http://www.airs.com/blog/archives/120
(cherry picked from commit 321ca1ef91a90cec5b94058b84420e8018e3f1d8)
|
|
|
|
|
|
| |
Only one function currently uses DeviceList. The generated code
unfortunately hard-coded the argument name from that function.
(cherry picked from commit aac51942aab63a9355ad6724345ea923148bf2a9)
|
|
|
|
|
|
| |
Various language bindings simply need this, so we have to allow
it even though it's a GCC extension.
(cherry picked from commit 0c0976496dafda4d172c5a7fc787d6a87d5bce8d)
|
|
|
|
| |
(cherry picked from commit 5b77be72bc4e46c7a53a24f1eb4cbd107a708f17)
|
| |
|
|
|
|
| |
(cherry picked from commit 70d27f6e796097630134bd8ebc2b65a65b1bf5c4)
|
|
|
|
|
|
|
|
|
| |
Note to self: The 'tempfile' function does *not* default to
removing files with the program exits!
For stable-1.4 branch:
- Cherry picked from commit 10ea14a3f1adb7023dd0601e4759bd24a030a1c3
- Rebased
|
|
|
|
|
|
|
| |
Add BUGS and RELEASE-NOTES to EXTRA_DIST.
Update RELEASE-NOTES by copying the final file from the
development branch.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Testing this against a Fedora disk image:
$ ./fish/guestfish --ro -a F13.img -m /dev/sda1 --listen
export GUESTFISH_PID=6033
$ ./fish/guestfish --remote=6033 -- ping-daemon
$ ./fish/guestfish --remote=6033 -- ping-daemon
$ ./fish/guestfish --remote=6033 -- exit
Without this fix the first remote command would fail because
qemu would have already been killed.
|
| |
|
| |
|
|
|
|
| |
See: http://lists.fedoraproject.org/pipermail/devel/2010-June/137953.html
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a thread safety issue with the current OCaml bindings which
is well explained in the bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=604691
This commit fixes the safety issue by copying strings temporarily
before releasing the thread lock. Updated code looks like this:
char *filename = guestfs_safe_strdup (g, String_val (filenamev));
int r;
caml_enter_blocking_section ();
r = guestfs_add_drive_ro (g, filename);
caml_leave_blocking_section ();
free (filename);
if (r == -1)
ocaml_guestfs_raise_error (g, "add_drive_ro");
Also included is a regression test.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This add an optional explicit $g->close method which may be
used to force the handle to be closed immediately. Note the
provisos about this method in the manual page entry. Callers
should *not* normally use this method.
The implementation of the handle also changes. Before, the
handle was a blessed reference to an integer (the integer
being the pointer to the C guestfs_h handle). Now we change
this to a hashref containing currently the following field:
_g => pointer to C guestfs_h handle (as an integer)
If this field is not present, it means that the handle has been
explicitly closed. This avoids double-freeing the handle.
The user may add their own fields to this hash in order to store
per-handle data. However any fields whose names begin with
an underscore are reserved for use by the Perl bindings.
This commit also adds a regression test.
This commit also changes the existing warning when you call
a method without a Sys::Guestfs handle as the first parameter,
into an error. This is because such cases are always errors.
|
|
|
|
| |
Read the note in the man page before using this feature.
|
| |
|
| |
|
|
|
|
| |
This reverts commit f8ee7869f4836427109959cf20e299a31fa86eaf.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this commit, if you used the -h and --csv options together
you would get these warnings from virt-df:
$ virt-df -h --csv Guest
Virtual Machine,Filesystem,Size,Used,Available,Use%
Argument "13.5G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
Argument "4.7G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
Argument "8.1G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
"/dev/vg_trick/RHEL55x64","/dev/VolGroup00/LogVol00",13,4,8,34.8%
Argument "98.7M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
Argument "18.8M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
Argument "74.9M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
"/dev/vg_trick/RHEL55x64","/dev/vda1",98,18,74,19.0%
We could fix this so that the human-readable numbers get written
into the CSV file. However would probably be wrong for most uses
of the CSV format (databases and spreadsheets) since they would not
be able to interpret these human-readable numbers, or worse could
misinterpret, eg. thinking that "1M" and "1G" are both 1.
Therefore this commit disallows this combination of options.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous commit 4df593496e116dfb635731c058b7627e81fc179c broke the
"file" command on logical volume paths, since these are symbolic
links. We *should* follow these (only).
This inadvertantly broke virt-inspector too, which indicates that
we need more regression testing in this area. Since carrying whole
Fedora images around could make the distribution even larger than
now, I'm not sure at the moment how to do this.
Thanks to Matt Booth for diagnosing this bug.
|
|
|
|
|
|
|
|
|
| |
In my limited tests, this seems to make a small but noticable
difference, improving the performance of some straightforward
read operations by a little over 10%.
For more information see:
http://kbase.redhat.com/faq/docs/DOC-5428
|
|
|
|
|
|
|
| |
To generate the "Bugs fixed" list, run the bugs-in-changelog script
like this:
./bugs-in-changelog 1.0.89..
|
|
|
|
| |
Update BUGS and PO files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The file call can hang if called on char devices (because we are
using the file -s option).
This is hard to solve cleanly without adding another file API.
However this restricts file to regular files, unless called explicitly
with a /dev/ path. For non-regular files, it will now return a
string like "directory".
There is a small semantic change for symbolic links. Previously
it would not have worked at all on absolute links (or rather, the
results would have been undefined). It would have treated relative
symlinks to regular files as the regular file itself. Now it will
return the string "symbolic link" in both cases.
This commit also makes the API safe when called on untrusted
filesystems. Previously a filesystem might have been set up so
that (eg) /etc/redhat-release was a char device, which would have
caused virt-inspector and virt-v2v to hang. Now it will not hang.
|
| |
|
|
|
|
|
|
|
|
| |
path = path to access file (/sysroot/.. or /dev/..)
display_path = original path, saved so we can display it
buf = optional buffer which is freed along return codepaths
There should be no change to the semantics of the code.
|
| |
|
| |
|
|
|
|
|
|
|
| |
(RHBZ#599464).
This also adds a regression test for VFAT and (conditionally)
NTFS filesystems.
|
| |
|