summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* New event API (RHBZ#664558).Richard W.M. Jones2011-03-159-210/+734
| | | | | | | | | | | | | This API allows more than one callback to be registered for each event, makes it possible to call the API from other languages, and allows [nearly all] log, debug and trace messages to be rerouted from stderr. An older version of this API was discussed on the mailing list here: https://www.redhat.com/archives/libguestfs/2010-December/msg00081.html https://www.redhat.com/archives/libguestfs/2011-January/msg00012.html This also updates guestfish to use the new API for its progress bars.
* New APIs: guestfs_first_private, guestfs_next_private to walk overRichard W.M. Jones2011-03-153-4/+139
| | | | | | | | the private data area. This commit adds new APIs for walking over the keys and pointers in the private data area associated with each handle (note this is only applicable to the C API).
* check the pid is > 0 before calling waitpid()Angus Salkeld2011-03-151-1/+1
| | | | Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
* check the pid is > 0 before calling waitpid()Angus Salkeld2011-03-141-1/+1
| | | | Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
* RHEL5: Make use of 'futimens' function optional.Richard W.M. Jones2011-03-111-0/+4
|
* Detect Red Hat Desktop as 'rhel' distro (RHBZ#682979).Richard W.M. Jones2011-03-081-3/+3
| | | | | | | | | | | | | /etc/redhat-release on Red Hat Desktop contains the following string: Red Hat Desktop release 4 (Nahant Update 8) Previously we matched against the string "Red Hat Enterprise Linux" but since this does not contain that string, this distro wasn't being detected correctly. Note this also changes the obsolete Perl code, for the benefit of virt-v2v.
* Fix inspection code when PCRE or hivex is missing.Richard W.M. Jones2011-03-031-0/+24
|
* Add documentation for attach method.Richard W.M. Jones2011-02-032-1/+59
|
* Add guestfs_add_domain 'live' flag.Richard W.M. Jones2011-02-031-25/+167
| | | | | | | | | | This optional flag controls whether this API call will try to connect to a running virtual machine 'guestfsd' process. If the flag is given and the virtual machine is running, then the libvirt XML is parsed looking for a suitable <channel> element, and 'guestfs_set_attach_method' is called with the corresponding virtio-serial socket path.
* lib: Implement attach-method unix:<path>Richard W.M. Jones2011-02-032-9/+95
| | | | | | | | | | | | | | | | | | | | | | | | | Allow connections to a Unix domain socket which is connected (via virtio-serial) to a guestfsd running free in an existing guest. In order to use this you have to add the following element to the libvirt XML: <channel type='unix'> <source mode='bind' path='/tmp/socket'/> <target type='virtio' name='org.libguestfs.channel.0'/> </channel> (or perform the equivalent on the qemu command line). Then in guestfish, you can do: guestfish \ attach-method unix:/tmp/socket : \ run : \ ll / (or any other commands as desired).
* New APIs: set-attach-method, get-attach-method.Richard W.M. Jones2011-02-032-0/+51
| | | | | | | | | | These allow you to get and set the attach method. The format is one of: * appliance * unix:<path> It's stored broken out into an enum and a string in the handle.
* lib: Move appliance launching to separate function.Richard W.M. Jones2011-02-031-14/+24
| | | | This is just code motion.
* perl: Translate C examples into Perl and include a manual page.Richard W.M. Jones2011-01-301-1/+1
|
* lib: Fix use-after-free bug in XPath parsing code.Richard W.M. Jones2011-01-281-1/+1
|
* Add a new internal-autosync API to perform autosync.Richard W.M. Jones2011-01-282-5/+3
| | | | | | | | | Instead of explicitly calling umount-all; sync, we add a daemon function called internal-autosync which does the same. Apart from slightly simplifying the process of closing the handle, the main advantage is we can modify the daemon for the standalone case so that internal-autosync does not do the umount-all operation.
* Use /var/tmp for the cached appliance (for FHS compliance).Richard W.M. Jones2011-01-194-4/+24
| | | | | | | | | | | | | | | | The FHS advises large files not to be stored in the root filesystem[1], and that /var/tmp is persistent across reboots[2] (whereas /tmp is possibly not[3]). Therefore we should store the large cached supermin appliance in /var/tmp instead of /tmp. /tmp is still used for all other temporary files and directories. In either case you can override this by setting $TMPDIR. [1] http://www.pathname.com/fhs/pub/fhs-2.3.html#THEROOTFILESYSTEM [2] http://www.pathname.com/fhs/pub/fhs-2.3.html#VARTMPTEMPORARYFILESPRESERVEDBETWEE [3] http://www.pathname.com/fhs/pub/fhs-2.3.html#TMPTEMPORARYFILES
* Add ability to inspect install disks and live CDs.Richard W.M. Jones2011-01-153-39/+563
| | | | | For examples of the virt-inspector output, see the additional inspector/example-*.xml files in this commit.
* inspect: Add macros for file size limits.Richard W.M. Jones2011-01-151-9/+37
| | | | | | This also bumps the file size limit for "small text files" up to 2 MB, since we want to parse Windows CD txtsetup.sif files that are usually around 500K in size.
* New API: resize2fs-M to resize ext2/3/4 to minimum size.Nikita A Menkovich2011-01-141-1/+1
|
* Add logo used on the website.Richard W.M. Jones2011-01-111-0/+4
|
* New tools: virt-copy-in, virt-copy-out, virt-tar-in, virt-tar-out.Richard W.M. Jones2011-01-031-1/+7
| | | | | Relatively trivial wrappers around the equivalent guestfish commands. Change also includes new man pages.
* docs: Refresh programming language list in guestfs(3).Richard W.M. Jones2010-12-301-5/+5
|
* docs: Refresh programming language equivalence example in guestfs(3).Richard W.M. Jones2010-12-301-3/+3
|
* docs: Fix missing g handle in guestfs(3) man page.Richard W.M. Jones2010-12-301-2/+2
|
* docs: Refresh guestfs(3)/DOWNLOADING.Richard W.M. Jones2010-12-301-4/+3
|
* docs: Refresh guestfs(3)/MOUNTINGRichard W.M. Jones2010-12-301-9/+15
|
* docs: Update API support.Richard W.M. Jones2010-12-1911-6/+4201
|
* api-support: Fix detection of similar APIs.Richard W.M. Jones2010-12-191-1/+1
| | | | | Because we didn't match on word boundaries, the previous code would get confused by similar APIs, eg. getxattr vs getxattrs.
* docs: Obsolete HACKING file, move content into guestfs(3) man page.Richard W.M. Jones2010-12-192-1/+343
| | | | | | Add a new section called "EXTENDING LIBGUESTFS" to the guestfs manual page which contains all the information previously in "HACKING".
* docs: Add section on using /dev/fd/* with upload and download calls.Richard W.M. Jones2010-12-171-0/+21
|
* ntfs-3g: Document problems with symlinks and alternatives (RHBZ#663407).Richard W.M. Jones2010-12-161-0/+31
|
* New APIs: getxattr and lgetxattr to get single extended attributes.Richard W.M. Jones2010-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These APIs are essentially required to work around a problem with ntfs-3g. This filesystem (or FUSE?) does not list all extended attributes of a file when you call listxattr(2). However if you know the name of an extended attribute, you can retrieve it directly using getxattr(2). The current APIs (getxattrs etc) are simple to use, but they don't work if we can't list out the extended attributes (ie. by calling listxattr(2)). Example using the new APIs on an ntfs-3g filesystem: ><fs> lgetxattr "/Documents and Settings" system.ntfs_attrib | hexdump -C 00000000 16 24 00 00 |.$..| 00000004 ><fs> lgetxattr "/Documents and Settings" system.ntfs_reparse_data | hexdump -C 00000000 03 00 00 a0 34 00 00 00 00 00 18 00 1a 00 10 00 |....4...........| 00000010 5c 00 3f 00 3f 00 5c 00 43 00 3a 00 5c 00 55 00 |\.?.?.\.C.:.\.U.| 00000020 73 00 65 00 72 00 73 00 00 00 43 00 3a 00 5c 00 |s.e.r.s...C.:.\.| 00000030 55 00 73 00 65 00 72 00 73 00 00 00 |U.s.e.r.s...| 0000003c ><fs> getxattr "/Documents and Settings" system.ntfs_reparse_data | hexdump -C libguestfs: error: getxattr: getxattr: No such file or directory ><fs> getxattr "/Documents and Settings" system.ntfs_attrib | hexdump -C libguestfs: error: getxattr: getxattr: No such file or directory ><fs> lgetxattr "/Documents and Settings" system.ntfs_attrib | hexdump -C 00000000 16 24 00 00 |.$..| 00000004 ><fs> getxattr "/Users" system.ntfs_attrib | hexdump -C 00000000 11 00 00 00 |....| 00000004
* appliance: Don't set utime on cachedir until we know it is safe.Richard W.M. Jones2010-12-111-1/+2
| | | | | This could be used to touch an arbitrary file (albeit one which must already exist), and this could have been a security problem.
* appliance: Touch cached appliance files so they don't get tmp cleaned.Richard W.M. Jones2010-12-111-0/+5
|
* Remove extra \n character from end of error messages.Richard W.M. Jones2010-12-111-3/+3
|
* appliance: Be careful about cleaning up old appliances.Richard W.M. Jones2010-12-111-165/+296
| | | | | | | | | | | This change resolves several issues with current appliance building: (1) Old appliances are cleaned up. (2) Race conditions between appliance building is handled better. (3) Several bugs fixed.
* Remove several unused local variables.Richard W.M. Jones2010-12-102-5/+0
| | | | (Revealed by compiling under Debian where this is a warning).
* build: Remove check for root.Richard W.M. Jones2010-12-091-11/+0
| | | | | | | With the new package building system, it is no longer dangerous to run 'configure', 'make' or 'make check' as root (although it is still not necessary and not advisable). In any case we don't need to check this.
* docs: Link to guestfs-examples(3) after simple example.Richard W.M. Jones2010-12-071-1/+2
|
* docs: Note that guestfs_sync is no longer necessary.Richard W.M. Jones2010-12-071-6/+4
|
* appliance: Change to using febootstrap 3.x supermin appliance.Richard W.M. Jones2010-12-051-6/+1
| | | | | | | | | This removes all support for building the ordinary / old style appliance using febootstrap 2.x, debootstrap, debirf, fakeroot and fakechroot. Instead this uses febootstrap 3.x to build the supermin appliance in a simpler cross-distro manner.
* appliance: Don't look for kmod.whitelist.Richard W.M. Jones2010-12-041-1/+1
| | | | This file is not used for building the supermin appliance.
* New API: mkfs_opts, mkfs with optional arguments.Richard W.M. Jones2010-12-021-1/+1
| | | | | | This is an extensible version of 'mkfs' which supports optional arguments. There is now no need for 'mkfs_b' since you should use 'mkfs_opts' with the optional 'blocksize' argument instead.
* generator: Code to handle optional arguments in daemon functions.Richard W.M. Jones2010-12-022-3/+4
| | | | | | | | Previously we only supported optional arguments for library functions (commit 14490c3e1aac61c6ac90f28828896683f64f0dc9). This extends that work so that optional arguments can also be passed through to the daemon.
* protocol: Handle progress notification messages during FileIn.Richard W.M. Jones2010-12-011-3/+30
| | | | | | | If the daemon sends progress notification messages while we are uploading FileIn parameters, these are received in check_for_daemon_cancellation_or_eof. Modify this library function so that it turns these messages into callbacks.
* protocol: Really read 4 bytes while checking for cancellation.Richard W.M. Jones2010-12-011-10/+49
| | | | | | | | | | | | We've not actually hit this bug in practice, but at least in theory while checking for cancellation we could read > 0 but fewer than 4 bytes, which would effectively be discarded and we would lose synchronization. Note the socket is non-blocking. Change the code so that we temporarily set the socket back to blocking and force the read of all 4 bytes.
* protocol: Send progress_hint in header.Richard W.M. Jones2010-12-012-3/+4
| | | | | | For actions that have FileIn arguments, count the size of all the input files and send that in the progress_hint field of the request header.
* protocol: Upload progress messages and optional arguments.Richard W.M. Jones2010-12-012-0/+10
| | | | | | | | Two unrelated changes to the protocol to support progress messages during uploads, and optional arguments. Note that this makes an incompatible change to the protocol, and this is reflected in the protocol version field (3 -> 4).
* Update API support.Richard W.M. Jones2010-11-2618-0/+7001
|
* Export private function 'guestfs___for_each_disk' for use by virt-df.Richard W.M. Jones2010-11-251-45/+87
| | | | | | This private function (not part of the API) allows us to iterate over disks from a guest, avoiding the business of writing all the XPath code yet again.