summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* generator: Refactor code for Perl bindings.Richard W.M. Jones2010-10-231-145/+132
| | | | | | | | This simplifies the code that generates the Perl bindings by removing repeated sections. Cherry picked from ea6209198026080a9d9e588283e83aa9c4e2f177 and backported to stable-1.2.
* generator: Missing newline character.Richard W.M. Jones2010-10-231-1/+1
| | | | Cherry picked from ed74706d80394fef709ec0258fc5cf7d974ff8b1.
* fish: Change 'int argc' to 'size_t argc' throughout.Richard W.M. Jones2010-10-231-2/+2
| | | | | Cherry picked from commit 6391d1a7cfa10337a75465c72d49df3c9ebc65ca and backported to stable-1.2 branch.
* fish: In guestfish(1) turn command references into links.Richard W.M. Jones2010-10-231-1/+1
| | | | | Cherry picked from commit 585fceb3350c17a3d6ed7f2daffd5e2b3e5fc3e1 and backported for stable-1.2 branch.
* generator: Fix incorrect shortdesc in docs for 'is-dir' command.Richard Jones2010-10-231-1/+1
| | | | (cherry picked from commit 55b6e18f95950b1a2ec69d549c9e6c8a5758d166)
* generator: Fix documentation for 'is-file' command.Richard Jones2010-10-231-2/+2
| | | | (cherry picked from commit 22aa9268f548eab9763311a080859d8cf2257a93)
* guestfs: Reference guestfs-browser architecture in threads documentation.Richard Jones2010-10-231-0/+3
| | | | (cherry picked from commit 13be76168260ee57e3d134177066ca7ceb984092)
* guestfs: More accurate documentation for initial message.Richard Jones2010-10-231-4/+3
| | | | (cherry picked from commit e2ef068cb7d18f0c0d4931f97332a38ea4ea2477)
* guestfs: Remove traces of documentation for non-existent 'low-level API'Richard Jones2010-10-231-13/+10
| | | | (cherry picked from commit 6d9f8f5c140c3116fb0292fcf73f560812c7d5fb)
* guestfs: Fix typo in man page.Richard Jones2010-10-231-1/+1
| | | | (cherry picked from commit f3c05da4f9c226c18476eb135dfcb5875d65bf63)
* build: guestfs-structs.h was missing from libguestfs_la_SOURCES.Richard Jones2010-09-081-0/+1
| | | | (cherry picked from commit 5fc69ce3ece5e4d4a3da9d78da244c4fa301b5ac)
* perl: Add documentation about testing availability of methods and features.Richard Jones2010-09-081-0/+31
| | | | (cherry picked from commit 0f24424f357e854a9da382de11e4fe81305c8743)
* Consistent use of 'void *opaque' to refer to opaque pointer in C API.Richard Jones2010-09-082-9/+9
| | | | | | | | We inconsistently used 'void *data' or 'void *opaque' all over to refer to the same thing. Use 'void *opaque' in all places in the published API and documentation. Cherry picked from commit 867319ec5f9030d3c14c32e3302606f2bf11ac27.
* Rename global 'xdr_str'.Richard Jones2010-08-261-5/+5
| | | | | | | | Two bits of XDR both contained a definition called 'str' which means that 'xdr_str' was being exported globally twice. Because of the linker script this didn't affect us. But it's best to rename this global so that conflicts cannot arise. (cherry picked from commit 27ef6f9171127afd248f38d280cf3d0eae51fdaf)
* Add -nodefconfig command line option to qemu.Daniel Berrange2010-08-261-0/+3
| | | | | | | | Without this option, qemu will read some defaults from /etc/qemu/ configuration files. Cherry picked from commit 6d15d4e7c27477507ba355384a340ce86cec617b and backported to stable 1.2 branch.
* Whitespace change: Add blank line between structures and functions.Richard Jones2010-08-261-0/+1
| | | | (cherry picked from commit 4d2f1632ad655130fafab3bf7fe8fa5cb59705d8)
* Build workaround for Python 2.4.x in RHEL 5.Richard W.M. Jones2010-08-171-0/+6
| | | | | | See: http://www.python.org/dev/peps/pep-0353/#conversion-guidelines (cherry picked from commit 012b1c71f4eda3ae779da51d7d81c199d90f667d)
* generator: Fix typo in error message for RConstOptString.Richard Jones2010-08-171-1/+1
| | | | (cherry picked from commit 29925244c1be2d1d5f71d46eba205278624a1366)
* Move variable initialization close to variable use.Richard Jones2010-08-171-3/+3
| | | | (cherry picked from commit 2fd8c259d3daa88b0cdf98090bb57f3dbd178432)
* Revert "add_drive_ro adds readonly=on option if available." (RHBZ#617200).Richard Jones2010-08-172-21/+5
| | | | | | | | | | | | | | | | | | | Adding the readonly=on option is not so clever. This causes qemu to present the disk as read-only to the guest. (The expected behaviour of snapshots=on,readonly=on was that it would open the disk O_RDONLY but present a writable disk to the guest). Since the guest sees a read-only disk, we are unable to do any recovery if a filesystem on the disk is inconsistent. This basically prevents most accesses to live disk images. What we really want is a qemu option which presents a writable disk to the guest, but only opens the disk on the host side with O_RDONLY, to alleviate the udev bug RHBZ#571714. This reverts commit 676462684e05dd8341dd695762dd99a87d8ec022. (cherry picked from commit 799d52be4f08f6c70c0e8ba1aa7367ba4cdd78c4)
* generator: Remove unnecessary parameter.Richard Jones2010-08-171-3/+4
| | | | | | | | The 'name' parameter is not used on the right hand side of the match, so it can be removed. Cherry picked from commit 2e7da2a2f3bbc6d6db148d7dc2ce238bf56f34db and rebased for stable branch.
* Use an unsigned type (size_t) for all loop iterators.Richard Jones2010-08-171-22/+27
| | | | | | | | | | This resolves a warning from gcc 4.5: assuming signed overflow does not occur when simplifying conditional to constant This page explains the issues in some detail: http://www.airs.com/blog/archives/120 (cherry picked from commit 321ca1ef91a90cec5b94058b84420e8018e3f1d8)
* generator: Don't hard-code name in DeviceList check.Richard Jones2010-08-171-3/+6
| | | | | | | | Only one function currently uses DeviceList. The generated code unfortunately hard-coded the argument name from that function. Cherry picked from aac51942aab63a9355ad6724345ea923148bf2a9 and rebased for stable branch.
* ocaml: Fix thread safety of strings in bindings (RHBZ#604691).Richard Jones2010-07-121-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | There's a thread safety issue with the current OCaml bindings which is well explained in the bug report: https://bugzilla.redhat.com/show_bug.cgi?id=604691 This commit fixes the safety issue by copying strings temporarily before releasing the thread lock. Updated code looks like this: char *filename = guestfs_safe_strdup (g, String_val (filenamev)); int r; caml_enter_blocking_section (); r = guestfs_add_drive_ro (g, filename); caml_leave_blocking_section (); free (filename); if (r == -1) ocaml_guestfs_raise_error (g, "add_drive_ro"); Also included is a regression test. For stable-1.2 branch: - cherry picked from commit 1079f74704a06c06996e547fdecf20a8f92799c6 - generator code rebased
* Fix typo in documentation of guestfs_set_launch_done_callback.Richard Jones2010-07-121-1/+1
| | | | (cherry picked from commit 91b00dc092be17a309f14fc35f41dbf1e41c4c58)
* generator: Allow individual tests to depend on daemon features.Richard Jones2010-07-121-2/+12
| | | | | | | | | Using IfAvailable "featurename" we allow individual tests to only run if the feature is available in the daemon. This will allow us to extend testing to a lot more optional features such as NTFS. (cherry picked from commit f9d08600c52dc0730e7dad8d9259b59e32aeece2)
* tests: Factor out common code into 'is_available' function.Richard Jones2010-07-121-10/+16
| | | | | This commit is just code motion. (cherry picked from commit cbe80b2bcfdee437d195f25aaf6f5d96329ab360)
* grub-install: In docs suggest manually creating device.map (RHBZ#484986).Richard Jones2010-07-121-1/+12
| | | | (cherry picked from commit dccd9b8f525cfae49b89c38066d752e6c054c7f6)
* 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