summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* php: Fix bug in PHP tests.Richard W.M. Jones2011-08-231-2/+2
| | | | | | | | | | We partitioned the disk, and then tried to create a PV on the whole disk. LVM gave the error: Device /dev/vda not found (or ignored by filtering). It is unclear how this bug persisted for so long. It might be due to a change in LVM.
* Coverity: fix memory leak along error path.Richard W.M. Jones2011-08-231-0/+12
|
* Coverity: Initialize msg buffer.Richard W.M. Jones2011-08-231-0/+2
| | | | | msg_flags was not being initialized and would have been passed to sendmsg with a random value.
* Coverity: fix memory leak in guestfish.Richard W.M. Jones2011-08-231-2/+1
|
* Coverity: in daemon, free struct in RStruct, RStructList functions.Richard W.M. Jones2011-08-231-0/+2
|
* pclose: Fix other places where we only tested pclose == -1.Richard W.M. Jones2011-08-234-4/+4
| | | | pclose can return > 0 when the status of the command was non-zero.
* test_qemu: Improve the error message.Richard W.M. Jones2011-08-231-1/+2
| | | | | Note that errno is probably not set to a useful value here, so there is not much point recording it.
* test_qemu: pclose may return any != 0 on error.Richard W.M. Jones2011-08-231-1/+1
| | | | In particular pclose returns a status > 0 if the command fails.
* qemu detection: Free up previous qemu help/version strings if they exist.Richard W.M. Jones2011-08-231-0/+5
|
* Coverity: test_qemu: Ensure FILE * is not leaked along error paths.Richard W.M. Jones2011-08-231-15/+21
| | | | | This refactors the code in test_qemu slightly to ensure that FILE *fp is not leaked on error paths.
* Coverity: Check guestfs_inspect_get_product_name() != NULL before using.Richard W.M. Jones2011-08-231-1/+1
|
* rescue: Ignore errno after guestfs_launch.Richard W.M. Jones2011-08-231-10/+0
| | | | | | | errno is pretty much random on the error path back from guestfs_launch so there is nothing useful to be gained by checking it. We could do with a better way to detect if appliance launch failed.
* Coverity: Ignore return value from guestfs_launch in virt-rescue.Richard W.M. Jones2011-08-231-1/+4
| | | | We expect guestfs_launch to fail in this program.
* Coverity: Check return value from sscanf in bindtests calls.Richard W.M. Jones2011-08-231-5/+22
|
* autobuild: Only add last 100 lines of the log file.Richard W.M. Jones2011-08-201-4/+13
|
* New autobuild script.Richard W.M. Jones2011-08-203-96/+104
| | | | | | | Remove the old top-level autobuild.sh that confused a lot of people. Add an autobuild.sh script that builds from the latest tarball.
* configure: Add --with-extra flag to allow setting the extra version string.Richard W.M. Jones2011-08-191-9/+19
| | | | | | | Intended use in Fedora and RHEL is to encode the release string, eg. ./configure [...] --with-extra="-%{release}"
* Version 1.13.6.1.13.6Richard W.M. Jones2011-08-1918-341/+344
|
* protocol: Fix case where download can fail for small files.Richard W.M. Jones2011-08-182-6/+26
| | | | | | | | | | | | | There is another case where downloads of small files could fail if the library side (writer) fails. In this case the library would send back a cancellation, but it would be received after the daemon had finished sending the whole file (because the file is small enough). The daemon would reenter the main loop and immediately get an unexpected cancel message, causing the daemon to die. This commit also makes test-cancellation-download-librarycancels.sh more robust. We use Monte-Carlo testing with a range of file sizes. Small file sizes should trigger the error case.
* Escape special/non-printing characters in debug output (RHBZ#731744).Richard W.M. Jones2011-08-181-12/+42
| | | | | | | | | | | | | | | | | | The default event handler in libguestfs was simply writing all debug output directly to stderr. However if the output contains non-printable characters such as terminal control codes then these would also be sent directly. With newer SeaBIOS there is a lame attempt to implement a splash screen using terminal control codes, thus when libguestfs tries to display debugging output it would cause the screen to clear and debug output to be lost. This commit causes all non-printing characters to be escaped. (\n and \r characters from the appliance are treated somewhat specially). Furthermore, instead of using write(2), use buffered stderr calls.
* Remove guestfs___print_timestamped_argv.Richard W.M. Jones2011-08-183-48/+90
| | | | | | | | | | | | | | | | | | | | | | | This function was used to print the qemu and febootstrap-supermin-helper command lines. Unfortunately in the qemu case it was used incorrectly: it called the internal debug function (ie. event API callback) from the forked qemu subprocess, which meant that higher level event callbacks might have been invoked from the child process. To fix this, convert the qemu case into a new function called print_qemu_command line which just prints the command line directly to stderr. This is called after stderr has been redirected into the pipe to the main process. Thus the qemu command line will be marshalled into the event API along with other qemu and appliance output. After fixing this, only one use of guestfs___print_timestamped_argv remained, for printing the febootstrap-supermin-helper command line. This is converted to a local function print_febootstrap_command_line. Also print_febootstrap_command_line is now called before we fork febootstrap-supermin-helper, so that messages no longer overlap.
* out-of-tree build: generate ./run from template, fix image checksHilko Bengen2011-08-188-23/+23
| | | | | | | ./run can now be run in a separate build directory. Since some files needed in the image checks are found in the source tree (but not the build tree), the source tree location is passed to make-*-img.sh via an environment variable.
* Version 1.13.51.13.5Richard W.M. Jones2011-08-1721-9317/+9487
|
* fish: Add fish-cmds.h to generator_built.Richard W.M. Jones2011-08-171-0/+1
| | | | This updates commit 3064277680ad11f887691646d0fa17bb35f38c19.
* out-of-tree build: fix make and make installHilko Bengen2011-08-171-2/+2
| | | | | $(srcdir) is not needed for guestfs_c.c. *.mli only exists in $(srcdir) and isn't found on "make install" otherwise
* out-of-tree build: fix documentation generation IIHilko Bengen2011-08-171-2/+2
|
* out-of-tree build: remove unneeded explicit pathsHilko Bengen2011-08-173-7/+7
|
* Improve zeroing and detection of zeroes.Richard W.M. Jones2011-08-162-21/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code modifies zero, zero-device, is-zero, is-zero-device. zero and zero-device are modified so that if the blocks of the device already contain zeroes, then we don't write zeroes. The reason for this is to avoid unnecessarily making the underlying storage non-sparse or (in the qcow2 case) growing it. is-zero and is-zero-device are modified so that zero detection is faster. This is a nice side effect of making the first change. Since avoiding unnecessary zeroing involves reading the blocks before writing them, whereas before we just blindly wrote, this can be slower. As you can see from the tests below, in the case where the disk is sparse, it actually turns out to be faster, because we avoid allocating the underlying blocks. However in the case where the disk is non-sparse and full of existing data, it is much slower. There might be a case for an API flag to adjust whether or not we perform the zero check. I did not add this flag because it is unlikely that the caller would have enough information to be able to set the flag correctly. (Elapsed time in seconds) Format Test case Before After Raw Sparse 16.4 5.3 Preallocated zero 17.0 18.8 Preallocated random 16.0 41.3 Qcow2 preallocation=off 18.7 5.6 preallocation=metadata 17.4 5.8 The current code uses a fixed block size of 4K for reading and writing. I also tried the same tests with a block size of 64K but it didn't make any significant difference. (Thanks to Federico Simoncelli for suggesting this change)
* recipes: Remove two C file dependencies which are not actually used in the POD.Richard W.M. Jones2011-08-151-1/+1
|
* out-of-tree build: fix building libraryHilko Bengen2011-08-151-3/+3
|
* out-of-tree build: Fix up OCaml bindings and generatorHilko Bengen2011-08-152-15/+15
|
* out-of-tree build: fix applianceHilko Bengen2011-08-151-0/+1
|
* out-of-tree build: fix documentation generationHilko Bengen2011-08-1520-65/+66
|
* ruby: Fix typo in Ruby bindings file.Richard W.M. Jones2011-08-141-2/+2
|
* Note that additional memory may be required to typecheck Augeas lenses ↵Richard W.M. Jones2011-08-121-1/+6
| | | | (RHBZ#729887).
* fish: Document that remote run in cmd substitution context hangs.Richard W.M. Jones2011-08-121-0/+11
| | | | This documents bug 592910.
* Version 1.13.4.1.13.4Richard W.M. Jones2011-08-1118-434/+332
|
* Fix 'unknown filesystem' warnings in old inspection code (RHBZ#678231 ↵Richard W.M. Jones2011-08-111-14/+20
| | | | | | | | | | RHBZ#666578). This is a comprehensive fix for the warnings from the old (and obsolete) Perl inspection code. For a full description and reproducer, see: https://bugzilla.redhat.com/show_bug.cgi?id=678231#c5
* inspection: Better checking for Windows root disks (RHBZ#729075).Richard W.M. Jones2011-08-083-30/+75
| | | | | | | | | | | | | | | | | Previously any disk that had /autoexec.bat or /boot.ini or /ntldr would be picked up as a candidate for a Windows root disk. If further checking could not find any systemroot (eg. /windows) then this would result in complete failure of inspection. In particular, this got confused by Hp_recovery partitions which have /autoexec.bat, but don't have a systemroot in one of the usual places (they have /MiniNT instead). What we do now is to properly investigate all possible systemroot places before deciding this is a Windows systemroot, so the subsequent failure cannot occur. (Thanks to lorimar for reporting this bug).
* build: Set TMPDIR for local testing.Richard W.M. Jones2011-08-0818-17/+44
| | | | | | This avoids conflicts with the globally installed libguestfs appliance, or lets us build in multiple local directories at the same time without conflicts.
* Version 1.13.3.1.13.3Richard W.M. Jones2011-08-0720-10956/+11709
|
* daemon: Don't include .gitignore in EXTRA_DIST.Richard W.M. Jones2011-08-071-2/+1
| | | | This updates commit 60d5a50f4d3d9e2c2f5a7d42a6859de709bda3f6.
* fish: Add setenv and unsetenv commands.Richard W.M. Jones2011-08-074-0/+88
| | | | | These commands allow you to manipulate the environment within guestfish.
* fish: Declare run_* functions in a generated header file.Richard W.M. Jones2011-08-074-41/+24
| | | | | Calls to these functions are generated, so there is no need to declare the functions by hand.
* docs: Move deprecation notice up to the top in C man page.Richard W.M. Jones2011-08-061-4/+5
|
* docs: Emphasize deprecation notice in man pages.Richard W.M. Jones2011-08-061-1/+1
|
* docs: Fix function names in deprecation notices.Richard W.M. Jones2011-08-062-4/+4
|
* docs: guestfs_set_out_of_memory_handler returns void, not int.Richard W.M. Jones2011-08-061-2/+2
| | | | It always has done. The documentation was wrong.
* docs: Clarify error handler example.Richard W.M. Jones2011-08-061-4/+5
|
* fish: Fix regression tests for new guestfish line numbers.Richard W.M. Jones2011-08-051-1/+1
| | | | This updates commit 319e946b92e175c05cdd1fdcb85c9b86f5631011.