summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Non-daemon actions indirect through generated code.Richard Jones2009-09-143-35/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add echo_daemon commandMatthew Booth2009-09-142-1/+14
| | | | | 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.
* 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: don't define _GNU_SOURCE manuallyJim Meyering2009-08-241-1/+0
| | | | | | | | | | | | 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.
* Add waitpid along guestfs_close path (RHBZ#518747).Richard Jones2009-08-221-0/+4
|
* 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/
* tests: namemax on ISO devices is 2551.0.68Richard Jones2009-08-191-1/+1
| | | | Was 256 for the old squashfs device.
* tests: Use ISO instead of squashfs.Richard Jones2009-08-191-67/+67
| | | | | The squashfs format changes too much. Use an ISO file for the tests instead.
* tests: modprobe fat instead of ext2 module.Richard W.M. Jones2009-08-191-1/+1
| | | | | | | On RHEL 5, ext2 is compiled into the kernel, so trying to modprobe it will fail. I've checked that fat.ko is always a module on the platforms we care about (RHEL 5, Fedora 11, Debian), so use that to test instead.
* avoid build failure due to Haskell keyword clashJim Meyering2009-08-191-3/+32
| | | | | | | | * src/generator.ml: Fix this particular problem by renaming the "module" parameter to "modulename". Avoid the general problem by ensuring that no parameter name is in the set of nearly all Haskell, OCaml and C reserved words. (zfile): Adjust one more offender: s/method/meth/.
* guestfs_launch: Correct checks for dup failure.Richard Jones2009-08-191-7/+7
|
* build: Comment out some unused macros.Richard Jones2009-08-192-6/+6
| | | | | GCC 4.4.1 warns about some unused macros. Comment these out while they are not used.
* build: new configure-time option: --enable-gcc-warningsJim Meyering2009-08-181-1/+3
| | | | | * configure.ac: Define/configure it. * src/Makefile.am: Use new variables.
* suppress warnings from -Wmissing-noreturnJim Meyering2009-08-181-0/+2
| | | | | | | Even though these functions are marked as "not implemented yet", and they will surely return a value once implemented, ... * src/guestfs.c (select_add_timeout): Declare with noreturn attribute. (select_remove_timeout): Likewise.
* suppress a warning from -Wswitch-defaultJim Meyering2009-08-181-0/+2
| | | | * src/guestfs.c (guestfs_end_busy): Add a "default:" label.
* suppress signed/unsigned-comparison warningsJim Meyering2009-08-181-2/+2
| | | | | * src/guestfs.c [struct guestfs_h] (msg_in_size, msg_in_allocated): (msg_out_size, msg_out_allocated): Change type from int to unsigned int.
* build: don't perform arithmetic on void* pointersJim Meyering2009-08-181-3/+5
| | | | * src/guestfs.c (receive_file_data_sync, xread, xwrite): Use char*.
* generator.ml: suppress signed/unsigned-compare warningsJim Meyering2009-08-181-1/+1
| | | | | * src/generator.ml (check_reply_header): Emit parameter declarations that are unsigned, so as to avoid signed/unsigned-compare warnings.
* build: suppress an ignored-dup-return-value warningJim Meyering2009-08-181-2/+9
| | | | * src/guestfs.c (guestfs_launch): Handle dup failure.
* build: suppress an ignored-write-return-value warningJim Meyering2009-08-182-2/+5
| | | | | | | | | * bootstrap (modules): Add ignore-value. * src/guestfs.c: Include "ignore-value.h". (stdout_event): Ignore failure to write to stderr. Also, prefer STDERR_FILENO over the literal "2". * src/Makefile.am (libguestfs_la_CPPFLAGS): Include gnulib's .h files. (libprotocol_la_CFLAGS): Remove -Wall -Wno-unused.
* New 'modprobe' command.Matthew Booth2009-08-182-1/+10
| | | | Allow kernel modules to be loaded into the appliance.
* generator: Small code rearrangement.Richard Jones2009-08-181-3/+5
| | | | Move code which updates pod2text memo file into a separate function.
* generator.ml: do not emit unused print_* functionsJim Meyering2009-08-181-5/+12
| | | | | * src/generator.ml: Do not emit functions like print_xattr, print_lvm_vg, print_inotify_event, that are not used.
* generator.ml: do not emit unused print_*_list functionsJim Meyering2009-08-181-12/+24
| | | | | * src/generator.ml (emit_print_list_function): New function. Emit a function definition only if it will be used.
* generator.ml: avoid warnings in generated tests.cJim Meyering2009-08-181-4/+4
| | | | | | | | | * src/generator.ml: Avoid warnings in generated tests.c, regarding print_strings, and in exercising any function that takes a StringList or DeviceList parameter. (print_strings): Change param type to "char *const *s". Declare fully-const initializer for each list-taking function use. Cast *List argument to "(char **)".
* avoid compiler warnings about unused vars in generated codeJim Meyering2009-08-181-2/+12
| | | | | * src/Makefile.am: Compile protocol.c into a convenience library, so it can have its own CFLAGS, and link that with the destination one.
* generator.ml: Use TABs, not spaces for indentation.Jim Meyering2009-08-171-3/+3
|
* java: Small fix to Java bindings.Richard W.M. Jones2009-08-171-1/+4
| | | | Missing declaration of local variable 'i'.
* indent with spaces, not TABsJim Meyering2009-08-171-10/+10
|
* generator.ml: emit slightly prettier codeJim Meyering2009-08-171-3/+3
| | | | * src/generator.ml: Emit a few omitted newlines.
* python: avoid "_POSIX_C_SOURCE" redefinition warningJim Meyering2009-08-171-2/+2
| | | | | * src/generator.ml: Include <Python.h> *before* <stdio.h> to avoid redefinition warning about "_POSIX_C_SOURCE".
* adjust const "**" pointers to avoid warningsJim Meyering2009-08-171-47/+60
| | | | | | Also, ... * src/generator.ml: Add DeviceList type, and propagate that change out to all calling/interface code.
* New commands: mkfs-b, mke2journal*, mke2fs-J*Richard W.M. Jones2009-08-152-1/+85
| | | | | | | | | | mkfs-b: Pass the -b (blocksize) parameter to mkfs. mke2journal and friends: Lets you create external ext2 journals on devices. mke2fs-J and friends: Lets you create ext2/3/4 filesystems with external journals.
* generator: Generate the UUIDs for tests randomly.Richard W.M. Jones2009-08-151-18/+34
| | | | | Adds a uuidgen function which gets the random UUID from the uuid program. Uses this for tests.
* generator.ml: don't emit unused functionsJim Meyering2009-08-141-1/+9
| | | | | * src/generator.ml: Use "rstructs_used" to emit definitions only for put_TYPE_list functions that are used.
* generator.ml: factor out a functionJim Meyering2009-08-141-12/+16
| | | | * src/generator.ml (emit_put_list_function): New function.
* Work out which RStruct/RStructList structs are really used, and how.Richard W.M. Jones2009-08-141-0/+58
|
* Misc parameters which are String but should be Pathname.Richard Jones2009-08-131-9/+9
|
* cp/cp-a/mv parameters marked as Pathname.Richard Jones2009-08-131-3/+3
|
* generator.ml: convert leading TABs to spacesJim Meyering2009-08-131-4/+4
|
* generator.ml: factor out "pr_args n" functionJim Meyering2009-08-131-4/+7
|
* generator.ml: finish adding Dev_or_Path supportJim Meyering2009-08-131-31/+35
| | | | | | | | | | * src/generator.ml: Update all rules to handle Dev_or_Path. (the above changes to generator.ml are mostly mechanical) Emit a use of REQUIRE_ROOT_OR_RESOLVE_DEVICE. * daemon/upload.c (do_download): Remove use of REQUIRE_ROOT_OR_RESOLVE_DEVICE, now that it's automatically done in calling code. * daemon/file.c (do_file): Likewise.
* generator.ml: add type: Dev_or_PathJim Meyering2009-08-131-2/+3
| | | | * src/generator.ml (file, download): Use it.
* generator.ml: constify do_mkdtempJim Meyering2009-08-131-4/+2
| | | | | * daemon/dir.c (do_mkdtemp): Rewrite for a "const" parameter. * src/generator.ml (mkdtemp): Declare parameter to be of type Pathname.
* generator.ml: move String/Device decls "down" to definitionJim Meyering2009-08-131-5/+5
|