summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add GUESTFS_EVENT_ENTER event.Richard W.M. Jones2011-08-262-5/+22
| | | | This event is generated whenever a libguestfs function is called.
* Coverity: fix memory leak along error path.Richard W.M. Jones2011-08-231-0/+12
|
* pclose: Fix other places where we only tested pclose == -1.Richard W.M. Jones2011-08-232-2/+2
| | | | 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.
* 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: fix building libraryHilko Bengen2011-08-151-3/+3
|
* out-of-tree build: fix documentation generationHilko Bengen2011-08-151-4/+4
|
* 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).
* 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
|
* gnulib: Add all other libs when linking libguestfs.so.Richard W.M. Jones2011-08-051-2/+9
| | | | This updates the previous two commits.
* gnulib: Add $(LIB_CLOCK_GETTIME) when linking libguestfs.so.Richard W.M. Jones2011-08-051-1/+2
| | | | | We don't use this library (it is only used in the daemon), but we need to add this to make the linker happy.
* daemon: Remove separate configure of daemon subdirectory.Richard W.M. Jones2011-08-051-6/+0
| | | | | | | | | | | | | Combine the two Gnulib instances together. Add checks from old daemon/configure.ac into configure.ac. Fix daemon/Makefile.am so it is like a normal subdirectory Makefile.am. Because we are now using the replacement strerror_r function from Gnulib (instead of the one from glibc directly), this requires a small change to src/guestfs.c.
* Change link, since PostgreSQL switched to using git.Richard W.M. Jones2011-08-011-1/+1
|
* Don't fail if HOSTNAME field is missing on Red Hat guests (RHBZ#726739).Richard W.M. Jones2011-07-291-3/+10
|
* launch: Add qemu_supports_re function.Richard W.M. Jones2011-07-261-0/+43
| | | | | | | This function is like qemu_supports, but allows us to grep the help text using regular expressions. Note the function is not used yet.
* Require PCRE library.Richard W.M. Jones2011-07-2510-51/+24
| | | | This library is widely available in distros.
* docs: Document FEBOOTSTRAP_KERNEL, FEBOOTSTRAP_MODULES (RHBZ#671082).Richard W.M. Jones2011-07-221-0/+11
|
* blkid: Detect when value not found and return empty string.Richard W.M. Jones2011-07-201-0/+4
| | | | | | | | | | | | | | If the blkid command returns 2, that means the value was not found. Note that this changes the output of the vfs-type API when the filesystem has no type (eg when it is empty). Previously this would return an error. Now it returns empty string "". We did not document this either way. Making it return empty string is consistent with vfs-label and vfs-uuid. This change broke list-filesystems, since that code was assuming that vfs-type could only return a filesystem type or an error.
* docs: Update stable release instructions.Richard W.M. Jones2011-07-201-0/+5
|
* appliance: Capture stderr from qemu to the event system.Richard W.M. Jones2011-07-201-1/+9
|
* appliance: Document pipe fds.Richard W.M. Jones2011-07-201-0/+2
|
* java: Add guestfs-java(3) man page.Richard W.M. Jones2011-07-191-1/+2
|
* Add missing reference to guestfs-perl(3) to guestfs(3).Richard W.M. Jones2011-07-191-0/+1
|
* Add notes on making a libguestfs stable release.Richard W.M. Jones2011-07-171-0/+50
|
* Update API support.Richard W.M. Jones2011-07-163-0/+869
|
* Update API support.Richard W.M. Jones2011-07-154-0/+1304
|
* Add user cancellation to the C API.Richard W.M. Jones2011-07-154-7/+70
| | | | | | | | | This allows long transfers (FileIn and FileOut operations) to be cancelled by calling the signal and thread safe guestfs_user_cancel function. Most of this commit consists of a multithreaded program that tests user cancellation of uploads and downloads.
* New APIs: set-pgroup, get-pgroupRichard W.M. Jones2011-07-153-6/+26
| | | | | | | | | | | If the pgroup flag is set in the handle, then the qemu and recovery subprocesses are placed in separate process groups. The default is false. The purpose for setting up a process group is that ^C will not be passed from the main process down to these processes (killing them). This allows ^C and other keyboard events to be caught and handled in the main process.
* New API: write-appendRichard W.M. Jones2011-07-141-1/+1
| | | | Append content to the end of a file.
* New API: btrfs-filesystem-resize (RHBZ#721160).Richard W.M. Jones2011-07-141-1/+1
| | | | This resizes a btrfs filesystem.
* docs: Update API support.Richard W.M. Jones2011-07-134-0/+1307
|
* New API: ntfsresize-opts (RHBZ#685009).Richard W.M. Jones2011-07-121-1/+1
| | | | | | This is a more comprehensive fix for RHBZ#685009. Add a new API which allows the --force flag to be passed, allowing multiple NTFS resize operations in a single session.
* New API: list-dm-devices (RHBZ#688062).Richard W.M. Jones2011-07-121-1/+1
| | | | List device mapper devices.
* Add caution subdirectory containing safety and liveness tests.Richard W.M. Jones2011-06-301-0/+5
| | | | | Not that I'm paranoid about qemu breaking snapshots of anything like that ...
* docs: Update API support.Richard W.M. Jones2011-06-2945-10/+18672
|
* New API: inspect-get-icon returns the guest icon.Richard W.M. Jones2011-06-283-0/+474
| | | | | | | | | | This API returns the guest's favicon if found, else an icon representing the guest operating system. Currently supported by this patch: Fedora, RHEL and derivatives, Debian (but not Ubuntu), Windows XP, Windows 7. This also updates virt-inspector to include an <icon> element containing the icon in base64 encoding.
* Change download_to_tmp so it can work with multi-root operating systems.Richard W.M. Jones2011-06-284-104/+98
| | | | | | | | | | | | | | | | The previous guestfs___download_to_tmp function did not handle multiboot correctly. In particular it used the same cache name for downloaded files from different roots, which could have caused things like applications in each root to be confused. This changes the function so that the cache filename is prefixed with the root / fs number, eg. $tmpdir/0-Name instead of $tmpdir/Name. This change also requires the function to return the new name, so all places in the code which called this function had to be updated. This updates and fixes commit 3c1f762abed92f7a358f3bc93e3396d0606b18ad.
* New API: mount-9p lets you mount 9p filesystems (RHBZ#714981).Richard W.M. Jones2011-06-221-1/+1
| | | | The updated patch makes 'options' into an optional parameter.
* New API: list-9p lists 9p filesystem mount tags (RHBZ#714981).Richard W.M. Jones2011-06-221-1/+1
|
* build: include <string.h> for src/match.c's use of strlenJim Meyering2011-06-101-0/+1
|
* protocol: Enhance "unexpected end of file when reading from daemon" error.Richard W.M. Jones2011-06-071-2/+21
| | | | | Make this error more informative, since it is a common error when the appliance fails to start up.
* New APIs: is-zero and is-zero-device, to test if file or device is all zeroes.Richard W.M. Jones2011-05-171-1/+1
|
* Enable deprecation warnings on all C programs.Richard W.M. Jones2011-05-171-0/+1
|
* appliance: Use qemu -machine option where available (RHBZ#700369).Richard W.M. Jones2011-05-171-14/+23
|
* Rewrite virt-edit in C.Richard W.M. Jones2011-05-091-0/+4
|