summaryrefslogtreecommitdiffstats
path: root/daemon
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in error message.Richard Jones2009-07-221-1/+1
|
* Generator: Implement RBufferOut and "read-file" call.Richard W.M. Jones2009-07-211-0/+59
| | | | | | | | | 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.
* Make /sysroot path configurable.Richard Jones2009-07-1821-121/+127
| | | | | | | | | 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.
* New commands: 'mkmountpoint' and 'rmmountpoint'Richard W.M. Jones2009-07-151-0/+51
| | | | | | | | | | | | | | | | | | | | | 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-151-2/+29
|
* RHEL 5: header was called <sys/xattr.h>Richard W.M. Jones2009-07-142-3/+10
|
* Fix: daemon/xattr.c can now compile even when no xattr support.Richard W.M. Jones2009-07-141-3/+3
|
* Support for Linux extended attributes.Richard W.M. Jones2009-07-143-1/+289
| | | | | | | | | | | | | | | | 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.
* Implement new 'zfile' command, to show file type inside compressed files.Richard Jones2009-07-131-0/+60
|
* Generate structs and struct lists generically.Richard Jones2009-07-073-11/+11
| | | | | | | | | | | 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.
* Don't die if reply message is oversized (RHBZ#509597).Richard Jones2009-07-051-2/+7
|
* Make it possible to build in a separate directoryMatthew Booth2009-07-032-3/+3
| | | | | | | | | | | | | | | | | | | | | | 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.
* avoid leak upon failed reallocJim Meyering2009-07-031-8/+12
| | | | | * daemon/guestfsd.c (commandrv): Free original buffer (rather than leaking it) if realloc fails.
* remove trailing blanksJim Meyering2009-07-0344-44/+44
|
* daemon/readdir: avoid a small leakJim Meyering2009-07-031-0/+2
| | | | | * daemon/readdir.c (do_readdir): Free both p and v.name, in case only one of the allocations failed.
* Add 'sfdiskM' command.Richard W.M. Jones2009-07-021-2/+13
| | | | | | | | | | 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 list of function_names to the daemon.Richard W.M. Jones2009-07-023-2/+8
| | | | | Messages which include the proc_nr can now also include the name of the actual function being called.
* In verbose mode, daemon will display the time elapsed for each command.Richard W.M. Jones2009-07-021-0/+19
|
* avoid automake failureJim Meyering2009-07-021-1/+1
| | | | * daemon/configure.ac: Use AM_PROG_CC_C_O, not AC_PROG_CC_C_O.
* Remove generated code from git.Richard W.M. Jones2009-07-022-5018/+0
| | | | | | | | 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.
* Add 'readdir' call.Richard W.M. Jones2009-07-024-0/+137
| | | | | | | | | | | | 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.
* Call 'udevadm settle' after operations which add/remove device nodes.Richard W.M. Jones2009-07-014-0/+42
| | | | | | | | | | | | | 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.
* All instances of 'pclose' now check for return value != 0.Richard W.M. Jones2009-07-013-6/+6
| | | | | | 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.
* Fix error handling of external sfdisk command.Richard W.M. Jones2009-07-011-4/+3
| | | | | | | | 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.
* Change to use virtio_blk (virtio block device) by default.Richard W.M. Jones2009-07-012-3/+5
| | | | | | | | | | | | | 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
* Generated code for mknod, mkfifo, mknod_b, mknod_c, umask.Richard W.M. Jones2009-06-303-0/+165
|
* New commands: mknod, mkfifo, mknod_b, mknod_c and umask.Richard W.M. Jones2009-06-303-0/+117
| | | | | | | | | | 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.
* Generated code for the 'mkswap*' commands.Richard W.M. Jones2009-06-292-0/+88
|
* Implement 'mkswap', 'mkswap_L' and 'mkswap_U' commands.Richard W.M. Jones2009-06-292-0/+71
| | | | | | 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.
* Generated code for mount-loop command.Richard W.M. Jones2009-06-292-0/+30
|
* Add mount-loop command (RHBZ#508668).Richard W.M. Jones2009-06-291-0/+44
| | | | | | | | | 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.
* Fix memory leak in daemon/mount.c:do_mount_vfs.Richard W.M. Jones2009-06-291-0/+1
|
* Generated code for 'initrd-list'.Richard W.M. Jones2009-06-292-0/+32
|
* Add 'initrd-list' command to list contents of initrd images.Richard W.M. Jones2009-06-292-0/+89
| | | | | | 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.
* Generated code for 'du' command.Richard W.M. Jones2009-06-292-0/+30
|
* Added 'du' command.Richard W.M. Jones2009-06-292-0/+73
| | | | This command estimates file usage for files and directories.
* Generated code for df / df-h.Richard W.M. Jones2009-06-292-0/+40
|
* Add 'df' and 'df-h' commands.Richard W.M. Jones2009-06-292-0/+71
| | | | | | | df and df-h commands can be used interactively to show disk space usage. Use existing statvfs command from programs.
* Generated code for head/tail commands.Richard W.M. Jones2009-06-292-4/+136
|
* Implement "head", "head-n", "tail", "tail-n" commands.Richard W.M. Jones2009-06-292-0/+108
| | | | | These commands let you view parts of a large file without passing the whole file over the network connection.
* Generated code for 'wc_*' commands.Richard W.M. Jones2009-06-293-0/+183
|
* Implementation of 'wc_c', 'wc_w' and 'wc_l' commands.Richard W.M. Jones2009-06-291-0/+1
| | | | These commands count characters, words and lines in a file respectively.
* Generated code for 'mkdtemp' command.Richard W.M. Jones2009-06-242-0/+31
|
* Add mkdtemp command.Richard W.M. Jones2009-06-241-0/+30
|
* Generated code for 'scrub-*' commands.Richard W.M. Jones2009-06-232-0/+84
|
* Added 'scrub-*' commands for securely scrubbing filesystems.Richard W.M. Jones2009-06-232-0/+115
|
* Improve error message when appliance doesn't match library.Richard Jones2009-06-221-1/+1
|
* Make CHROOT_IN/OUT macros should loudly if the syscall fails.Richard Jones2009-06-221-4/+15
|
* Check return value from close() call.Richard Jones2009-06-221-1/+5
|
* The 'debug sh' command now uses a real shell.Richard Jones2009-06-221-9/+33
|