summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Add 'realpath' command.Richard W.M. Jones2009-07-312-1/+9
|
* Whitespace and comment changes.Richard Jones2009-07-291-1/+14
|
* guestfish: Make more strings translatable.Richard Jones2009-07-291-7/+8
| | | | | However this doesn't yet attempt to translate the POD command documentation. We need a plan to do that.
* tests: Use squashfs for static data where possible.Richard Jones2009-07-291-84/+57
| | | | | | | | | Instead of creating a new InitBasicFS for just about every test, where a test doesn't need to write to the filesystem it is far faster to use prepared data on an InitSquashFS instead. This commit changes as many tests as possible to make this so, making the tests much faster.
* tests: Fix read_file test.Richard Jones2009-07-291-4/+25
| | | | | | | | | The test ignored the fact that this function returns a (char *, size_t) pair, and just treated the char * as a string. This of course would fail if the string didn't happen to be nul-terminated. The tests are updated to add a new TestOutputBuffer type which should be used with functions that return RBufferOut.
* Implement '*grep*' family of commands.Richard Jones2009-07-292-1/+99
|
* Pass '-z' parameter to 'file' command so it looks inside compressed files.Richard Jones2009-07-281-3/+7
| | | | Also we deprecate the old 'zfile' command.
* Add DeprecatedBy flag to mark functions which are deprecated.Richard Jones2009-07-281-12/+53
|
* Add InitSquashFS test type, for tests that just use the squashfs (/dev/sdd).Richard Jones2009-07-271-45/+43
| | | | | This also speeds up those tests because we don't have to wait to create a filesystem which is never used.
* Pass cgroup_disable=memory, saves ~ 5MB of RAM.Richard Jones2009-07-241-1/+2
|
* get_append call can return NULL, but bindings didn't handle it.Richard Jones2009-07-231-32/+125
| | | | | It's not a good idea because there is no way to return an error indication. However at least this means it won't segfault.
* Revert "Add 'set-kernel'/'get-kernel'/LIBGUESTFS_KERNEL to override ↵Richard Jones2009-07-222-49/+1
| | | | | | appliance kernel." This reverts commit 34d2df41626f1ee4172a6d40b06d72d6ed9d6348.
* set-append and set-kernel parameters are both nullable.Richard Jones2009-07-221-2/+2
| | | | (So are the return values, but leave that bug for another day).
* Add 'set-kernel'/'get-kernel'/LIBGUESTFS_KERNEL to override appliance kernel.Richard Jones2009-07-222-1/+49
| | | | | This allows you to override the appliance kernel with an easy command or environment variable.
* Add commented-out support for alternate guestfwd syntax.Richard W.M. Jones2009-07-211-9/+32
| | | | | | This commit just moves code around. The new support is not enabled because it doesn't work. See qemu-devel, subject "guestfwd option doesn't allow supplementary ,server,nowait"
* Library: Pass more options on the Linux kernel command line.Richard W.M. Jones2009-07-211-1/+8
| | | | | | | Always pass: noapic (APIC causes problems for lots of people) udevtimeout=300 (for very slow qemu using softemu) acpi=off (ACPI is troublesome and unnecessary, so turn it off)
* Allow TMPDIR to override directory used for temporary files (RHBZ#512905).Richard W.M. Jones2009-07-211-1/+11
|
* Generator: Implement RBufferOut and "read-file" call.Richard W.M. Jones2009-07-212-53/+190
| | | | | | | | | This commit implements the RBufferOut type for returning arbitrary 8 bit data from calls. We also implement the guestfs_read_file call to read a whole file that can contain any 8 bit content, but up to a limit of ~ 2 MB.
* Docs: Fully document the guestfs_readdir ftyp return field.Richard W.M. Jones2009-07-211-0/+44
|
* Generator: Improve accuracy of a comment.Richard Jones2009-07-201-3/+2
|
* Fix for non-srcdir builds: more misc fixes.Richard Jones2009-07-161-4/+6
|
* Fix for non-srcdir builds: Run src/generator.ml from the srcdir.Richard Jones2009-07-162-5/+5
| | | | | | | Note that files generated by src/generator.ml are stored in the srcdir, *not* the builddir. The reason is so that they can be included in the tarball and will appear in the srcdir for tarball builds.
* New commands: 'mkmountpoint' and 'rmmountpoint'Richard W.M. Jones2009-07-152-1/+37
| | | | | | | | | | | | | | | | | | | | | These specialized commands are used to create additional mountpoints before mounting filesystems. They are only used where you want to mount several unrelated or read-only filesystems together, and need additional care to use correctly. Here is how to use these calls to unpack the "Russian doll" nest of a Fedora 11 live CD: add-ro Fedora-11-i686-Live.iso run mkmountpoint /cd mkmountpoint /squash mkmountpoint /ext3 mount /dev/sda /cd mount-loop /cd/LiveOS/squashfs.img /squash mount-loop /squash/LiveOS/ext3fs.img /ext3 The inner filesystem is now unpacked under the /ext3 mountpoint.
* New command: 'mountpoints' which returns a hash of device -> mountpoint.Richard W.M. Jones2009-07-152-2/+12
|
* Support for Linux extended attributes.Richard W.M. Jones2009-07-142-4/+126
| | | | | | | | | | | | | | | | This commit adds six calls to support Linux extended attributes. They are: getxattrs list all extended attributes for a file or directory setxattr add/replace an extended attribute removexattr remove an extended attribute lgetxattrs \ lsetxattr (same as above, but operate on symbolic links) lremovexattr / See attr(5) for more information. This also adds support for the FBuffer field type, which maps to an XDR opaque<> or a C (int, char *) pair.
* Improve launch error message.Richard Jones2009-07-141-1/+1
| | | | | | | | | | | | | The previous error message was confusing for new users: libguestfs: error: guestfs_mount: call launch() before using this function The new error message explains the action that the user must take, especially if they are using guestfish: ><fs> mount /dev/sda1 / libguestfs: error: guestfs_mount: call launch before using this function (in guestfish, don't forget to use the 'run' command)
* Implement new 'zfile' command, to show file type inside compressed files.Richard Jones2009-07-132-21/+32
|
* Automatically generate list of built java sourcesMatthew Booth2009-07-131-0/+9
|
* Revert "Fix checking of generator being run from the right directory."Matthew Booth2009-07-131-3/+5
| | | | | | | This reverts commit 35c646965a21d452cf74ef3683612210a653c36d. As well as reverting this change, add a comment explaining that configure must run first.
* Move BUILT_SOURCES so the comment is back in the right place.Richard Jones2009-07-131-11/+11
|
* Add tests to many non-daemon functions.Richard W.M. Jones2009-07-111-10/+25
| | | | | | | Tests are added to the following functions: get_qemu get_path get_append get_autosync is_ready is_config is_launching is_busy set_memsize get_memsize get_pid
* Add TestOutputIntOp, CompareWithIntOp.Richard W.M. Jones2009-07-111-1/+27
| | | | | These constructors allow enhanced tests where we compare the result of a test against some operator, eg. >= 1 or < 5
* Test for "version" command should be InitNone.Richard W.M. Jones2009-07-111-1/+1
|
* Add comment to the code about InitNone and InitEmpty.Richard W.M. Jones2009-07-111-1/+5
| | | | | These two constructors are treated as identical, but they should be distinct concepts.
* 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-102-1/+53
| | | | | | 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.
* Properly close fds and unregister handlers in guestfs_close.Richard Jones2009-07-101-0/+19
| | | | | | | | | This caused a segfault if you tried to repeatedly open and close a guestfs handle in the same program. The reason is that the old handler remained registered (not always - it was racey). This adds proper cleanup to the guestfs_close path, also for file descriptors.
* 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-073-1228/+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 a debug message to the library cancellation path.Richard Jones2009-07-061-0/+4
|
* Add 'get-pid' command.Richard Jones2009-07-062-0/+20
| | | | | 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-032-3/+7
| | | | | | | | | | | | | | | | | | | | | | 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-033-23/+63
| | | | | | | | | | * 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-022-30/+42
| | | | | | | | | | 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).