summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* lib: Break long line in definition of guestfs_set_error_handler.Richard W.M. Jones2012-11-201-1/+2
| | | | | This is just a whitespace change. (cherry picked from commit 2013e005bd02f5706887c8861f10410ffd82084f)
* build: Source 'localenv' in top-level Makefile.Richard W.M. Jones2012-10-301-0/+35
| | | | | Also document 'local*' files. (cherry picked from commit de129a136355a92aa6a4afe47678aa13160fc806)
* docs: Review and clarify ERROR HANDLING section of guestfs(3).Richard W.M. Jones2012-10-301-12/+29
| | | | | Cherry picked from commit 3c1d85ae95452cee30029c719aa2523fdb5384c7. Modified to remove references to libguestfs 1.20.
* docs: Make 'EVENTS' into its own =head1 section.Richard W.M. Jones2012-10-301-2/+6
| | | | | | For some reason it was stuck under "CALLS WITH OPTIONAL ARGUMENTS", which made no sense. (cherry picked from commit 085bf7c97aae67e8f84fe95f97ee4bfee849d523)
* lib: Pointer arg to safe_memdup function should be const.Richard W.M. Jones2012-10-302-2/+2
| | | | (cherry picked from commit 64e8e0011c6e961bae010b6008d07f501d53f35d)
* docs: Fully document all subdirectories of the source.Richard W.M. Jones2012-10-301-0/+17
| | | | (cherry picked from commit 0032c60336c6f819859d30ec68179373e8943ef6)
* docs: Add overview to guestfs(3)/EXTENDING LIBGUESTFS.Richard W.M. Jones2012-10-301-3/+34
| | | | (cherry picked from commit b54fa22cd0a6a091324ff1978e0de2c54a0fabde)
* syntax: Use __PATTERNS__ instead of @PATTERNS@ in podwrapper man pages.Richard W.M. Jones2012-10-302-6/+6
| | | | | | It is slightly dangerous to use @PATTERNS@, since these might be substituted by autoconf when they appear in Makefile.am files. (cherry picked from commit 4a4ca0c01da3307b69fc4925c5f2ece1e728d4b3)
* inspection: Fix calls to case_sensitive_path (RHBZ#858126).Richard W.M. Jones2012-10-012-19/+29
| | | | | | | | | | | | | | | | | | | | | | | Don't assume that if guestfs_case_sensitive_path returns NULL, that it means the file does not exist. The (previously undefined) behaviour of case_sensitive_path was that a NULL return meant "either the file doesn't exist or some other error". However in commit 973581780d8a006f336684fef6762801402d775d this was changed so that if the last element of the path didn't exist, it was assumed to be a new file and the (non-NULL) path of the new file is returned. This change breaks code (including in libguestfs) which tries to use case_sensitive_path as a dual-purpose call to fix-up a path for Windows and test if the file exists. Such code should be rewritten so that it explicitly tests for file existence after calling case_sensitive_path. I examined all the calls to case_sensitive_path in libguestfs and modified them where necessary. Cherry picked from commit 9ea6e9701461e594033999150f930cc4fafec4d2.
* docs: Link to guestfs-recipes(1) from intro in guestfs(3).Richard W.M. Jones2012-10-011-0/+2
| | | | (cherry picked from commit d19e557df54f3822d38621b8c2da098bf44b4d53)
* rename local variable to avoid clash with match macroOlaf Hering2012-10-011-3/+3
| | | | | | | match will expand to guestfs___match, rename the local variable to avoid clash. Signed-off-by: Olaf Hering <olaf@aepfle.de> (cherry picked from commit b36b44af9e177fe5c9677d430abc7cba0633049c)
* docs: Add links to various guestfs-* man pages from guestfs(3).Richard W.M. Jones2012-10-011-0/+4
| | | | | Cherry picked from commit 64cc0dafd03bb23ef1520c8f46fd2dd44a0d8c4e. Remove ref to guestfs-release-notes(1) which doesn't exist in 1.18.
* launch: Make the "launched failed" message more explanatory.Richard W.M. Jones2012-10-012-2/+19
| | | | | | | | | | Since this is the most common error seen by people who have installation problems, buggy qemu, etc, and since no one reads the FAQ, describe in this error message what resources are available to debug launch problems. Cherry picked from commit 840deea12079b05a9f588016af273843d5d6e1b8 and fixed for the stable branch.
* syntax: Remove definitions of O_CLOEXEC, except in examples (thanks Jim ↵Richard W.M. Jones2012-09-191-4/+0
| | | | | | | | | Meyering). The gnulib <fcntl.h> replacement header will now define this symbol if it's not defined already. (cherry picked from commit cb13ffe190ac41a9b77fe27521838f495c1a5077)
* syntax: Use STREQ/STRNEQ in place of strcmp.Richard W.M. Jones2012-09-191-1/+1
| | | | | Found by 'make syntax-check'. (cherry picked from commit b0cefb417d01c6dcb87cc6bafe9c19b98c690c9d)
* syntax: Remove include <signal.h> in file that doesn't use it.Richard W.M. Jones2012-09-191-1/+0
| | | | | Found by 'make syntax-check'. (cherry picked from commit 90b7c53b70dda9a131cf13beb5d1e77cc41534f7)
* syntax: Remove gnulib "ignore-value.h" in files that don't use it.Richard W.M. Jones2012-09-195-6/+0
| | | | | | | Found by 'make syntax-check'. Cherry picked from commit a67129b0fb45b2f83eb711c6c599569d0f53e580 and modified for 1.18 branch.
* syntax: Remove gnulib c-ctype.h in files that don't use it.Richard W.M. Jones2012-09-194-4/+0
| | | | | | | Found by 'make syntax-check'. Cherry picked from commit 9fce75aa13de52561ec0f4ae083c4ab0fa4455d1 and fixed for libguestfs 1.18 branch.
* lib: Rearrange headers.Richard W.M. Jones2012-09-192-10/+8
| | | | | This is just code motion. (cherry picked from commit da75618fb2eecb644d8ec84c9584c402b0bc5339)
* lib: Remove unused headers <arpa/inet.h> and <netinet/in.h>Richard W.M. Jones2012-09-192-4/+0
| | | | | | These were used back in the day when we used TCP for the communications channel with the guest. (cherry picked from commit 8747ff743216fbb6119606c22966e2283f30a54a)
* syntax: Remove HAVE_*_H tests which are always true.Richard W.M. Jones2012-09-193-42/+7
| | | | | | | Gnulib supplies replacements for these headers, so there is no need to test. (cherry picked from commit dec73f70fc5320faec46a21f27aae6748cea3450)
* lib: These optargs structures are not modified, hence const.Richard W.M. Jones2012-09-191-3/+3
| | | | (cherry picked from commit 5a46eadd3dcab1b8944eabc0f21097048e0ebe13)
* docs: Fix documentation of syntax-check target, add extra-tests.Richard W.M. Jones2012-09-191-2/+7
| | | | (cherry picked from commit 6951becfdb0b69b4defff4393f48314e884ad7c1)
* src/dbdump.c: Shouldn't depend on HAVE_HIVEX (thanks Tao Zhou).Richard W.M. Jones2012-09-181-2/+2
| | | | (cherry picked from commit 4e6bf1ed653540a8954a6a11fe5a0fb424013af9)
* lib: Remove AUGEAS_CFLAGS, AUGEAS_LIBS.Richard W.M. Jones2012-08-301-2/+2
| | | | | | | The library doesn't actually use libaugeas, except indirectly via the libguestfs API. The libguestfs API implements this in the daemon, so there's no need for the library to link to augeas at all. (cherry picked from commit 228d49bb842cda517b414bbfab460e8be429cc5f)
* podwrapper: Add --license parameter, which is required.Richard W.M. Jones2012-08-301-0/+1
| | | | | | | | | | | | This adds standard LICENSE and BUGS sections to all of the man pages that are processed by podwrapper. Modify all the calls to $(PODWRAPPER) to add the right --license parameter according to the content. Note that this relaxes the license on some code example pages, making them effectively BSD-style licensed. (cherry picked from commit 2f97bf873b64384835f257f8916bf1ebb2af62b4)
* man pages: Ensure consistent copyright/author sections, remove licenseRichard W.M. Jones2012-08-301-48/+0
| | | | | | | | | | | | section. Ensure each man page contains consistent COPYRIGHT and AUTHOR sections. Remove the LICENSE section. We will add that back in podwrapper in a later commit. (cherry picked from commit f1d98bbc79496947210ee0305f80440ed8557ec1)
* docs: Document null disks.Richard W.M. Jones2012-08-301-0/+61
| | | | | | It's always been possible to use /dev/null as a disk image. Document this formally in the API. (cherry picked from commit e1e8b3a1cfdeee34fbd51f79b8724c5a58f25c10)
* launch: Move code to add a drive to the list to separate add_drive utility ↵Richard W.M. Jones2012-08-301-28/+32
| | | | | | | | function. This is just code motion / simplification. (cherry picked from commit 46cf4a7e875b828c7a97bd85f577721bce386bc3)
* launch: Add utility function guestfs___lazy_make_tmpdir.Richard W.M. Jones2012-08-302-8/+21
| | | | | | | | This lets us create g->tmpdir lazily earlier if needed. This commit is just code motion. (cherry picked from commit 4b8ac437295d5420d3186a913bc3740b69a8d342)
* lib: Add 'g->unique' to handle, for making unique IDs.Richard W.M. Jones2012-08-301-0/+6
| | | | (cherry picked from commit 22607a97cdf115caabf05c3dc87c5f154a2e914c)
* inspect: Clarify comment about uniqueness of cache.Richard W.M. Jones2012-08-301-1/+3
| | | | (cherry picked from commit 8fd6f1bebef11d1c4eb77ac2b7d95fd5a7e82be9)
* close: Check if g->tmpdir is non-NULL before removing tmpdir.Richard W.M. Jones2012-08-301-1/+2
| | | | | This happens, by chance, to work. (cherry picked from commit ba61236d0d6756f45d8707e96cda00c016cadebe)
* Document problems copying long filenames from NTFS to Linux filesystems ↵Richard W.M. Jones2012-08-051-0/+22
| | | | | | (RHBZ#845488). (cherry picked from commit 7fa67427c6b2725bdcce52c08511f8813b7bd42e)
* Mac OS X: Use u_int64_t/uint64_t instead of unsigned hyper in .x fileMasami HIRATA2012-08-051-2/+11
| | | | | | | | Signed-off-by: Masami HIRATA <msmhrt@gmail.com> RWMJ: Fixed whitespace in generator_xdr.ml (cherry picked from commit d74e7fad28ae7a2f894a12d30807f4b36078bf13)
* Mac OS X: #define UNIX_PATH_MAX 104Masami HIRATA2012-08-051-0/+4
| | | | | | | See http://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man4/unix.4.html Signed-off-by: Masami HIRATA <msmhrt@gmail.com> (cherry picked from commit 7dab20876530a7ac954b4fe809755ac12a8d8c4d)
* Mac OS X: Added check of #include <endian.h>Masami HIRATA2012-08-057-0/+21
| | | | | | | Mac OS X doesn't have endian.h Signed-off-by: Masami HIRATA <msmhrt@gmail.com> (cherry picked from commit 6e3f8d2511a63bdcfa7c7d0e5414d5643c4ff599)
* lib: Initialize libvirt and libxml2 once when the library loads.Richard W.M. Jones2012-08-052-11/+36
| | | | (cherry picked from commit 941ec968b8a1d6f891d30631a8ddb1e23e427b99)
* fuse:remove the unused macro when fuse is not availableWanlong Gao2012-08-051-1/+1
| | | | | | | Just make gcc happy when fuse is not available. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> (cherry picked from commit a58368b3db4f02b9fd907cec82621be11884d256)
* lib: Use safe_asprintf when constructing attach_method.Richard W.M. Jones2012-08-052-6/+2
| | | | | Just a small code cleanup / simplification. (cherry picked from commit eca544d87d9335123077e30b7547270b6bfe0f2b)
* build: Rename most C files that contain underscore with dash.Richard W.M. Jones2012-08-057-10/+10
| | | | | | | | | | | | | | This is just code motion. Some files cannot be renamed. Notably rpcgen input and output files must not contain dash characters, else rpcgen breaks. Cherry picked from commit 2e4089f30007e79bc157c775cfd3b326d22f2992 and modified so that conflicts in the following files: po-docs/ja.po po-docs/libguestfs-docs.pot po-docs/uk.po were resolved by simply copying the files from the master branch.
* build: Rename src/virt.c to src/libvirtdomain.cRichard W.M. Jones2012-08-052-1/+1
| | | | | | This file contains the code implementing guestfs_add_domain (for adding a libvirt domain) so this name is less confusing. (cherry picked from commit d1d29ab488002dda9e9a1b25fc2dbe4cb844f5ef)
* build: Arrange libguestfs_la_SOURCES in order.Richard W.M. Jones2012-08-051-1/+1
| | | | (cherry picked from commit d88f4ca634685f9aefab1a283f03646e32ba4a25)
* docs: Use L<...> for links.Richard W.M. Jones2012-08-051-1/+1
| | | | | | Instead of working around bugs, podwrapper has been fixed so that links work in all output formats. (cherry picked from commit 4bc110e2bc738bde9b9c09bc602ef13c06b60e90)
* docs: febootstrap is in section 8 of the manual, not section 1.Richard W.M. Jones2012-08-051-1/+1
| | | | (cherry picked from commit 8d0baf7b859fbbe40bdb072b2009d77c02cee7c3)
* build: Change calls to podwrapper.sh to use $(PODWRAPPER).Richard W.M. Jones2012-08-051-1/+1
| | | | | | This will allow us to easily change the location of this script in future. (cherry picked from commit f2ea617e224cd82496e56a41b5878063d6f02e3d)
* Revert "launch: Correction in comment."Richard W.M. Jones2012-07-091-2/+4
| | | | | | | This reverts commit 6e5a85bb9b6557bc337625a339728e23f5f2dd94. It turns out this is a bug in QEMU after all. (cherry picked from commit bd3e42a8ded1ed7a4177ad03646572eb6155a49c)
* launch: Correction in comment.Richard W.M. Jones2012-07-071-4/+2
| | | | | | | | https://bugs.launchpad.net/qemu/+bug/1021649 is invalid, probably caused by a Fedora ROM. This updates commit 52d188e32fb8addb45bf926df07e34ab35898f85. (cherry picked from commit 6e5a85bb9b6557bc337625a339728e23f5f2dd94)
* qemu: Use sgabios by default (thanks Dan Berrange).Richard W.M. Jones2012-07-061-0/+9
| | | | (cherry picked from commit 52d188e32fb8addb45bf926df07e34ab35898f85)
* New API: guestfs_shutdown: Cleanly shutdown the backend.Richard W.M. Jones2012-07-063-60/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The new API splits orderly close into a two-step process: if (guestfs_shutdown (g) == -1) { /* handle the error, eg. qemu error */ } guestfs_close (g); Note that the explicit shutdown step is only necessary in the case where you have made changes to the disk image and want to handle write errors. Read the documentation for further information. This change also: - deprecates guestfs_kill_subprocess - turns guestfs_kill_subprocess into the same as guestfs_shutdown - changes guestfish and other tools to call shutdown + close where necessary (not for read-only tools) - updates documentation - updates examples (cherry picked from commit ffbf1475f7ae7c462db289ad4834391469e72edd)