summaryrefslogtreecommitdiffstats
path: root/daemon
Commit message (Collapse)AuthorAgeFilesLines
...
* New API: checksums-out for checksumming many files.Richard Jones2010-04-231-0/+84
| | | | Useful API for verifying the integrity of virtual machines.
* daemon: Split out checksum type to program name mapping into function.Richard Jones2010-04-231-14/+22
| | | | This shouldn't change the semantics of the program.
* New APIs: base64-in and base64-out for uploading/downloading base64 content.Richard Jones2010-04-192-0/+151
|
* New API: debug-upload (not a formal part of the API/ABI).Richard Jones2010-04-191-9/+82
| | | | | | | | | | | | Allow arbitrary files to be uploaded into the appliance, but only when --enable-debug-command is enabled. This lets you run shell scripts, like this: ><fs> debug-upload -<<EOF /tmp/script.sh 0700 #!/bin/sh - # ... EOF ><fs> debug sh "/tmp/script.sh"
* Fix upload losing synchronization if root not mounted (RHBZ#576879).Richard Jones2010-04-178-51/+34
| | | | | | | | | | | | Modify the generator so that it can correctly handle early cancellation for Pathname|Device|.. parameters. This fixes the upload command, but consequently we need to fix the parameters for tar_in and t?z_in commands. This should also mean that 'win:' can now be used as the second argument of tar_in and t?z_in commands in guestfish, whereas previously this wouldn't have worked. Adds a regression test for the original problem.
* Improved checking, documentation of modes (RHBZ#582901, RHBZ#582929).Richard Jones2010-04-174-0/+20
| | | | | | | | | | | chmod: Disallow negative mode, document mode affected by umask. mkdir-mode: Disallow negative mode, document that filesystems may interpret the mode in different ways. mknod: Disallow negative mode, document mode affected by umask. umask: Check the range of umask mask value carefully.
* New API: get-umask, returns the current umask (RHBZ#582891).Richard Jones2010-04-171-0/+17
|
* New API: Add aug-clear call for clearing an Augeas node.Richard Jones2010-04-131-0/+20
|
* New API: lvresize-free to extend LVs into percentage of free space.Richard Jones2010-04-121-0/+26
|
* New API: checksum-device for checksumming devices.Richard Jones2010-04-101-12/+24
| | | | Analogous to the usual 'checksum' call.
* New partition APIs: part_del, part_get_bootable, part_get/set_mbr_idRichard Jones2010-04-101-0/+101
| | | | These APIs flesh out further the partitioning API.
* daemon: More reliable parsing of the output from 'parted print'.Richard Jones2010-04-101-19/+33
| | | | | | | | Previously we used strtok. However this has the problem that strtok considers multiple delimiter characters to be like a single delimiter, eg. "1:::2" would be parsed the same as "1:2". In other words, the previous code would skip over or fail if there are empty fields.
* daemon: Make the RUN_PARTED macro take an error statement.Richard Jones2010-04-101-7/+9
| | | | | This allows us to make the RUN_PARTED macro do something else along the error path, other than just returning -1.
* New API: vgscanRichard Jones2010-04-101-0/+18
| | | | | Implement vgscan to allow for a full rescan of all LVM PVs, VGs and LVs.
* New API: ntfsresize.Richard Jones2010-04-101-0/+23
| | | | | This implements the ntfsresize operation, using the external program from ntfsprogs.
* Allow aug-ls to take Augeas variable as argument (RHBZ#580016).Richard Jones2010-04-091-4/+5
|
* New API calls to upload/download txz files (RHBZ#580556).Richard Jones2010-04-081-6/+34
|
* Code cleanups related to RHBZ#580246.Richard Jones2010-04-084-24/+32
| | | | | | | | | | | | | | This includes various code cleanups: (a) A regression test for RHBZ#580246. (b) Use write instead of fwrite to write out the tar file. This is just because the error handling of write seems to be better specified and easier to use. (c) Use size_t instead of int for length. (d) Clearer debug messages when in verbose mode.
* Fix tar-in command hangs when running out of disk space (RHBZ#580246).Richard Jones2010-04-082-3/+6
| | | | | | | | | | | | | | | | | | | | The problem was this sequence of events: (1) File transfer goes through OK. (2) pclose returns failure (because 'tar' subprocess failed) (3) We try to cancel the transfer by calling cancel_receive. Step (3) fails because the transfer (as far as the library is concerned) has succeeded, so causing a hang. The more fundamental reason why we see steps (1) and (2) is that 'tar' does NOT fail immediately if there is a write error. Instead it continues reading and discarding the input until the end of the input before giving "Error exit delayed from previous errors". IMHO this is a bug with tar, since an ENOSPC write error should be fatal for tar.
* Check error returns from posix_fallocate (RHBZ#579664).Richard Jones2010-04-071-4/+4
| | | | | | | | | | | | | | | | | | | | | posix_fallocate has a non-standard way to return error indications. Thus all our calls to posix_fallocate were effectively unchecked. For example: $ guestfish alloc test.img 1P $ echo $? 0 $ ll test.img -rw-rw-r--. 1 rjones rjones 0 2010-04-06 11:02 test.img $ rm test.img With this change, errors are detected and reported properly: $ ./fish/guestfish alloc test.img 1P fallocate: File too large This is a fix for: https://bugzilla.redhat.com/show_bug.cgi?id=579664
* Signed/unsigned warning on 64 bit.Richard Jones2010-04-071-1/+1
|
* New API: guestfs_zero_device to zero whole devices.Richard Jones2010-03-311-0/+37
|
* daemon: Set TERM=dumb inside the daemon.Richard Jones2010-03-301-0/+1
| | | | | | | | | | | | | | | Since commit 977edb3185fe8f we have been passing TERM from the library into the appliance (for the benefit of virt-rescue). However this changes the output of parted, which I would argue is a bug in parted: TERM=xterm /sbin/parted -m -- /dev/sda unit b print 2>&1 | hexdump -C 00000000 1b 5b 3f 31 30 33 34 68 42 59 54 3b 0a 2f 64 65 |.[?1034hBYT;./de| Notice the escape-sequence junk before the official "BYT;" header. By setting TERM=dumb we avoid this.
* Fix the error message when reply body is too large (RHBZ#509597).Richard Jones2010-03-271-1/+1
|
* Const-correctness fix.Jim Meyering2010-03-261-1/+1
|
* appliance: Set $PATH instead of hard-coding paths to binaries everywhere.Richard Jones2010-03-2615-68/+88
| | | | | | Change the appliance so PATH includes common directories. Thus we don't need to hard-code paths to binaries (eg. "/sbin/fdisk") everywhere.
* Fix lvresize test on RHEL 5, by fixing guestfs_e2fsck_l.Richard Jones2010-03-241-2/+9
| | | | | | | | | The problem is that mkfs was making an ext2 filesystem, which later we were checking with e4fsck. e4fsck corrects an "error" on the filesystem: /dev/VG/LV: Adding dirhash hint to filesystem. e4fsck returns 1 (errors corrected) which we were interpreting as an error return.
* Use ext4 dev tools on RHEL 5 (RHBZ#576688).Richard Jones2010-03-241-51/+85
|
* New API: guestfs_copy_size to copy a fixed number of bytes.Richard Jones2010-03-231-0/+81
| | | | | | | This is similar to 'guestfs_dd', but it copies just a fixed number of bytes from the source to the destination. It's an error if the source is too short or if the destination is too small.
* New APIs: Query the relationship between LVM objects.Richard Jones2010-03-181-0/+83
| | | | | | | | | These calls allow you to query the relationship between LVM objects, for example, which PVs contain a VG, or which LVs are contained in a VG. See the example / test program 'regressions/test-lvm-mapping.pl' for an example of how to do this from Perl.
* daemon: Add a trim utility function.Richard Jones2010-03-182-0/+24
| | | | | This function trims the whitespace from around a string. It does this in-place, so it can be called for malloc'd strings.
* Tab to space (whitespace fixes only).Richard Jones2010-03-121-1/+1
|
* Distribute .gitignore files.Richard Jones2010-02-151-1/+2
| | | | | These are useful for Debian since they keep the tarball unpacked in git.
* daemon: Don't need to prefix error messages with the command name.Richard Jones2010-02-1241-113/+116
| | | | | | | | | | | | | | | | | | | | The RPC stubs already prefix the command name to error messages. The daemon doesn't have to do this. As a (small) benefit this also makes the daemon slightly smaller. Code in the daemon such as: if (argv[0] == NULL) { reply_with_error ("passed an empty list"); return NULL; } now results in error messages like this: ><fs> command "" libguestfs: error: command: passed an empty list (whereas previously you would have seen ..command: command:..)
* New API call: initrd-cat to list a file from an initrd.Richard Jones2010-02-091-0/+121
|
* Implement 'vgrename' and 'lvrename' APIs.Richard Jones2010-01-281-0/+44
|
* Add 'filesize' call.Richard Jones2010-01-251-0/+18
| | | | | Returns the size of a file. You can already do this with 'stat', but this call is good for scripting.
* Update to latest Gnulib.Richard Jones2010-01-132-2/+7
|
* daemon: Work around udevsettle issue (RHBZ#548121).Richard Jones2009-12-181-21/+9
|
* daemon error handling: Define a new function reply_with_perror_errno.Richard Jones2009-12-072-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to save the errno from a previous call and pass it to reply_with_perror. For example, original code: r = some_system_call (); err = errno; do_cleanup (); errno = err; if (r == -1) { reply_with_perror ("failed"); return -1; } can in future be changed to: r = some_system_call (); err = errno; do_cleanup (); if (r == -1) { reply_with_perror_errno (err, "failed"); return -1; }
* daemon error handling: recursive_mkdir shouldn't need to set errno.Richard Jones2009-12-071-5/+11
|
* daemon error handling: Clear errno before calling stub functions.Richard Jones2009-12-041-1/+16
| | | | | | This just ensures that we accurately report errors, even if our error path code doesn't set errno. We won't end up with a bogus errno left over from a previous call.
* Whitespace change.Richard Jones2009-11-271-1/+1
|
* daemon: Move prototypes around to keep functions grouped logically.Richard Jones2009-11-261-3/+3
|
* Fix error handling in 'zero' function.Richard Jones2009-11-261-10/+7
|
* Make realpath call optional, disable it for Windows.Richard Jones2009-11-262-0/+16
|
* build: update gnulib submodule to latestRichard Jones2009-11-261-0/+1
|
* daemon: program_name must be defined for Gnulib error module.Richard Jones2009-11-261-0/+3
|
* daemon/Win32: use gnulib modules connect, socket and symlinkat (for readlinkat).Richard Jones2009-11-264-2/+38
|
* daemon/Win32: provide htonl, htons, ntohl, ntohs functions.Richard Jones2009-11-265-1/+90
| | | | These functions are not available on Windows.