summaryrefslogtreecommitdiffstats
path: root/generator
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a new internal-autosync API to perform autosync.Richard W.M. Jones2011-01-281-3/+13
| | | | | | | | | 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.
* Add a prefix to output when tracing (RHBZ#673479).Richard W.M. Jones2011-01-281-17/+27
| | | | | | | | | | | | | | | | | | | Also separate the call and return lines so that everything can be easily 'grepped' from debug output. The trace output now looks like this: $ guestfish -x -N fs exit libguestfs: trace: is_config libguestfs: trace: is_config = 1 libguestfs: trace: add_drive "test1.img" libguestfs: trace: add_drive = 0 libguestfs: trace: is_config libguestfs: trace: is_config = 1 libguestfs: trace: launch libguestfs: trace: launch = 0 libguestfs: trace: part_disk "/dev/sda" "mbr" libguestfs: trace: part_disk = 0 &c.
* mkfs-opts: Add optional "features" parameter.Nikita A Menkovich2011-01-261-2/+13
| | | | | This allows the -O parameter to be added to the mkfs command line. This is used to select filesystem features.
* mkfs-opts: Add a note about blocksize param and UFS filesystems.Nikita A Menkovich2011-01-261-0/+2
|
* generator: Fix generation of library-side stubs with optional String arguments.Richard W.M. Jones2011-01-261-1/+1
|
* Add ability to inspect install disks and live CDs.Richard W.M. Jones2011-01-151-0/+75
| | | | | For examples of the virt-inspector output, see the additional inspector/example-*.xml files in this commit.
* New API: resize2fs-M to resize ext2/3/4 to minimum size.Nikita A Menkovich2011-01-141-0/+13
|
* fish: Don't fail if some mountpoints in /etc/fstab are bogus (RHBZ#668574).Richard W.M. Jones2011-01-111-0/+4
| | | | | | | | | | | | | | | | | Fix guestfish (and other C tools) so that they ignore errors when /etc/fstab contains bogus entries. Update the documentation for inspect-get-mountpoints to emphasize that callers must be aware of this when mounting the returned values. Add a regression test. Update the example code ("inspect_vm") to reflect the way this API ought to be called. For more detail see: https://bugzilla.redhat.com/show_bug.cgi?id=668574
* docs: add-domain: Remove ref to not impl add-libvirt-dom API call.Richard W.M. Jones2010-12-301-3/+1
|
* docs: Obsolete HACKING file, move content into guestfs(3) man page.Richard W.M. Jones2010-12-192-4/+4
| | | | | | Add a new section called "EXTENDING LIBGUESTFS" to the guestfs manual page which contains all the information previously in "HACKING".
* docs: Fix link to function in documentation of "du" and "du-s" commands.Richard W.M. Jones2010-12-171-2/+2
|
* New APIs: getxattr and lgetxattr to get single extended attributes.Richard W.M. Jones2010-12-161-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* generator: List files generated in a separate file.Richard W.M. Jones2010-12-124-5/+26
|
* New API: mkfs_opts, mkfs with optional arguments.Richard W.M. Jones2010-12-021-1/+28
| | | | | | 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-024-159/+240
| | | | | | | | 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.
* fish: Fix generation of code to handle Int/Int64 optional arguments.Richard W.M. Jones2010-12-021-2/+4
|
* Fix argv struct mixup over Int/Int64.Richard W.M. Jones2010-12-021-2/+2
|
* Add progress notification messages to upload and upload-offset APIs.Richard W.M. Jones2010-12-011-2/+2
|
* protocol: Send progress_hint in header.Richard W.M. Jones2010-12-011-3/+31
| | | | | | 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-011-1/+3
| | | | | | | | 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).
* capitests: Convert many InitBasicFS tests to InitScratchFS.Richard W.M. Jones2010-11-301-392/+440
| | | | | | | | | These tests run much more quickly if you don't have to run 'mkfs' and (particularly) partitioning/LV commands between each test. The total time for running 'make -C capitests check' on my laptop has gone from 413 seconds down to 221 seconds.
* capitests: Add 'InitScratchFS' test environment.Richard W.M. Jones2010-11-303-8/+38
| | | | | | This should allow us to perform filesystem-based write tests much more quickly, because we don't need to recreate the filesystem from scratch each time.
* capitests: Move test documentation into HACKING file.Richard W.M. Jones2010-11-301-32/+1
|
* capitests: Use /dev/sdc for misc tests (instead of /dev/sdb).Richard W.M. Jones2010-11-301-9/+9
| | | | | | | | This change means that /dev/sdb is not being used during the tests (except passively, eg. in listings of devices). This allows us (in a forthcoming commit) to use /dev/sdb as a quick scratch filesystem for testing writes.
* fish: Don't use external pod2text program.Richard W.M. Jones2010-11-261-17/+19
| | | | | | | This removes the dependency from guestfish to the external pod2text program (and hence the final dependency on perl for guestfish). This is done by storing the formatted pod2text output in guestfish as the help text.
* generator: More options for internal pod2text generator.Richard W.M. Jones2010-11-262-13/+29
| | | | | | | | Allow extra width, and trimming options. This necessitates a change in the memoized format. To avoid causing crashes if a new generator loads the old format, also change the filename of the memo file.
* Export private function 'guestfs___for_each_disk' for use by virt-df.Richard W.M. Jones2010-11-251-0/+4
| | | | | | 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.
* generator: Remove unused variable.Richard W.M. Jones2010-11-241-1/+1
|
* ocaml: Fix some unused parameter warnings in OCaml bindings.Richard W.M. Jones2010-11-231-1/+2
|
* generator: trace mode prints return values.Richard W.M. Jones2010-11-171-3/+82
|
* generator: Make return value into an explicit variable.Richard W.M. Jones2010-11-171-11/+45
| | | | This is just code motion.
* generator: Make trace flag an explicit variable.Richard W.M. Jones2010-11-171-1/+4
| | | | This is just code motion.
* New API: inspect-get-hostname to return the hostname of the guest.Richard W.M. Jones2010-11-161-0/+15
| | | | | This returns the hostname of the guest. Tested on RHEL, Fedora, Debian 5, Ubuntu 10.10, FreeBSD 8, Windows 7.
* New API: inspect-list-applications.Richard W.M. Jones2010-11-152-0/+116
| | | | | | | | This converts the current Perl code in virt-inspector for listing applications, into C, making it a part of the core API. This is also capable of fetching the list of Windows applications from the registry.
* inspect: Add support for Linux Mint and Mandriva.Richard Jones2010-11-151-1/+9
| | | | | | | | 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.
* docs: Put list of distros in alphabetical order.Richard Jones2010-11-151-5/+5
|
* docs: Debian and Ubuntu are now separate distros.Richard Jones2010-11-151-1/+1
|
* inspect: Inspection support for FreeBSD.Richard W.M. Jones2010-11-131-0/+4
| | | | | | | | | | 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.
* New APIs: inspect-get-package-format, inspect-get-package-management.Richard Jones2010-11-121-0/+46
| | | | 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-112-2/+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.
* Be less verbose in the macros defending typedefs in <guestfs.h>.Richard W.M. Jones2010-11-111-16/+16
| | | | This updates commit 4d59e271046f2b5f0d9b1730cd23425fd631c76c.
* build: xml-light is no longer required (thanks Maxim Koltsov).Richard W.M. Jones2010-11-111-2/+2
| | | | | | At some point we removed the last thing that required xml-light, but were still testing for it at various places in the build. This removes all traces.
* Defend all typedefs in <guestfs.h> with #ifdefs.Richard W.M. Jones2010-11-111-0/+29
| | | | | This allows other libraries to redefine those typedefs if they need to use but not depend on <guestfs.h>.
* lib: Make <guestfs.h> be completely generated.Richard W.M. Jones2010-11-112-23/+111
| | | | | This removes the 'not-quite-separate' guestfs-actions.h and guestfs-structs.h files.
* New API: add-domainRichard Jones2010-11-111-0/+61
| | | | | | | | | | | | | | | | | | | This new API allows you to add the disks from a libvirt domain. In guestfish you can use the 'domain' command to access the API, eg: ><fs> domain Fedora14 libvirturi:qemu:///system 1 The returned number is the number of disks that were added. Also here is a proposed (but commented out) low-level API which would allow you to add a domain from a virDomainPtr. However there are several problems with this API -- see discussion on the list: https://www.redhat.com/archives/libguestfs/2010-November/thread.html#00028
* generator: Add Pointer parameter type to the generator.Richard Jones2010-11-1017-26/+95
| | | | | | | | | | | | | | | | | | | This allows generic "foo *bar" pointers to be passed to library functions (not to daemon functions). In the language bindings (except Perl) these are handled as generic int64s with the assumption being that any pointer can be converted to and from this. There is room to add specific support for some pointer types in future by specializing the match cases. However this is inherently tricky because it depends on the implementation details of other bindings (eg. to support virDomainPtr in OCaml depends on the implementation details of the ocaml-libvirt project). Perl is slightly different in that you have to supply a typemap. Again this would depend on the implementation detail of an external library unless you supplied a generic typemap for int64.
* New API: debug-cmdline for printing QEMU command line (internal only).Richard W.M. Jones2010-11-101-0/+7
| | | | | This is an internal-only debugging API so may be changed or removed at any time in the future.
* Don't include debug* commands in the documentation.Richard W.M. Jones2010-11-101-2/+2
|
* ocaml: Error on compiler warnings.Richard Jones2010-11-091-1/+1
|
* New API: inspect-get-roots to return roots from last inspection.Richard W.M. Jones2010-11-051-0/+13
| | | | | Return the roots found by the last call to inspect-os, but without redoing the whole inspection.