| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Currently /sysroot is hard-coded throughout the daemon code.
This patch turns the path into a variable so that we can change
it in future, for example to allow standalone mode to be implemented.
This patch was tested by running all the C API tests successfully.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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 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.
|
|
|
|
|
| |
* daemon/guestfsd.c (commandrv): Free original buffer (rather
than leaking it) if realloc fails.
|
| |
|
|
|
|
|
| |
* daemon/readdir.c (do_readdir): Free both p and v.name, in case
only one of the allocations failed.
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
Messages which include the proc_nr can now also include the
name of the actual function being called.
|
| |
|
|
|
|
| |
* daemon/configure.ac: Use AM_PROG_CC_C_O, not AC_PROG_CC_C_O.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because udev operates asynchronously, we found errors which were
caused by a previous command (eg. sfdisk or pvremove) creating
or removing a device, and that change not having happened by the
time the next command was run.
This patch adds calls to '/sbin/udevadm settle' after any commands
which can add or remove device nodes.
If udev is not being used or not available, this should have no
effect. The command fails and this is silently ignored.
|
|
|
|
|
|
| |
We are generally interested that the subcommand ran without
error, ie. had exit status of 0. 'pclose' returns the exit
status, so we now check that pclose (fp) != 0.
|
|
|
|
|
|
|
|
| |
Should use 'pclose' instead of 'fclose' (although fclose happens
to work because of glibc internals).
The result of pclose is the exit status of the command, so we
need to test this is != 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This command estimates file usage for files and directories.
|
| |
|
|
|
|
|
|
|
| |
df and df-h commands can be used interactively to show disk
space usage.
Use existing statvfs command from programs.
|
| |
|
|
|
|
|
| |
These commands let you view parts of a large file without
passing the whole file over the network connection.
|
| |
|
|
|
|
| |
These commands count characters, words and lines in a file respectively.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|