| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
| |
However this doesn't yet attempt to translate the POD
command documentation. We need a plan to do that.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Also we deprecate the old 'zfile' command.
|
| |
|
|
|
|
|
| |
This also speeds up those tests because we don't have to wait
to create a filesystem which is never used.
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
appliance kernel."
This reverts commit 34d2df41626f1ee4172a6d40b06d72d6ed9d6348.
|
|
|
|
| |
(So are the return values, but leave that bug for another day).
|
|
|
|
|
| |
This allows you to override the appliance kernel with an easy
command or environment variable.
|
|
|
|
|
|
| |
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"
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 35c646965a21d452cf74ef3683612210a653c36d.
As well as reverting this change, add a comment explaining that
configure must run first.
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
These constructors allow enhanced tests where we compare
the result of a test against some operator, eg. >= 1 or < 5
|
| |
|
|
|
|
|
| |
These two constructors are treated as identical, but they
should be distinct concepts.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Originally it was looking for 'config.status', but this file
might not exist until configure has been run. Make it look for
HACKING instead.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This is used to get the PID of the qemu subprocess, mainly for
debugging and testing purposes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* src/generator.ml: Add a few "const" attributes.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* src/generator.ml: Slightly safer, in case the
declared type ever changes.
|
|
|
|
|
|
|
|
|
|
| |
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).
|