If there was no quoting character, the options could run off the end
of the string and into whatever string which happened to be following
in memory.
This bug was revealed when libguestfs was compiled on arm.
For the rationale behind this renaming, see:
b8cbe191d0
You can still, for the time being, use
./configure --with-febootstrap-yum-config
but it's preferred to switch to the new option. The new option is
identical, just renamed.
Qe still pass the deprecated --yum-config option to febootstrap
itself, since both old and new febootstrap support this.
For some reason the fs->device field was not set for swap devices.
Apparently this did not matter before (this bug has existed since at
least libguestfs 1.16), but in commit 6ee80b8dac we started to depend
on the fs->device field being non-NULL. This resulted in segfaults
when inspecting any guest which had a swap device, eg:
#0 __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164
#1 0x00007ffff7d740cb in parent_device_already_probed (g=0x703a70,
partition=0x6f79b0 "/dev/vda4") at inspect.c:156
#2 0x00007ffff7d73e00 in guestfs__inspect_os (g=0x703a70) at inspect.c:83
#3 0x00007ffff7cee11d in guestfs_inspect_os (g=0x703a70) at actions-1.c:397
This commit sets fs->device to the device name.
(Thanks Matthew Booth for first noticing this problem.)
If ntfs-3g is not installed, then tests/guests creates a 'windows.img'
file which is zero-sized.
This is problematical because other tests which use this image will
fail at best, or hit RHBZ#847549 (qemu/virtio-scsi bug) at worst.
Change the tests which use windows.img so they skip if 'windows.img'
has zero size.
If you want to selectively run tests, or if the test suite fails half
way through, use:
make print-subdirs
to print the subdirectories, select the ones you want to run / the
remaining ones, and do:
make check SUBDIRS="..."
User Phill Bandelow noted that virt-resize fails with an e2fsck error
on a host where the system clock had been accidentally set in the
past.
Unfortunately this was hard to diagnose because guestfsd 'ate' the
stdout of the e2fsck program. I have verified by code inspection that
e2fsck prints messages on stdout.
Thus this changes the daemon to fold stdout and stderr together so we
get to see all error messages from e2fsck when it fails.
Rename guestfs_safe_malloc et al to guestfs___safe_malloc etc.
To use the private functions, code now has to define
-DGUESTFS_PRIVATE_FUNCTIONS=1. This will make it easier for us in
future to work out which programs are using these functions and to
minimize both the number of programs and the functions they are
calling.
Note that the Perl, Python, OCaml, Ruby and Java bindings use
guestfs_safe_* calls. None of the other bindings do. This is a bug
(in the bindings using those functions): these functions will call the
out of memory callback on failure. This function defaults to abort(),
and since this happens from a language binding, there is no way to
change this default.
I guess no one uses GCC 3 any more, because if they did, including
<guestfs.h> would not work since GUESTFS_DLL_PUBLIC would not have
been defined.
At the same time, ensure that __attribute__((noreturn)) is only used
when the compiler is GCC >= 3.1.