summaryrefslogtreecommitdiffstats
path: root/src/guestfs-internal.h
Commit message (Collapse)AuthorAgeFilesLines
* generator: trace mode prints return values.Richard W.M. Jones2010-11-171-0/+1
|
* New API: inspect-get-hostname to return the hostname of the guest.Richard W.M. Jones2010-11-161-0/+1
| | | | | This returns the hostname of the guest. Tested on RHEL, Fedora, Debian 5, Ubuntu 10.10, FreeBSD 8, Windows 7.
* inspect: Add support for Linux Mint and Mandriva.Richard Jones2010-11-151-0/+3
| | | | | | | | Linux Mint is derived from Ubuntu. Mandriva has a release file, but it also has /etc/lsb-release and the same parsing code can be reused. Mandriva has a package manager called urpmi.
* inspect: Inspection support for FreeBSD.Richard W.M. Jones2010-11-131-0/+2
| | | | | | | | | | This adds inspection support for FreeBSD. However this is not quite enough to allow guestfish -i freebsd.img to work, because guestfish will try to mount the filesystems, which cannot be done because Linux requires special mount options for the Universal Filesystem (UFS) used by *BSD. Nevertheless you can manually run the same commands.
* lib: Add match3 function.Richard W.M. Jones2010-11-131-0/+2
|
* lib: Add safe_asprintf function.Richard W.M. Jones2010-11-131-0/+3
|
* New APIs: inspect-get-package-format, inspect-get-package-management.Richard Jones2010-11-121-0/+21
| | | | This APIs reimplement some parts of virt-inspector in C.
* Don't need to include XDR headers in <guestfs.h>.Richard W.M. Jones2010-11-111-0/+3
| | | | | | | Include the XDR headers in the internal guestfs-internal.h instead. This is knock-on effects to several other source files which were implicitly relying on indirectly loaded headers.
* Add internal facility to checkpoint and roll back the command line.Richard Jones2010-11-101-0/+2
| | | | | This internal interface can be used to ensure that certain operations are atomic.
* lib: Make pcre, libmagic and hivex libraries optional.Richard Jones2010-11-101-0/+16
| | | | | | | | | | | | | | | This change makes these libraries optional. If they are not available at compile time then certain core API features will be disabled (see below). This also changes PCRE detection to use pkg-config instead of the ad hoc autoconf checks. The large inspect.c file has been split out into separate function-specific files. file-architecture: requires pcre & libmagic inspection: requires pcre & hivex
* lib: Expose errno through new API guestfs_last_errno.Richard W.M. Jones2010-11-031-1/+4
| | | | | | | If either the daemon sends back an errno, or a system call fails in the library, save the errno in the handle and then make it available to callers through the guestfs_last_errno function.
* Define internal safe_calloc shorthand.Richard W.M. Jones2010-11-031-0/+1
|
* inspect: Add support for MeeGo.stable-1.6Richard W.M. Jones2010-11-021-0/+1
|
* inspect: Add support for Ubuntu.Richard Jones2010-10-291-0/+1
|
* inspect: Add detection of Gentoo.Richard Jones2010-10-291-0/+1
|
* inspect: Add detection of Arch Linux.Richard Jones2010-10-291-0/+1
|
* inspect: Add detection of Pardus.Richard Jones2010-10-291-0/+1
|
* New internal function guestfs___print_timestamped_argvMatthew Booth2010-10-281-0/+1
| | | | | | | This function generalises the existing print_cmdline used to output the qemu command line to output any given command line, and exports it to other modules. It also adds a timestamp to the old print_cmdline output for consistency with guestfs___print_timestamped_message.
* New API: inspect-get-windows-systemroot to get systemroot.Richard W.M. Jones2010-10-281-0/+1
| | | | | | We are already using heuristics in the C inspection code to determine the Windows %SYSTEMROOT% directory. This change just exposes this information through the API.
* Don't include control characters in BufferIn trace output (RHBZ#646822).Matthew Booth2010-10-261-0/+1
| | | | | | | | | | | | The example below shows what the output looks like for a large random buffer. $ guestfish -N fs -m /dev/sda1 -x -- \ touch /test : \ pwrite /test "$(dd if=/dev/urandom bs=128k count=1)" 0 [...] pwrite "/test" "\x7f\xa0/\xb3\x80\xd3\xbc\xc3\xc3.\xb1\xe0\x1b\xafC\x06\xd5;\x0ajJ[o\xc1\xdd\xae\x1f\xce\xb2\x8d\xb3\xd0\x11\xcc$%\xe6<\xc7\xc7\xe7BU*\xc4l%\xaa\xea\xe9\x1an\xda]\xc6I\x0eC\xf9;\xec\x12a\x1f\xeaRH\xb2P\xd6+\xc4\xe6\xa5bW\x99\\x9d\xc8\x9bJ\xef\x99-\x16:h5\xe2\x0f\xa2\xa08\x9bU\x0b$\x138\xcf\xd4j\x9b\x83{%\xac0\xdaa1Xx\xbd`\x8e\xdd\x82\x87\x07\x98\xd2\x9ed\x8bq\xd0\x1f5\x8f\xab\xad4z1\xda\xc4b\xc1\xbc\x0f\xaa\xea\xc1\x15(\xfd1\xc2\x0bF\xe6\x9e\xb0+/g\\xab\xb0b\xde_\xca\xf9\xad\xe1?%\x17\xad\x98\xa4e\xc1\xe0f'\x89\xe9>\xff\xadhYi\xe7\x8c]%\xef\xe0\xa1R\xe5\xd5\x03K\xefI\xdf\xad\xd3\x82\xdb\x0f\xdd\xc3\x8f"\xf1G\xea\xf9r\xdd\xff\x88\x81\xb7\xf2\x0e\x0f\x1d;:\xf2F1\xdb\xb5D\xa1^\x928\xf5\x8e)\xab\xc4\xc3H(\xd0ol\xc6\xe4\xd6\xa3L\x1c\x06\xf4"<truncated, original size 130567 bytes> 0 [...]
* Allow $TMPDIR to override most temporary directory uses.Richard W.M. Jones2010-09-241-1/+5
| | | | | | | Be more consistent in allowing the user to override use of the temporary directory by specifying $TMPDIR. Also prefer P_tmpdir macro (defined in <stdio.h>) if that is defined, rather than hard-coding "/tmp" for the fallback location.
* Implement private data area.Richard Jones2010-09-011-0/+3
| | | | | | | | | The private data area is a hash table which is associated with libguestfs handles, that C callers may use to store arbitrary data for the lifetime of the handle. Later the OCaml bindings will use this in order to implement callbacks.
* Implement progress messages in the daemon and library.Richard Jones2010-08-311-0/+2
| | | | | | | | | | | | This implements progress notification messages in the daemon, and adds a callback in the library to handle them. No calls are changed so far, so in fact no progress messages can be generated by this commit. For more details, see: https://www.redhat.com/archives/libguestfs/2010-July/msg00003.html https://www.redhat.com/archives/libguestfs/2010-July/msg00024.html
* New APIs: set-network and get-network to enable network support.Richard Jones2010-08-241-0/+1
| | | | guestfs_set_network (g, true) enables network support in the appliance.
* Use virtio-serial, remove other vmchannel methods.Richard Jones2010-08-241-8/+0
| | | | | | | | | | | | | This adds support for virtio-serial, and removes all other vmchannel methods. Virtio-serial is faster than other methods, and is now widely available. I tested this by using the guestfs_upload API on an 83 MB file: before: 6.12 seconds (14.1 MB/sec) after: 4.20 seconds (20.6 MB/sec) (note this is with the current 8K chunk size)
* Change to using ext2-based, cached supermin appliance.Richard Jones2010-08-231-0/+1
| | | | | | | | | | | | This changes the method used to build the supermin appliance to use the new ext2-based appliance supported by latest febootstrap. The appliance can also be cached, so we avoid rebuilding it each time it is used. Mailing list discussion goes into the rationale and details: https://www.redhat.com/archives/libguestfs/2010-August/msg00028.html Requires febootstrap >= 2.8.
* Make print_timestamped_message into a cross-module function.Richard Jones2010-08-231-0/+1
| | | | This is just code movement.
* Factor out code for locating the temporary directory.Richard Jones2010-08-231-0/+1
| | | | This is just code movement.
* Whitespace change: Add blank line between structures and functions.Richard Jones2010-08-211-0/+1
|
* New APIs for guest inspection.Richard Jones2010-08-171-0/+54
| | | | | | | | | | | | | | | | | | | | | This commit converts (some of) the Perl inspection code to C and makes it available through core APIs. The new APIs are: inspect-os - Does the inspection, returns list of OSes inspect-get-* - Get results of the inspection where '*' is one of: type - 'windows' or 'linux' distro - Linux distro arch - architecture product-name - long product name string major-version minor-version - major.minor version of OS mountpoints - get a list of the mountpoints filesystems - get all filesystems associated with the OS This works for all existing supported Linux and Windows OSes.
* Add safe_strndup call.Richard Jones2010-08-171-0/+2
|
* Rename internal functions.Richard Jones2010-07-281-3/+3
| | | | | | | 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).
* Rearrange library code into separate files.Richard Jones2010-07-271-1/+115
| | | | | | | | | | | | 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.
* guestfs.h: Move some internal functions to the internal header.Richard Jones2010-03-161-0/+16
| | | | | | Functions like guestfs__send were never exported through the public API (libguestfs.syms prevented that). However they appeared in the public header. Move them to the internal header.
* Don't export STREQ and friends in <guestfs.h>Richard Jones2009-11-101-0/+32
Move these to private header file(s) and other places as required since these aren't part of the public API.