summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix verbose packet dumping functions.Richard Jones2009-09-174-10/+26
| | | | | | | | | | Add the configure parameter --enable-packet-dump so that this code can be enabled without editing the source. This code is normally commented out, because it is too verbose unless you happen to be debugging the underlying protocol. Because it is normally commented out, I found it had bit-rotted slightly. This commit also fixes the obvious problems.
* 'len' should be an unsigned 32 bit int.Richard Jones2009-09-171-1/+1
| | | | | This only happened to work by accident before because 'unsigned len' happens to be 32 bit on all platforms we support.
* Disable -Wunsafe-loop-optimizationsRichard Jones2009-09-171-0/+2
| | | | | | This warning indicates that GCC could not do a particular sort of loop optimization. It pops up randomly in certain forms of looping code, and seems safe to ignore.
* Update PO files (no functional change).Richard Jones2009-09-152-3/+3
|
* Prepare for version 1.0.70.1.0.70Richard Jones2009-09-151-1/+1
|
* Update PO files.Richard Jones2009-09-152-5/+5
|
* Set minimum gettext version to 0.17.Richard Jones2009-09-151-1/+1
| | | | | | | | | | | | | | This fixes the problem that the 1.0.69 tarball would fail in the po/ subdirectory when installing: make[1]: Entering directory `/builddir/build/BUILD/libguestfs-1.0.69/po' /bin/sh @MKINSTALLDIRS@ /builddir/build/BUILDROOT/libguestfs-1.0.69-1.fc11.x86_64/usr/share /bin/sh: @MKINSTALLDIRS@: No such file or directory make[1]: Leaving directory `/builddir/build/BUILD/libguestfs-1.0.69/po' RHEL 5.3 has gettext 0.14.6. However the tarball will still build (since it includes all the required code). This may cause a problem if RHEL users want to build from the git repository.
* Fix comparison between signed and unsigned (for RHEL 5).1.0.69Richard Jones2009-09-151-1/+1
|
* Move decl out for C99 compliance.Richard Jones2009-09-141-1/+3
|
* Update PO files.Richard Jones2009-09-142-1081/+1000
|
* Move guestfs-internal-actions.h to EXTRA_DIST.Richard Jones2009-09-141-2/+2
|
* Prepare for 1.0.69.Richard Jones2009-09-141-1/+1
|
* Remove main loop.Richard Jones2009-09-144-1224/+552
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes the external main loop, which never worked and caused a number of bugs. Requests are now done synchronously, and if the user wants to have requests issued in the background or to have a responsive GUI, then they'll just have to use threads. The big change is to push all reads and writes through two functions called send_to_daemon (for writes) and recv_from_daemon (for reads) which operate synchronously. These functions read/write whole messages, and also handle checking for EOF (ie. daemon died) and asynchronous log message events from qemu (eg. from debug / dmesg printed by the guest). A more complete description of how these work can be found in the code. This code passes a complete run of the tests. Bugs believed to be fixed by this commit: https://bugzilla.redhat.com/show_bug.cgi?id=501888 internal error: reply callback called twice https://bugzilla.redhat.com/show_bug.cgi?id=504418 In virt-inspector: "download: guestfs_download reply failed, see earlier error messages" I have tried to avoid reintroducing this: https://bugzilla.redhat.com/show_bug.cgi?id=508713 libguestfs: error: write: Broken pipe (guestfish only) One other benefit of this is that 'set_busy/end_busy' calls no longer appear in traces.
* Don't enable trace in set_trace test.Richard Jones2009-09-141-2/+2
| | | | | This leaves trace enabled afterwards, resulting in some ugly test messages.
* Fix type punning warning about use of CMSG_DATA in Rawhide.Richard Jones2009-09-141-2/+4
|
* guestfish: Enable grouping in string listsMatthew Booth2009-09-145-20/+202
| | | | | | | | | | | | | | | | | | | | | | This change adds the ability to group entries in a string list with single quotes. So the string: "'foo bar'" becomes 1 token rather than 2. Consequently single quotes must now be escaped: "\'" resolves to a literal single quote. Incidentally, this change also alters another, probably unintentional behaviour of the previous implementation, in that tokens are separated by any amount of whitespace rather than a single whitespace character. I.e.: "a b" resolves to: 'a' 'b' rather than: 'a' '' 'b' That last syntax can be used if an empty argument is still desired. Whitespace is now also defined to include tabs. parse_string_list can also now fail if it contains an unmatched open quote.
* Ignore localrepo/ directory.Richard Jones2009-09-141-0/+1
| | | | | This can be used by people building from source and packagers for their own purposes.
* Add command trace functionality.Richard Jones2009-09-144-0/+100
| | | | | Enable this by calling guestfs_trace (handle, 1) or by setting the LIBGUESTFS_TRACE=1 environment variable.
* Non-daemon actions indirect through generated code.Richard Jones2009-09-144-35/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously non-daemon actions were called directly by user code, eg: /* Non-generated */ int guestfs_set_verbose (guestfs_h *g, int v) { g->verbose = !!v; return 0; } This changes these actions so they go indirectly via some generated code, eg: /* Generated */ int guestfs_set_verbose (guestfs_h *g, int verbose) { return guestfs__set_verbose (g, verbose); } /* Non-generated */ int guestfs__set_verbose (guestfs_h *g, int v) { g->verbose = !!v; return 0; } The aim is to have a place in the generated code where we can add debug or tracing information for these non- daemon calls.
* guestfish: Redirect stdout when executing remote commandsMatthew Booth2009-09-143-15/+138
| | | | | | | | | | | guestfish --listen necessarily redirects its stdout to /dev/null so as not to interfere with eval. The remote protocol doesn't contain any other provision for collecting stdout for the caller, so executing guestfish --remote will never generate any output. This patch fixes that by forwarding the caller's STDOUT to the listener over the unix socket connection. The listener redirects its STDOUT to the caller's STDOUT for the duration of the command, then closes it again.
* Update TODO listRichard Jones2009-09-141-0/+10
|
* Add diffutils package.Richard Jones2009-09-141-0/+1
| | | | | On Fedora 12, /usr/bin/cmp is not pulled in unless we explicitly add the diffutils package.
* Add echo_daemon commandMatthew Booth2009-09-145-1/+89
| | | | | echo_daemon is a simple echo which can be used to test connectivity between the client and daemon.
* generator.ml: Fix string list memory leakMatthew Booth2009-09-111-1/+10
| | | | Parsed string lists are allocated by malloc, but were never freed.
* Ignore some more m4 files.Richard Jones2009-09-092-0/+2
|
* Don't include gnulib files in POTFILES.in.Richard Jones2009-09-091-5/+7
|
* avoid build-from-scratch failure due to missing daemon/configureJim Meyering2009-09-041-2/+1
| | | | | | * bootstrap: Don't use autoreconf's --norecursive option. We require the default --recursive behavior in order to create daemon/configure. Reported by Matthew Booth.
* maint: guestfs.c: avoid warning about possible NULL deref from llvm/clangJim Meyering2009-08-311-1/+1
| | | | * src/guestfs.h (guestfs_abort_cb): Declare with attribute noreturn.
* maint: guestfs.c: remove unnecessary initializationJim Meyering2009-08-311-1/+1
| | | | | * src/guestfs.c (guestfs__receive_file_sync): Don't set "r", only to ignore it.
* generator.ml: avoid a warning about signed overflow in tests.cJim Meyering2009-08-281-4/+4
| | | | | | * src/generator.ml: Emit "unsigned long int n_failed;" rather than "int failed;", to avoid warning from gcc about "assuming signed overflow does not occur when simplifying conditional to constant".
* generator.ml: avoid defined-but-not-used warnings in guestfs_c_actions.cJim Meyering2009-08-281-21/+32
| | | | | * src/generator.ml (emit_ocaml_copy_list_function): New function. Emit a function definition only if it will be used.
* generator.ml: avoid warnings in generated ocaml/guestfs_c_actions.cJim Meyering2009-08-281-0/+7
| | | | | | | | | * src/generator.ml: Emit prototypes for ocaml_guestfs_* functions, to avoid warnings from gcc -Wmissing-prototypes. Normally we'd put these somewhere else, but in this unusual case, they're not needed anywhere else. Handle the >5-argument case, too, for these: ocaml_guestfs_test0_byte, ocaml_guestfs_sfdisk_byte, ocaml_guestfs_sfdisk_N_byte.
* build: enable gcc warnings in capitests/ and ocaml/Jim Meyering2009-08-272-2/+4
| | | | | * capitests/Makefile.am: Use $(WARN_CFLAGS) and $(WERROR_CFLAGS). * ocaml/Makefile.am:: Likewise.
* ocaml/guestfs_c.c: avoid warning about missing prototypesJim Meyering2009-08-271-0/+4
| | | | * ocaml/guestfs_c.c (ocaml_guestfs_create, ocaml_guestfs_close): Declare.
* ocaml/guestfs_c.c: avoid warning about initialization discarding "const"Jim Meyering2009-08-271-1/+1
| | | | * ocaml/guestfs_c.c (guestfs_custom_operations): Add a cast.
* ocaml/guestfs_c.c avoid signed/unsigned-comparison warningJim Meyering2009-08-271-1/+1
| | | | | * ocaml/guestfs_c.c (ocaml_guestfs_strings_val): Declare index as unsigned int.
* build: use only one m4/ directoryJim Meyering2009-08-254-9/+67
| | | | | | | | | * Makefile.am (ACLOCAL_AMFLAGS): Specify only one include dir: m4. * bootstrap: Tell gnulib-tool to put .m4 files in m4/, not gnulib/m4. * autogen.sh: Move autoreconf from here into... * bootstrap: ...here, so that it is run only when gnulib-tool is. Also, tell it to skip the usual autopoint and libtoolize runs. * m4/.gitignore: Update.
* build: invoke autopoint with --forceJim Meyering2009-08-252-2/+12
| | | | | | | | * bootstrap: Invoke autopoint with --force, to avoid warning about existing build-aux/config.rpath. Invoke libtoolize before gnulib-tool, to avoid spurious warnings. * autogen.sh: Add comments. Remove build-aux/config.rpath before running autoreconf.
* build: update gnulib submodule to latestJim Meyering2009-08-251-0/+0
| | | | * .gnulib: Update to latest.
* build: don't define _GNU_SOURCE manuallyJim Meyering2009-08-244-6/+6
| | | | | | | | | | | | Now that we're using gnulib in earnest, any manual definition would provoke a redefinition warning. * fish/fish.c (_GNU_SOURCE): Don't define. * fish/destpaths.c (_GNU_SOURCE): Likewise. * src/guestfs.c (_GNU_SOURCE): Likewise. * bootstrap (modules): Add asprintf, strchrnul, strerror, strndup and vasprintf. * fish/fish.c (main): Set argv[0] to sanitized program_name, so functions like getopt_long that use argv[0] use the clean name.
* guestfish: diagnose stdout write failureJim Meyering2009-08-242-0/+4
| | | | | | | | Use gnulib's closeout module to ensure any failure to write to stdout is detected and reported. * fish/fish.c: Include "closeout.h". (main): Call atexit (close_stdout); * bootstrap (modules): Add closeout.
* guestfish: don't try to diagnose getopt failureJim Meyering2009-08-241-2/+0
| | | | | * fish/fish.c: ... getopt_long already does that. Instead, suggest "Try `guestfish --help' for more information."
* guestfish: write --help to stdout, use gnulib's progname moduleJim Meyering2009-08-243-45/+93
| | | | | | | | | | * fish/fish.c: Include "progname.h". (main): Call set_program_name to initialize. Don't hard-code guestfish everywhere. Use program_name. However, be careful when modifying argv[0], since it is used in the hopes that it is an absolute file name. (usage): Don't spew all of --help for a mis-typed option. Split long lines.
* build: avoid some autoconf warningsJim Meyering2009-08-241-5/+5
| | | | * configure.ac: Move gl_EARLY and gl_INIT to be earlier.
* Todo: ntfsclone.Richard Jones2009-08-241-0/+6
|
* Add waitpid along guestfs_close path (RHBZ#518747).Richard Jones2009-08-221-0/+4
|
* fish/: enable -Werror and all of gcc's warning optionsJim Meyering2009-08-211-2/+2
| | | | * fish/Makefile.am: Use $(WARN_CFLAGS) $(WERROR_CFLAGS).
* generator.ml: avoid signed/unsigned-comparison warning in fish/cmds.cJim Meyering2009-08-211-2/+2
| | | | | | * src/generator.ml (emit_print_list_function): Emit code that doesn't evoke warnings. s/int/unsigned int/ (emit print_*_indent): Likewise, s/int/unsigned int/
* destpaths.c: avoid signed/unsigned-comparison warningJim Meyering2009-08-211-1/+1
| | | | * fish/destpaths.c (free_words): Change param type: s/int/size_t/.
* fish.c: don't perform arithmetic on void* pointersJim Meyering2009-08-211-1/+2
| | | | * fish/fish.c (xwrite): Use char*.