| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
These generated files were accidentally left in when we
removed the other generated files in cset
b3cb0b04eb2d38ba32c160a83d8e3894b376907b.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Messages which include the proc_nr can now also include the
name of the actual function being called.
|
|
|
|
|
| |
* src/Makefile.am (BUILT_SOURCES): Define.
($(BUILT_SOURCES)): Depend on stamp-generator.
|
|
|
|
|
| |
This file is required by configure, so we need to add it so
it is available after the git checkout.
|
|
|
|
| |
This speeds up the generator greatly.
|
|
|
|
|
|
|
|
| |
Git users now require the OCaml compiler in order to regenerate
the generated code after a checkout.
Generated code will remain in the tarball, so users of the
source tarball will not need the OCaml compiler.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
* src/guestfs.c (guestfs_error): Handle failing vasprintf.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Set output mode to unbuffered so that we see ordinary output
messages and errors at the same time.
Align "skipped" messages.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
We have to use the OCaml convention (0o...). Note that in
OCaml 0777 is a _decimal_ number. It'll catch you out.
|
| |
|
|
|
|
|
|
| |
Allow the qemu memory size to be specified either by API
calls or by setting the LIBGUESTFS_MEMSIZE environment
variable.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|