summaryrefslogtreecommitdiffstats
path: root/generator
Commit message (Collapse)AuthorAgeFilesLines
...
* capitests: Allow tests to properly test optional arguments.Richard W.M. Jones2011-07-061-13/+31
| | | | | | For optional arguments, you can now specify empty string to mean no argument, except for String optional arguments where you must use "NOARG" (empty string meaning a supplied empty string argument).
* Implement inode option to mkfs_opts command.Nikita A Menkovich2011-07-041-2/+7
| | | | | | | This is needed because older versions of grub(for example in centos) do not understand filesystems created with newer version of e2fsprogs. By default in e2fsprogs 1.4+ creates partitions with 256 bit inode size, and grub expect 128 bit size.
* python: Add explicit g.close() method (RHBZ#717786).Richard W.M. Jones2011-06-301-0/+26
|
* fish: Add 'display' command for displaying graphical files.Richard W.M. Jones2011-06-281-0/+14
|
* New API: inspect-get-icon returns the guest icon.Richard W.M. Jones2011-06-281-0/+64
| | | | | | | | | | 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.
* generator: Fix functions with both RBufferOut and optional args.Richard W.M. Jones2011-06-282-10/+14
| | | | | | | | | | No current function returns RBufferOut and has optional args. Such functions would be generated incorrectly. RBufferOut implies a silent "size_t *size_r" argument is added after the regular arguments and before the optional arguments. Various changes to the code generator need to be made to take this into account.
* inspection: Remove note about root device string.Richard W.M. Jones2011-06-281-60/+0
| | | | | | | This is a fairly pointless note/warning since (a) you can't use the API if you don't pass a root device string and (b) the code gives you a good error message if you pass something that is not a root device string.
* guestfs.h: Tidy up *_argv structs and other #defines.Richard W.M. Jones2011-06-281-6/+18
|
* New API: mount-9p lets you mount 9p filesystems (RHBZ#714981).Richard W.M. Jones2011-06-221-0/+11
| | | | 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-0/+7
|
* trace: Print empty list correctly.Richard W.M. Jones2011-06-221-3/+5
| | | | | | | Empty lists returned by RStringList and RHashtable functions were incorrectly printed as [""]. Fix this so they are printed as [] instead.
* Enable deprecated option only with gcc >= 4.5.Richard W.M. Jones2011-06-201-1/+1
| | | | | | | Before gcc 4.5, the deprecated option did not take the optional string argument (see [1]). This caused compilation to fail with gcc < 4.5. [1] http://gcc.gnu.org/gcc-4.5/changes.html
* generator: Rewrite UUIDs that begin with zero byte.Richard W.M. Jones2011-06-131-0/+8
| | | | | | | In util-linux <= 2.19, mkswap -U cannot handle the first byte of the UUID being zero, so we artificially rewrite such UUIDs. See: http://article.gmane.org/gmane.linux.utilities.util-linux-ng/4273
* zero: Disable file test because of bug in file command.Richard W.M. Jones2011-05-181-3/+2
| | | | See: https://bugzilla.redhat.com/show_bug.cgi?id=705499
* New APIs: is-zero and is-zero-device, to test if file or device is all zeroes.Richard W.M. Jones2011-05-171-2/+26
|
* Document that guestfs_file output depends on file(1) command.Richard W.M. Jones2011-05-171-9/+6
| | | | | And therefore practically it cannot be part of the ABI since the output of file(1) itself changes from time to time.
* generator: Mark sfdisk functions as deprecated.Richard W.M. Jones2011-05-171-4/+4
| | | | Point to the part-* API calls as replacements.
* generator: Mark mount as deprecated.Richard W.M. Jones2011-05-171-1/+1
| | | | | | | Callers should use 'mount_options' or 'mount_vfs' instead. See also: http://libguestfs.org/guestfs.3.html#libguestfs_gotchas
* generator: Mark wait_ready as deprecated.Richard W.M. Jones2011-05-171-1/+1
| | | | | | The function has been a no op for a very long time. By marking it as deprecated we make it clear that you shouldn't call it in new code.
* generator: Check the flags fields.Richard W.M. Jones2011-05-171-0/+32
|
* Enable deprecation warnings on all C programs.Richard W.M. Jones2011-05-171-0/+3
|
* lib: Warn about deprecated functions (enable with -DGUESTFS_WARN_DEPRECATED=1).Richard W.M. Jones2011-05-171-10/+31
| | | | | | | | This allows C API users to be warned if they are using any deprecated functions. We don't warn about this by default. Users have to specifically request this by defining the cpp symbol GUESTFS_WARN_DEPRECATED as 1.
* lib: Add GCC version macro to the header file.Richard W.M. Jones2011-05-171-0/+5
| | | | This will be used to internally enable various GCC enhancements.
* lib: Add vertical space between each function in <guestfs.h>.Richard W.M. Jones2011-05-171-0/+2
|
* add-domain: Add allowuuid flag to allow UUIDs to be used for names.Richard W.M. Jones2011-05-061-1/+6
| | | | | | This makes a backwards-compatible change to the add-domain API. If the optional allowuuid flag is true then UUIDs can be used instead of names in the domain name parameter.
* doc: Use I<-...> for cross-references to command line options.Richard W.M. Jones2011-05-011-9/+9
| | | | This is now used consistently across all the documentation.
* python: Implement new event API.Richard W.M. Jones2011-04-222-2/+46
| | | | | This implements set_event_callback and delete_event_callback so that Python programs can use the new event mechanism.
* python: Rearrange C files for bindings.Richard W.M. Jones2011-04-221-80/+1
| | | | | | | Move the hand-written functions into two new files: guestfs-py.h and guestfs-py-byhand.c This is just code motion.
* perl: Decrement refcount in $g->delete_event_callback.Richard W.M. Jones2011-04-221-3/+7
| | | | This updates commit bc468c87d04b34faacd208c49cca4a5096e5103c.
* inspect: "centos" and "scientificlinux" are now separate distros.Richard W.M. Jones2011-04-211-1/+9
| | | | Previously we returned "rhel" for these, which was not accurate.
* python: Release Python GIL while running libguestfs calls.Richard W.M. Jones2011-04-181-0/+19
| | | | | | | | | | | | | | | | | | Release the Python global interpreter lock while running libguestfs calls. We don't release it around guestfs_create() because that is a short call that just allocates memory. We do release it around guestfs_close() since that is a potentially long-running (it can call wait(2) amongst other things). We also release it around all the other generated Python calls. We don't yet support callbacks into Python code (ie. the new event API). But when we do in future, we will need to also handle the GIL around those callbacks. This code is adapted from libvirt's python/typewrappers.h. Thanks to Dan Berrange for showing us how to do this properly.
* fish: Enhance guestfish win:... parsing to understand drive letters.Richard W.M. Jones2011-04-051-1/+1
|
* New API: inspect-get-drive-mappingsRichard W.M. Jones2011-04-051-0/+42
| | | | | | | | | | | | This returns the drive mappings from the Windows Registry. virt-inspector displays the drive mappings, giving output similar to this: <drive_mappings> <drive_mapping name="C">/dev/sda2</drive_mapping> <drive_mapping name="E">/dev/sdb1</drive_mapping> </drive_mappings>
* New API: inspect-get-windows-current-control-setRichard W.M. Jones2011-04-051-0/+16
| | | | | | | | | | | | | | This returns the actual registry key corresponding to CurrentControlSet (eg. it might be "ControlSet001"). Previously the inspection code was hard-coding ControlSet001. Now we use the correct control set, and also make it available to callers through the API. This commit also updates the virt-dhcp-address example so it uses this new API. virt-inspector displays the current control set when available.
* python: Convert any iterable argument to a list (RHBZ#693324).Richard W.M. Jones2011-04-041-1/+13
| | | | Thanks to Erez Shinan.
* du: Add pulse mode progress messages.Richard W.M. Jones2011-04-011-1/+1
|
* daemon: Introduce "pulse mode" progress events.Richard W.M. Jones2011-04-011-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a new form of progress event, where we don't know how much of the operation has taken place, but we nevertheless want to send back some indication of activity. Some progress bar indicators directly support this, eg. GtkProgressBar where it is known as "pulse mode". A pulse mode progress message is a special backwards-compatible form of the ordinary progress message. No change is required in callers, unless they want to add support for pulse mode. The daemon sends: - zero or more progress messages with position = 0, total = 1 - a single final progress message with position = total = 1 Note that the final progress message may not be sent if the call fails and returns an error. This is consistent with the behaviour of ordinary progress messages. The daemon allows two types of implementation. Either you can just call notify_progress (0, 1); ...; notify_progress (1, 1) as usual. Or you can call the functions pulse_mode_start, pulse_mode_end and/or pulse_mode_cancel (see documentation in daemon/daemon.h). For this second form of call, the guarantee is very weak: it *just* says the daemon is still capable of doing something, and it doesn't imply that if there is a subprocess that it is doing anything. However this does make it very easy to add pulse mode progress messages to all sorts of existing calls that depend on long-running external commands. To do: add a third variant that monitors a subprocess and only sends back progress messages if it's doing something, where "doing something" might indicate it's using CPU time or it's printing output.
* Generate progress messages during launch.Richard W.M. Jones2011-04-011-1/+1
| | | | | | | | | | | | | | | | | | | This commit generates approximate progress messages during the guestfs_launch call. Currently this code generates: 0 / 12: launch clock starts 3 / 12: appliance created 6 / 12: detected that guest kernel started 9 / 12: detected that /init script is running 12 / 12: launch completed successfully (Note this is not an ABI and may be changed or removed in a future version). Progress messages are only generated at all if 5 seconds have elapsed since the launch, and they are only generated for the ordinary appliance (not if using attach-method to attach to an existing virtio serial port).
* docs: Fix link to progress messages in guestfs(3).Richard W.M. Jones2011-04-011-1/+1
| | | | This updates commit 4e0cf4dbf8a8a96288f70114fdc3939da0aa7ad1.
* ruby: Don't segfault if callbacks throw exceptions (RHBZ#664558).Richard W.M. Jones2011-03-281-5/+44
| | | | | | | | | | | (Thanks Chris Lalancette). See: https://bugzilla.redhat.com/show_bug.cgi?id=664558#c6 Notes: Labels: bugfix, RHBZ#664558 Depends: 6a64114929a0b098f5a1e31e17e7802127925007
* inspector: Add detection of Slackware.Richard W.M. Jones2011-03-251-0/+4
| | | | Notes: Labels: feature
* New API: guestfs_inspect_get_product_variantRichard W.M. Jones2011-03-231-1/+31
| | | | | | | | | | This returns a product variant for inspected operating systems. In practice this is a useful way to distinguish between consumer and enterprise/server versions of Windows that otherwise have the same version number. Notes: Labels: feature
* proto: Fix both-ends-cancel case.Richard W.M. Jones2011-03-182-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case where both ends cancel at the same time (eg. both ends realize there are errors before or during the transfer), previously we skipped sending back an error from the daemon, on the spurious basis that the library would not need it (the library is cancelling because of its own error). However this is wrong: we should always send back an error message from the daemon in order to preserve synchronization of the protocol. A simple test case is: $ guestfish -N fs -m /dev/sda1 upload nosuchfile / libguestfs: error: open: nosuchfile: No such file or directory libguestfs: error: unexpected procedure number (66/282) (Notice two things: there are errors at both ends, and the loss of synchronization). After applying this commit, the loss of synchronization does not occur and we just see the library error: $ guestfish -N fs -m /dev/sda1 upload nosuchfile / libguestfs: error: open: nosuchfile: No such file or directory The choice of displaying the library or the daemon error is fairly arbitrary in this case -- it would be valid to display either or even to combine them into one error. Displaying the library error only makes the code considerably simpler. This commit also (re-)enables a test for this case.
* proto: Fix FileIn ops that abort during the chunk upload stage.Richard W.M. Jones2011-03-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a previous, incorrect attempt to fix RHBZ#576879 we tried to prevent the daemon from sending an error reply if the daemon had cancelled the transfer. This is wrong: the daemon should send an error reply in these cases. A simple test case is this: guestfish -N fs -m /dev/sda1 upload big-file / (This fails because the target "/" is a directory, not a file.) Prior to this commit, libguestfs would hang instead of printing an error. With this commit, libguestfs prints an error. What is happening is: (1) Library is uploading a file (2) In the middle of the long upload, daemon detects an error. Daemon cancels. (3) Library detects cancel, sends cancel chunk, then waits for the error reply from the daemon. (4) Daemon is supposed to send an error reply message. Because step (4) wasn't happening, uploads that failed like this would hang in the library (waiting for the error message, while the daemon was waiting for the next request). This also adds a regression test. This temporarily breaks the "both ends cancel" case (RHBZ#576879c5). Therefore the test for that is disabled, and this is fixed in the next patch in the series. This partially reverts commit dc706a639eec16084c0618baf7bfde00c6565f63.
* haskell: Small fixes for ghc 7.Richard W.M. Jones2011-03-181-1/+1
|
* perl: Binding and test for guestfs_last_errno (RHBZ#672491).Richard W.M. Jones2011-03-151-0/+34
|
* ruby: Use ALLOC_N to avoid potential memory leak (RHBZ#667610).Richard W.M. Jones2011-03-151-1/+1
|
* ruby: Remove unnecessary checking around StringValueCStr (RHBZ#667610).Richard W.M. Jones2011-03-151-5/+0
|
* ruby: Add rdoc documentation (RHBZ#667610).Richard W.M. Jones2011-03-151-5/+100
|
* New event API - Ruby bindings (RHBZ#664558).Richard W.M. Jones2011-03-152-7/+167
|