summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* resize2fs: Document this command also works with ext4 (thanks Yufang Zhang).Richard Jones2010-06-021-2/+2
| | | | | | For stable-1.2 branch: - cherry picked from commit 1020b212b189968ead013436cac79019fbd8fdad - rebased for 1.2 branch
* fish: help command return error for non-existent commands (RHBZ#597145).Richard Jones2010-06-021-3/+5
| | | | | | | | | | | | | | | | | | With this change, the exit status indicates error for non-existent commands. $ guestfish -h foo foo: command not known, use -h to list all commands $ echo $? 1 $ guestfish help foo foo: command not known, use -h to list all commands $ echo $? 1 For stable-1.2 branch: - cherry picked from commit f2b7a8e15c49ebc70c7ea56aefb340362aae5a99 - rebased for the 1.2 branch
* daemon: write-file: Check range of size parameter (RHBZ#597135).Richard Jones2010-06-021-1/+4
| | | | | | | | This also adds a regression test. For stable-1.2 branch: - cherry picked from commit 9733d4746988b3a072d8bb1daac4b9795b8f4134 - modify the regression test to apply against the generator
* Fix documentation for vfs-type to reflect reality.Richard Jones2010-06-021-5/+6
| | | | (cherry picked from commit 0f6c6239fe0d1b4624e4e9776559c21486a9c7cf)
* Clarify documentation on distro backports in version command.Richard Jones2010-06-021-2/+4
| | | | (cherry picked from commit 11eeb8885c7a8ffb59e12cd5fb2ae0fc324df383)
* Add reference to version number documentation to version command.Richard Jones2010-06-021-0/+2
| | | | (cherry picked from commit 8355d3245623c106439ca5ef66f24972c8e09019)
* Clarify sparse behaviour of truncate-size command.Richard Jones2010-06-021-2/+7
| | | | (cherry picked from commit d12a702fe1898f3ea421210d92c705440efe07a8)
* Fix typo in documentation of guestfs_readlinklist.Richard Jones2010-06-021-1/+1
| | | | (cherry picked from commit 4412fd951ee7766ee9a70bf66b5cf11378a64ed0)
* Fix missing word in docuentation of guestfs_readdir.Richard Jones2010-06-021-1/+1
| | | | (cherry picked from commit b8861242d13cc034383a56ba891d3e0b9123a99c)
* Fix typo in description of echo-daemon command.Richard Jones2010-06-021-2/+2
| | | | (cherry picked from commit c1e3cff523d72e8110cbc568a3c280e57c2aabca)
* guestfs_version: Correct documentation.Richard Jones2010-05-241-2/+3
| | | | | | Remove reference to 'ELF weak linking tricks' and replace with suggestion to use dl* functions. (cherry picked from commit 94030c5ce8b5848330e15e812a01064d5afcc6d0)
* generator: Some String parameters should be OptString (RHBZ#501894).Richard Jones2010-05-241-2/+2
| | | | | | I haven't checked the list of functions exhaustively, but these are the obvious ones. (cherry picked from commit e715451fae0ba738973af98a4e506b6c5564626a)
* Fix error message in strings-e command (RHBZ#588651).Richard Jones2010-05-141-4/+33
| | | | | | (cherry picked from commit 287f8957fea3efe411c7ac55595d5d6c7b613e4e and modified to apply to the stable branch. Note that the original commit message contains a typo 'string-e' instead of 'strings-e')
* launch: Rearrange the code so config check is first.Richard Jones2010-05-141-12/+12
| | | | | | | | Move the config state check first in the guestfs_launch function, so that we don't reset g->launch_t or calculate the temporary directory in the case where the launch function will immediately return with an error. (cherry picked from commit 55e9707f8591488542da48fc89738234b4d85016)
* If qemu dies during launch, set an error message (RHBZ#588851).Richard Jones2010-05-141-4/+11
| | | | (cherry picked from commit fc6dd9daa13ac774156d0822b5aa7830171feb85)
* daemon: Fix read-file so it fails gracefully for large files (RHBZ#589039).Richard Jones2010-05-141-1/+14
| | | | | | | | | | | | | | | | | Pengzhen Cao noticed that read-file would fail for files larger than the protocol size; this is *not* the bug. However it would also lose protocol synchronization after this. The reason was that functions which return RBufferOut in the generator must not 'touch' the *size_r parameter along error return paths. I fixed read-file and initrd-cat, and I checked that pread was doing the right thing. This also adds regression tests for read-file with various categories of large file. (cherry picked from commit 42f59b28f123f53ae038df23a9abee08e959e46b)
* Change network configuration to use macros.Richard Jones2010-05-141-5/+25
| | | | | | | | | | | | | | Change the network configuration so everything is set using some macros at the top of src/guestfs.c. Also, rename the macros used in the daemon so they are not the same. It was a very long time since these sets of macros had to match the ones defined in src/guestfs.c, despite what the comment said. Note that this commit should not change the semantics of the program at all. (cherry picked from commit 8a9f2ca65521d093ac14307aca4370d9497ac840)
* tests: In verbose mode, print dashes between each test.Richard Jones2010-05-141-0/+2
| | | | | | Only affects tests when run with LIBGUESTFS_DEBUG=1. Lets you easily see when each test starts and ends. (cherry picked from commit 097266e01cfa28319834bf750649650f3c22006f)
* Document that guestfs_mount implies -o sync and performance problem ↵Richard Jones2010-04-301-3/+14
| | | | | | (RHBZ#587582). (cherry picked from commit fd2d10d6ed91f417a9b99bb61526b45bb7ed3e4e)
* lvresize: Use --force so it can make LVs smaller (RHBZ#587484).Richard Jones2010-04-301-1/+8
| | | | | This also adds a regression test for this bug. (cherry picked from commit c24de46d06cc3ecccf00bfaaffb06172659cdd0a)
* guestfs(3): Documentation on protocol gotchas.Richard Jones2010-04-301-0/+17
| | | | (cherry picked from commit 55641f5d1e9964f8a039005b511b8e688c92cddb)
* docs: Routine refresh of the documentation for guestfs(3) and guestfish(1).Richard Jones2010-04-301-100/+96
| | | | | | | For stable branch: - cherry picked from commit ce95be8b185ce69 - updated the patch so it doesn't refer to any new guestfish features in the 1.3 branch
* Check user doesn't run configure, make or make check as root.Richard Jones2010-04-221-0/+11
| | | | | (Thanks to Yufang Zhang for helping to debug this issue). (cherry picked from commit 199f218bf431b77c12a728f7072bed1553a0f0af)
* Document new version numbering policy.Richard Jones2010-04-221-0/+63
| | | | | | | | | See discussion on mailing list: https://www.redhat.com/archives/libguestfs/2010-April/msg00005.html https://www.redhat.com/archives/libguestfs/2010-April/msg00057.html https://www.redhat.com/archives/libguestfs/2010-April/msg00058.html (cherry picked from commit 54a8f8f30de2f3132da97c54d07ca4639c405de1)
* Document umask (RHBZ#582548, RHBZ#583554).Richard Jones2010-04-201-1/+18
| | | | (cherry picked from commit c2a8efc548d6f997049cbb3d63bab360b0d946b6)
* docs: Clarify documentation for mknod (RHBZ#582948).Richard Jones2010-04-201-0/+8
| | | | (cherry picked from commit 42e43db927dac13da0afe6dba39708295eb06021)
* Documentation: Use 'g' instead of 'handle' in documentation.Richard Jones2010-04-202-48/+53
| | | | | | By convention we use 'g' for handles. Copy this convention through to all the documentation. (cherry picked from commit 2e0f3ed54b978925c79ca0d33e76bec338b23631)
* In guestfs(3), unmount "/" directory in the example.Richard Jones2010-04-201-0/+1
| | | | (cherry picked from commit 6e4bf8e278f5c8bd28eba7152d2f11d1e537ee1b)
* Add compilation/linking example to guestfs(3) man page.Richard Jones2010-04-201-0/+4
| | | | (cherry picked from commit 4680c732585b2c2d292f521f393215c7943096fa)
* generator: Fix typo in a comment.Richard Jones2010-04-201-1/+1
| | | | (cherry picked from commit 68467cb1c2f8b1cc7844ed6512b7f76ef2aba1d1)
* Improved checking, documentation of modes (RHBZ#582901, RHBZ#582929).Richard Jones2010-04-201-6/+22
| | | | | | | | | | | | 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. (cherry picked from commit 61ab83d19009a8006dd73ebe16d22494b78be4d1)
* Add a build test for the 'umask' command.Richard Jones2010-04-201-3/+2
| | | | (cherry picked from commit 116d497c68c2e57f6e92abf8834112a794a145f0)
* Documentation: lvcreate should say 'logical volume' (RHBZ#582953)Richard Jones2010-04-201-2/+2
| | | | (cherry picked from commit e64c1e5aacd605ea177972e56ede5be22ae13d4f)
* Documentation updates.Richard Jones2010-04-121-0/+13
| | | | | | | | | Fix copyright years. Fix URLs to point to new PRC site. Make sure guestfish(1) and guestfs(3) manpages reference the current list of tools. (cherry picked from commit 9a608a1516bd339dc6d5ebe9952d3bced273c416)
* New partition APIs: part_del, part_get_bootable, part_get/set_mbr_idRichard Jones2010-04-122-1/+56
| | | | | | | | | These APIs flesh out further the partitioning API. Note for stable-1.2 branch: Cherry picked from b68c030adfdbefe65bc9 and modified to apply against stable-1.2. We need these new APIs in order to support bugfixes in virt-resize.
* Documentation: Clarify documentation on the bootable flag.Richard Jones2010-04-121-4/+3
| | | | (cherry picked from commit 30752ac7ca042f533b8d0c4c6144400a8532b154)
* If qemu dies during launch in "null vmchannel" mode, don't hang (RHBZ#579155).Richard Jones2010-04-081-1/+9
| | | | | | | Detect if qemu dies during launch by wait(2)-ing for it, and then getting EOF on the qemu pipe. This was broken in null vmchannel mode, causing a hang. (cherry picked from commit e35debd642bea240609775610b68145dab0a634b)
* Don't kill self accidentally.Richard Jones2010-04-081-3/+3
| | | | | | | Always check that pid > 0 before calling kill (pid, 9). The issue was that sometimes pid == 0, and this ends up killing ourselves. (cherry picked from commit dc5df3bfec706803e75a5f2454293db30e753249)
* Fix for "warning: unexpected connection from UID ..."Richard Jones2010-04-081-0/+1
| | | | | | | | | This warning is currently a fatal error. The code attempts to retry the accept call, but because we don't reset sock = -1 the retry doesn't happen and it dies anyway. Set sock = -1 so the retry attempt can happen. (cherry picked from commit fb4ec82d97f71963ea7f830cb0bc38abefcbac99)
* fish: Print extended help when the user types an unknown command first.Richard Jones2010-04-081-0/+2
| | | | | | | | | $ guestfish /tmp/disk.img /tmp/disk.img: unknown command Did you mean to open a disk image? guestfish -a disk.img For a list of commands: guestfish -h For complete documentation: man guestfish (cherry picked from commit 4c50f4c38d9a50fbf983c79dd208d1b1598fef8a)
* tests: Move alarm(2) calls to the correct place in the tests.Richard Jones2010-03-271-3/+3
| | | | This is a re-fix for RHBZ#505329.
* rescue: Pass $TERM from library into the virt-rescue appliance.Richard Jones2010-03-261-0/+2
| | | | | We set it on the kernel command line, then get it out from there when the rescue appliance boots.
* appliance: Set $PATH instead of hard-coding paths to binaries everywhere.Richard Jones2010-03-261-1/+1
| | | | | | Change the appliance so PATH includes common directories. Thus we don't need to hard-code paths to binaries (eg. "/sbin/fdisk") everywhere.
* perl: use newSVpvn for variable length strings.Richard Jones2010-03-251-3/+3
| | | | | | | Previously we used newSVpv (str, len), but if len == 0 then this means Perl tries to calculate the string length using strlen(3). This is not desirable when we know the length, in which case we should use newSVpvn instead.
* New API: guestfs_copy_size to copy a fixed number of bytes.Richard Jones2010-03-232-2/+15
| | | | | | | 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.
* Change some _exit(0|1) to _exit(EXIT_SUCCESS|EXIT_FAILURE).Richard W.M. Jones2010-03-231-4/+4
|
* guestfs.h: Include <stdint.h>.Richard Jones2010-03-221-0/+1
| | | | | | | | This allows programs to work if they just #include <guestfs.h> and no other headers. It's not useful in the general case, but fixes some configure-time tests, particularly the one for Ruby on OS X.
* Mac OS X: Disable null vmchannel implementation.Richard Jones2010-03-221-1/+14
| | | | | | | | | As far as I can tell, Darwin has no way to check the peer euid of a _loopback_ TCP socket. This is required for the "null vmchannel" implementation to work securely. Therefore disable this - Darwin will use one of the other supported vmchannel implementations instead.
* Mac OS X: 'xdr_uint32_t' is 'xdr_u_int32_t'Richard Jones2010-03-221-0/+4
|
* Mac OS X: implement readline functions.Richard Jones2010-03-221-3/+12
| | | | | OS X has an older version of readline with some differences in the names of functions.