summaryrefslogtreecommitdiffstats
path: root/src/generator.ml
Commit message (Collapse)AuthorAgeFilesLines
...
* Proposal to add BufferIn and RBufferOut types (not implemented).Richard W.M. Jones2009-07-101-0/+22
|
* Add 'version' call to get true library version number.Richard Jones2009-07-101-1/+40
| | | | | | This patch also changes the way that the version is specified in configure.ac. It is now made out of four parts (major, minor, release and extra) and constructed for AC_INIT.
* Fix for returning structures (hashes) from Perl calls.Richard Jones2009-07-101-23/+26
| | | | | | | | Calls such as stat and statvfs which returned a single structure were returning an array of values instead of a full hash of keys + values. Fix this by pushing the key names on the stack too.
* Add Sys::Guestfs::Lib - useful functions for using libguestfs from Perl.Richard Jones2009-07-091-1/+8
| | | | | | | | | | This adds an extra Perl module called Sys::Guestfs::Lib which adds useful functions for using libguestfs from Perl. The intention is that common code shared between virt-inspector, virt-df and virt-v2v will move into this library. This patch also changes virt-inspector to use this library.
* Just whitespace changes in the generator code.Richard Jones2009-07-091-14/+14
|
* Fix checking of generator being run from the right directory.Richard W.M. Jones2009-07-071-1/+1
| | | | | | Originally it was looking for 'config.status', but this file might not exist until configure has been run. Make it look for HACKING instead.
* RHEL 5: for (int i = ...) is not permitted with this old version of GCC.Richard Jones2009-07-071-1/+8
|
* Generate structs and struct lists generically.Richard Jones2009-07-071-1183/+641
| | | | | | | | | | | This modifies the way that struct and struct lists are generated (for return values) so that there is no need to add an explicit new type when adding a new structure. All tests pass, and the C API should be compatible. I have also inspected the changes that are made to the generated code by hand.
* Add 'get-pid' command.Richard Jones2009-07-061-0/+9
| | | | | This is used to get the PID of the qemu subprocess, mainly for debugging and testing purposes.
* Make it possible to build in a separate directoryMatthew Booth2009-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | This patch allows you to do: mkdir build cd build ../configure ... make This will output all generated files to the build directory. Given that autogen automatically runs configure, you can also do: BUILDDIR=./build ./autogen.sh which will do the right thing. Also: * Fix a dependency bug which means that guestfs_protocol.h isn't automatically rebuilt. * Re-running autogen.sh with no arguments won't blow away your previous configure arguments.
* generate slightly more "const-correct" codeJim Meyering2009-07-031-6/+6
| | | | * src/generator.ml: Add a few "const" attributes.
* use safe_malloc and safe_calloc in generated codeJim Meyering2009-07-031-21/+23
| | | | | | | | | | * src/generator.ml (safe_malloc): Define to guestfs_safe_malloc. (safe_calloc): Define to guestfs_safe_calloc. [most generated code]: Fail immediately upon failure of otherwise- unchecked malloc and calloc calls. * src/guestfs.c: Include <stddef.h>. (xalloc_oversized): Define. * src/guestfs.h (guestfs_safe_calloc): Declare.
* prefer sizeof *VAR over sizeof TYPE (no semantic change)Jim Meyering2009-07-021-10/+10
| | | | | * src/generator.ml: Slightly safer, in case the declared type ever changes.
* Add 'sfdiskM' command.Richard W.M. Jones2009-07-021-29/+41
| | | | | | | | | | This command is a saner interface to partitioning. All partition sizes are specified in megabytes (not cylinders). You don't need to specify the cyls/heads/secs parameters. All the test code has been updated to use this, so it is now CHS-independent (eg. when CHS changes as between IDE and virtio).
* Add ./configure --with-drive-if=(ide|scsi|virtio)Richard W.M. Jones2009-07-021-2/+2
| | | | | | | | With this flag the packager can decide to default to a particular qemu drive model. The current default is 'ide', however note that we intend to change this in future to 'virtio' once some upstream regressions are fixed. Packagers can force a particular drive model if they wish.
* Add list of function_names to the daemon.Richard W.M. Jones2009-07-021-0/+20
| | | | | Messages which include the proc_nr can now also include the name of the actual function being called.
* Memoize the output of pod2text function in the generator.Richard W.M. Jones2009-07-021-24/+45
| | | | This speeds up the generator greatly.
* Generator now runs automatically when it has changed.Richard W.M. Jones2009-07-021-0/+7
|
* Add 'readdir' call.Richard W.M. Jones2009-07-021-24/+373
| | | | | | | | | | | | This adds a readdir call (mostly intended for programs). The return value is a list of guestfs_dirent structures. This adds the new types 'struct guestfs_dirent' and 'struct guestfs_dirent_list', along with all the code to return these in the different language bindings. Also includes additional tests for OCaml and Perl bindings to test this.
* Change to use virtio_blk (virtio block device) by default.Richard W.M. Jones2009-07-011-12/+18
| | | | | | | | | | | | | virtio_blk is the fast, virt-native block device driver supported by qemu and KVM. Note that virtio_blk device names are called /dev/vd*. Existing scripts should continue working because device name translation will silently change device names of the form /dev/sd* to /dev/vd* as required. See also: http://libguestfs.org/guestfs.3.html#block_device_naming
* Change statvfs test so it doesn't depend on device size.Richard W.M. Jones2009-06-301-2/+1
| | | | | | | | Current statvfs test depended on a lot of filesystem details which can change if the CHS of the underlying block device changes (eg. with the switch from IDE -> virtio). These are not really necessary to test the call, so instead just check for filesystem features.
* Clean up the output of the C API test code.Richard W.M. Jones2009-06-301-4/+6
| | | | | | | Set output mode to unbuffered so that we see ordinary output messages and errors at the same time. Align "skipped" messages.
* New commands: mknod, mkfifo, mknod_b, mknod_c and umask.Richard W.M. Jones2009-06-301-0/+70
| | | | | | | | | | These commands are used to create block and char device nodes or FIFOs (named pipes) in the filesystem. The umask command is required also because the permissions used by mknod are masked by the umask. Also document and guarantee that the umask starts as 022.
* Use octal numbers for modes in the test suite.Richard W.M. Jones2009-06-301-23/+23
| | | | | We have to use the OCaml convention (0o...). Note that in OCaml 0777 is a _decimal_ number. It'll catch you out.
* Add 'set_memsize'/'get_memsize' calls.Richard W.M. Jones2009-06-301-0/+29
| | | | | | Allow the qemu memory size to be specified either by API calls or by setting the LIBGUESTFS_MEMSIZE environment variable.
* Implement 'mkswap', 'mkswap_L' and 'mkswap_U' commands.Richard W.M. Jones2009-06-291-0/+24
| | | | | | These commands are used to make Linux swap devices. The mkswap_L command makes one with a label. The mkswap_U command makes one with a known UUID.
* Add mount-loop command (RHBZ#508668).Richard W.M. Jones2009-06-291-0/+8
| | | | | | | | | Loop device mounts don't work for the generic 'mount' commands because the first parameter should be a file not a device. We want to separate out files parameters from device parameters in the long term, so this adds a new mount-loop command for this purpose.
* Add 'initrd-list' command to list contents of initrd images.Richard W.M. Jones2009-06-291-0/+16
| | | | | | Add 'initrd-list' command to list the files inside (new-style) initrd images. Update virt-inspector to use this instead of the less efficient download/unpack locally method.
* Added 'du' command.Richard W.M. Jones2009-06-291-0/+16
| | | | This command estimates file usage for files and directories.
* Add 'df' and 'df-h' commands.Richard W.M. Jones2009-06-291-0/+25
| | | | | | | df and df-h commands can be used interactively to show disk space usage. Use existing statvfs command from programs.
* Implement "head", "head-n", "tail", "tail-n" commands.Richard W.M. Jones2009-06-291-0/+58
| | | | | These commands let you view parts of a large file without passing the whole file over the network connection.
* Prevent 'n' being used as a parameter name.Richard W.M. Jones2009-06-291-3/+3
| | | | | Parameters named 'n' sometimes break the Perl bindings, so check for this in the generator and prevent it.
* Implementation of 'wc_c', 'wc_w' and 'wc_l' commands.Richard W.M. Jones2009-06-291-0/+27
| | | | These commands count characters, words and lines in a file respectively.
* Implement TEST_ONLY environment variable to run selected tests only.Richard W.M. Jones2009-06-291-2/+5
| | | | | To run just selected tests, do: TEST_ONLY="hexdump mkfs" make -C capitests check
* Add large test files with standard content for the C API test.Richard W.M. Jones2009-06-291-1/+7
| | | | | Large test files with standard content for the C API test, and add a regression test for previous hexdump failure on large files.
* Haskell bindings: Implement bindtests.Richard W.M. Jones2009-06-281-2/+33
|
* Haskell bindings: Int and Int64 return types.Richard W.M. Jones2009-06-281-3/+3
|
* Haskell bindings: fix boolean arguments.Richard W.M. Jones2009-06-281-5/+2
|
* Haskell bindings: Fix integer arguments.Richard W.M. Jones2009-06-281-10/+13
|
* Clarify documentation for mkdtemp.Richard W.M. Jones2009-06-241-3/+6
|
* Add mkdtemp command.Richard W.M. Jones2009-06-241-0/+22
|
* Implement libtool library versioning.Richard W.M. Jones2009-06-231-0/+17
| | | | | | | | Use maximum proc_nr (MAX_PROC_NR) as a surrogate for the library ABI version, resulting in version numbers such as libguestfs.so.0.<MAX_PROC_NR>.0 for the final library. Add ABI guarantee to the documentation.
* Added 'scrub-*' commands for securely scrubbing filesystems.Richard W.M. Jones2009-06-231-1/+41
|
* Command line argument handling.Richard W.M. Jones2009-06-231-1/+1
|
* Check parameter types in Ruby bindings (RHBZ#507346).Richard Jones2009-06-221-0/+2
|
* Improve error message when appliance doesn't match library.Richard Jones2009-06-221-1/+1
|
* Missing \n character in Ruby bindings.Richard Jones2009-06-221-1/+1
|
* Add 'glob-expand' command.Richard Jones2009-06-221-0/+28
|
* Add 'sh' and 'sh-lines' commands.Richard Jones2009-06-221-2/+33
|
* Add tab-completion of guest filenames (currently disabled).Richard Jones2009-06-181-0/+6
|