| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See the comment from the code:
NB about Windows 8: No location we've found so far contains a
suitable icon for Win8. In particular, explorer.exe definitely
does *not* contain any Windows logo as a resource (I checked).
Therefore the "basket icon" that this produces is just a stand-in
until we have a better idea for solving this problem.
and:
https://bugzilla.redhat.com/show_bug.cgi?id=801117
|
|
|
|
| |
RHBZ#858696).
|
|
|
|
|
|
|
| |
(RHBZ#798979).
So we don't get multiple <operatingsystem> entries, particularly for
install ISOs.
|
|
|
|
| |
CD/DVD/ISOs (RHBZ#803650, RHBZ#805417).
|
|
|
|
| |
This is just a whitespace change.
|
|
|
|
| |
This is just code motion.
|
| |
|
|
|
|
| |
Only run one grep command to grep any number of files.
|
|
|
|
|
| |
If there where several lpj=.. matches then the earlier matches would
be leaked. Only return the first one and don't leak memory.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The read_all function is used as a callback for
guestfs___cmd_set_stdout_callback (cmd, read_all, [str],
CMD_STDOUT_FLAG_WHOLE_BUFFER);
As noted in the documentation for CMD_STDOUT_FLAG_WHOLE_BUFFER, the
buffer returned is not \0-terminated, and so using memdup will create
an unterminated string, and therefore potentially a memory overrun
when reading or searching the string.
Use strndup instead so the final string is \0-terminated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Try to get the host's loops_per_jiffy value and pass this on the
command line to the guest. In theory this should avoid the appliance
having to recalculate this value in a VM with TCG (which is generally
error-prone). This should avoid timing issues.
We only do this when we are certain that the guest will be TCG.
Currently we only have enough information to do this from the libvirt
attach-method. So mostly this will only affect people using Fedora in
a VM.
The host loops_per_jiffy value is not exported by the kernel. It is
only printed by the kernel early during boot, so if boot messages have
"scrolled off" the kernel ring buffer, it won't be available. Some
operating systems save early kernel messages in /var/log/dmesg but (a)
Fedora 18+ seem to have abandoned this file and (b) on Ubuntu this
file is unreadable for spurious "security" reasons.
I have submitted a patch to make lpj available through /proc/cpuinfo.
|
|
|
|
| |
This is just code motion.
|
|
|
|
| |
Move this into a common file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the following memory leak found by valgrind:
==13629== 498 (112 direct, 386 indirect) bytes in 1 blocks are definitely lost in loss record 99 of 110
==13629== at 0x4A06B2F: calloc (vg_replace_malloc.c:593)
==13629== by 0x4CA564E: guestfs_safe_calloc (alloc.c:71)
==13629== by 0x4CA9B02: guestfs___new_command (command.c:143)
==13629== by 0x4CA66E9: guestfs___build_appliance (appliance.c:690)
==13629== by 0x4CBD1B9: launch_libvirt (launch-libvirt.c:188)
==13629== by 0x402E7E: main (virt-filesystems.c:349)
Also adjust the command code in several places to make it simpler. We
can almost always call guestfs___cmd_close right after
guestfs___cmd_run, avoiding any need to close the handle along error
paths.
Tested by running the test suite under valgrind.
|
|
|
|
|
|
| |
This adds the following new APIs:
- cap_get_file
- cap_set_file
|
|
|
|
|
|
|
| |
This adds the following new APIs:
- acl_get_file
- acl_set_file
- acl_delete_def_file
|
| |
|
|
|
|
|
|
|
|
| |
These are relatively complete, although only lightly tested. Missing:
- events
- last_errno
- user_cancel
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'make extra-tests' was a monolithic set of tests that did all sorts of
things: valgrind, tests over local guests, tests with upstream qemu,
tests with upstream libvirt, tests with the appliance attach method.
This made it hard to perform individual tests, eg. just valgrind
testing. It was also hard to maintain because the tests were not
located in the same directories as the programs and sometimes
duplicated tests that were run elsewhere.
This commit splits up 'make extra-tests' into 5 separate targets:
make check-valgrind # run a subset of tests under valgrind
make check-valgrind-local-guests # test under valgrind with local guests
make check-with-appliance # test with attach-method == appliance
make check-with-upstream-qemu # test with an alternate/upstream qemu
make check-with-upstream-libvirt # test with an alternate/upstream libvirt
(You can also still run 'make extra-tests' which is now simply
a rule that runs the above 5 targets in order).
This replaces everything that was in the tests/extra directory,
so that has now gone.
|
|
|
|
|
| |
Remove internal structures, fix it so it works with the new
code layout under src/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This file had grown by accretion to include:
- code related to handles (now in src/handle.c)
- safe allocation (src/alloc.c)
- debug, errors, warnings (src/errors.c)
- private data (src/private-data.c)
- miscellaneous functions (src/canonical-name.c, src/utils.c)
This commit also removes about a dozen #include files which were
probably not really used.
This is just code motion.
|
|
|
|
| |
This fixes commit 1efed122c07792f4c66a4083159cfacfb1893212.
|
|
|
|
|
| |
This is less efficient than directly manipulating g->error_cb, but
easier to maintain.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
guestfs_pop_error_handler.
The addition of these calls makes it much simpler to temporarily
disable or ignore errors:
guestfs_push_error_handler (g, NULL, NULL);
guestfs_mkdir (g, "/foo"); /* We don't care if this fails. */
guestfs_pop_error_handler (g);
Note these calls are used by the C API only. They are not necessary
in other languages, because those map errors to exceptions.
The subsequent commits change existing code to use push/pop instead of
laboriously saving and restoring the error handler.
|
|
|
|
| |
This is just a whitespace change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New APIs: set-tmpdir, get-tmpdir, set-cachedir, get-cachedir.
The current code has evolved over time and has a number of problems:
(a) A single environment variable ($TMPDIR) controls the
location of several directories.
(b) It's hard for the library user to predict which directory
libguestfs will use, unless the user simulates the same internal steps
that libguestfs performs.
This commit fixes these issues.
(a) Now three environment variables control the location of all small
temporary files, and the appliance cache:
For temporary files: $LIBGUESTFS_TMPDIR or $TMPDIR or /tmp.
For the appliance cache: $LIBGUESTFS_CACHEDIR or $TMPDIR or /var/tmp.
The user can also set these directories explicitly through API calls
(guestfs_set_tmpdir and guestfs_set_cachedir).
(b) The user can also retrieve the actual directories that libguestfs
will use, by calling guestfs_get_tmpdir and guestfs_get_cachedir.
These functions are also used internally.
This commit also:
- reworks the internal tmpdir code
- removes the internal (undocumented) guestfs_tmpdir call (replacing
it with calls to the documented guestfs_get_tmpdir API instead)
- changes the ./run script to set LIBGUESTFS_TMPDIR and
LIBGUESTFS_CACHEDIR
- adds a test
- fixes a few places like libguestfs-make-fixed-appliance which
depended on $TMPDIR
|
|
|
|
| |
So that we can trace all the later calls.
|
| |
|
|
|
|
|
|
|
|
| |
Split the functions according to a simple hash across
C.nr_actions_files files (this number can be increased later if
necessary).
This is just code motion.
|
|
|
|
| |
This is just code motion.
|
|
|
|
| |
This is just code motion.
|
| |
|
|
|
|
|
|
| |
RWMJ:
- Fix memory leak in guestfs__inspect_list_applications wrapper.
- Don't document app2_spare* fields.
|
|
|
|
| |
Also document 'local*' files.
|
|
|
|
| |
This is just code motion.
|
|
|
|
|
|
|
| |
(RHBZ#859885).
Note that because of RHBZ#859949, this will return two identical
entries for RPMs which differ only by arch.
|
| |
|
|
|
|
|
|
| |
See the comment in the change.
This "fixes" commit f7a67914c03db6d4c75671793964954640af7892.
|
|
|
|
|
|
|
|
|
| |
Use <cpu mode="host-model"> (not model=... which was a typo).
Also set fallback=allow so that libvirt knows it can use another
CPU model if it wants.
This fixes commit 890a4fbc8740b9b2019885a866aa06bc82566a41.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(RHBZ#713678)
|
| |
|