summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* generator: No need to redefine safe_* macros.Richard Jones2010-08-261-7/+0
| | | | | | These are already defined in "guestfs-internal.h" which is included in the .c file. (cherry picked from commit 3cd272fc6acb043b4002dbcbbf741cecbc4820be)
* Add safe_strndup call.Richard Jones2010-08-262-0/+10
| | | | (cherry picked from commit 3905cc7ab496549b6ca0a0f67ec61d1d16968c33)
* Version 1.4.2.1.4.2Richard Jones2010-08-1713-422/+422
|
* generator: Fix typo in error message for RConstOptString.Richard Jones2010-08-171-1/+1
| | | | (cherry picked from commit 29925244c1be2d1d5f71d46eba205278624a1366)
* Rename internal functions.Richard Jones2010-08-173-12/+12
| | | | | | | | This is an update to commit 41f25ab3df5f306ac717fa7a6efd58328d30c1ae. Internal functions should be named guestfs___* (3 underscores) to avoid clashing with the implementation of actions (2 underscores). (cherry picked from commit 737181bcd7b1de8c3a613d6282030c34efa78fb6)
* Rearrange library code into separate files.Richard Jones2010-08-176-2199/+2356
| | | | | | | | | | | | | | | We split the library code into these separate files: - guestfs.c: creating handles, closing handles, handle-related variables - actions.c: generated library-side stubs for each action - bindtests.c: generated code to test bindings - launch.c: launching the appliance - proto.c: the library side of the daemon communications protocol This is just code movement. Cherry picked from commit 41f25ab3df5f306ac717fa7a6efd58328d30c1ae and rebased for stable branch.
* Rename guestfs-{actions,bindtests}.c to {actions,bindtests}.cRichard Jones2010-08-175-11/+11
| | | | | | Rename these two generated files, in preparation for splitting up the main src/guestfs.c file. (cherry picked from commit a617f521a4f695a63ced1c734128dc6c05b7024f)
* regressions: Don't print misleading 'Expect error ...' lines.Richard Jones2010-08-177-5/+27
| | | | | | | | | | | | | | Some tests in the regressions directory deliberately print error messages. As long as they still PASS, this is OK. However these tests also printed some misleading messages about what error to expect. Since error messages were slightly different across distros, these messages were not accurate. Therefore remove these messages, and replace with a general message before all tests telling users not to worry about errors from the tests as long as the tests don't fail. (cherry picked from commit e7ee6eebed6ee3a5b56c0482ba2770e697d8febc)
* 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-4/+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)
* Use an unsigned type (size_t) for all loop iterators.Richard Jones2010-08-172-23/+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 commit aac51942aab63a9355ad6724345ea923148bf2a9)
* build: Don't warn about 'long long'.Richard Jones2010-08-171-0/+2
| | | | | | Various language bindings simply need this, so we have to allow it even though it's a GCC extension. (cherry picked from commit 0c0976496dafda4d172c5a7fc787d6a87d5bce8d)
* doc: Add guestfish 'lvcreate 1M' gotcha.Richard Jones2010-08-171-0/+21
| | | | (cherry picked from commit 5b77be72bc4e46c7a53a24f1eb4cbd107a708f17)
* Version 1.4.11.4.1Richard Jones2010-07-1214-87/+87
|
* tar: Remove redundant use statement.Richard Jones2010-07-121-1/+0
| | | | (cherry picked from commit 70d27f6e796097630134bd8ebc2b65a65b1bf5c4)
* edit: Clean up temporary files.Richard Jones2010-07-121-1/+1
| | | | | | | | | Note to self: The 'tempfile' function does *not* default to removing files with the program exits! For stable-1.4 branch: - Cherry picked from commit 10ea14a3f1adb7023dd0601e4759bd24a030a1c3 - Rebased
* Prepare for new stable branch, starting at version 1.4.0.1.4.0Richard Jones2010-07-0816-520/+557
| | | | | | | Add BUGS and RELEASE-NOTES to EXTRA_DIST. Update RELEASE-NOTES by copying the final file from the development branch.
* fish: Don't fail if -m and --listen flags are both given (RHBZ#612178).Richard Jones2010-07-071-0/+11
| | | | | | | | | | | | | Testing this against a Fedora disk image: $ ./fish/guestfish --ro -a F13.img -m /dev/sda1 --listen export GUESTFISH_PID=6033 $ ./fish/guestfish --remote=6033 -- ping-daemon $ ./fish/guestfish --remote=6033 -- ping-daemon $ ./fish/guestfish --remote=6033 -- exit Without this fix the first remote command would fail because qemu would have already been killed.
* todo: Add comment about progress of long-running operations.Richard Jones2010-07-021-0/+7
|
* inspector: Improve error message when YAML::Any library is not installed.Richard Jones2010-07-021-1/+1
|
* Explicitly depend on e2fsprogs.Richard Jones2010-06-281-0/+1
| | | | See: http://lists.fedoraproject.org/pipermail/devel/2010-June/137953.html
* Fix gfs2 support by adding required kernel modules.Richard Jones2010-06-281-0/+4
|
* Version 1.3.21.1.3.21Richard Jones2010-06-1614-2148/+1493
|
* ocaml: Fix thread safety of strings in bindings (RHBZ#604691).Richard Jones2010-06-166-21/+105
| | | | | | | | | | | | | | | | | | | | | | 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.
* TODO: Add a note about impl of list-filesystems.Richard Jones2010-06-161-0/+9
|
* todo: More ideas for TODO list.Richard Jones2010-06-151-0/+40
|
* Update Spanish translations (RHBZ#603870).Richard Jones2010-06-151-707/+1425
|
* perl: Check all images are defined in first param of open_guest.Richard Jones2010-06-111-0/+7
|
* perl: Add explicit close() method (RHBZ#602592).Richard Jones2010-06-103-8/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | This add an optional explicit $g->close method which may be used to force the handle to be closed immediately. Note the provisos about this method in the manual page entry. Callers should *not* normally use this method. The implementation of the handle also changes. Before, the handle was a blessed reference to an integer (the integer being the pointer to the C guestfs_h handle). Now we change this to a hashref containing currently the following field: _g => pointer to C guestfs_h handle (as an integer) If this field is not present, it means that the handle has been explicitly closed. This avoids double-freeing the handle. The user may add their own fields to this hash in order to store per-handle data. However any fields whose names begin with an underscore are reserved for use by the Perl bindings. This commit also adds a regression test. This commit also changes the existing warning when you call a method without a Sys::Guestfs handle as the first parameter, into an error. This is because such cases are always errors.
* Add error callback (RHBZ#602599).Richard Jones2010-06-104-5/+58
| | | | Read the note in the man page before using this feature.
* Fix typo in documentation of guestfs_set_launch_done_callback.Richard Jones2010-06-101-1/+1
|
* Version 1.3.20.1.3.20Richard Jones2010-06-0814-147/+209
|
* Revert "perl: Rerun configure if MAX_PROC_NR changes."Richard Jones2010-06-081-2/+1
| | | | This reverts commit f8ee7869f4836427109959cf20e299a31fa86eaf.
* TODO: Freeze/thaw filesystems.Richard Jones2010-06-081-1/+7
|
* TODO: Need to add regression test for virt-inspector.Richard Jones2010-06-081-0/+7
|
* TODO: 'file' command should be fixed.Richard Jones2010-06-081-0/+6
|
* virt-df: Disallow -h and --csv options together (RHBZ#600977).Richard Jones2010-06-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Before this commit, if you used the -h and --csv options together you would get these warnings from virt-df: $ virt-df -h --csv Guest Virtual Machine,Filesystem,Size,Used,Available,Use% Argument "13.5G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. Argument "4.7G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. Argument "8.1G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. "/dev/vg_trick/RHEL55x64","/dev/VolGroup00/LogVol00",13,4,8,34.8% Argument "98.7M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. Argument "18.8M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. Argument "74.9M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. "/dev/vg_trick/RHEL55x64","/dev/vda1",98,18,74,19.0% We could fix this so that the human-readable numbers get written into the CSV file. However would probably be wrong for most uses of the CSV format (databases and spreadsheets) since they would not be able to interpret these human-readable numbers, or worse could misinterpret, eg. thinking that "1M" and "1G" are both 1. Therefore this commit disallows this combination of options.
* file: Fix file command on /dev/VG/LV paths (RHBZ#582484).Richard Jones2010-06-082-2/+7
| | | | | | | | | | | | | Previous commit 4df593496e116dfb635731c058b7627e81fc179c broke the "file" command on logical volume paths, since these are symbolic links. We *should* follow these (only). This inadvertantly broke virt-inspector too, which indicates that we need more regression testing in this area. Since carrying whole Fedora images around could make the distribution even larger than now, I'm not sure at the moment how to do this. Thanks to Matt Booth for diagnosing this bug.
* Use the noop scheduler inside the appliance.Richard Jones2010-06-071-0/+3
| | | | | | | | | In my limited tests, this seems to make a small but noticable difference, improving the performance of some straightforward read operations by a little over 10%. For more information see: http://kbase.redhat.com/faq/docs/DOC-5428
* Add release notes.Richard Jones2010-06-052-0/+244
| | | | | | | To generate the "Bugs fixed" list, run the bugs-in-changelog script like this: ./bugs-in-changelog 1.0.89..
* Version 1.3.19.1.3.19Richard Jones2010-06-0414-21/+33
| | | | Update BUGS and PO files.
* file: Restrict to regular files (RHBZ#582484).Richard Jones2010-06-042-16/+53
| | | | | | | | | | | | | | | | | | | | | | The file call can hang if called on char devices (because we are using the file -s option). This is hard to solve cleanly without adding another file API. However this restricts file to regular files, unless called explicitly with a /dev/ path. For non-regular files, it will now return a string like "directory". There is a small semantic change for symbolic links. Previously it would not have worked at all on absolute links (or rather, the results would have been undefined). It would have treated relative symlinks to regular files as the regular file itself. Now it will return the string "symbolic link" in both cases. This commit also makes the API safe when called on untrusted filesystems. Previously a filesystem might have been set up so that (eg) /etc/redhat-release was a char device, which would have caused virt-inspector and virt-v2v to hang. Now it will not hang.
* touch: Restrict touch to regular files only (RHBZ#582484).Richard Jones2010-06-042-1/+24
|
* daemon: Rearrange code in 'file' command.Richard Jones2010-06-041-16/+15
| | | | | | | | path = path to access file (/sysroot/.. or /dev/..) display_path = original path, saved so we can display it buf = optional buffer which is freed along return codepaths There should be no change to the semantics of the code.
* gnulib: Ignore asm-underscore.m4 in the correct place.Richard Jones2010-06-042-1/+1
|
* Update to latest gnulib.Richard Jones2010-06-043-0/+2
|
* mkfs-b: Map block size to cluster size for VFAT and NTFS partitions ↵Richard Jones2010-06-032-7/+51
| | | | | | | (RHBZ#599464). This also adds a regression test for VFAT and (conditionally) NTFS filesystems.
* mkfs-b: Check that blocksize parameter is > 0 and a power of 2.Richard Jones2010-06-033-0/+14
|