summaryrefslogtreecommitdiffstats
path: root/generator
Commit message (Collapse)AuthorAgeFilesLines
...
* gobject: Include explicit types for all parametersMatthew Booth2012-03-281-1/+6
|
* tests: Don't include internal guestfs header in tests.Richard W.M. Jones2012-03-271-3/+12
|
* generator: Allow functions with no requires args, and with some optional args.Richard W.M. Jones2012-03-272-16/+19
| | | | Previously the generator disallowed such functions.
* generator: Remove doc reference to non-existent guestfs_inotify_watch_allMatthew Booth2012-03-271-4/+2
|
* generator: Fix unescaped '<' and '>' in api descriptionsMatthew Booth2012-03-271-4/+5
|
* New API: md-stat.Richard W.M. Jones2012-03-202-0/+57
| | | | | This returns information about the underlying devices of an MD (software RAID) device.
* generator: Generate a .gitignore file specifically for java structs.Richard W.M. Jones2012-03-202-0/+4
|
* daemon: Set last errno to ENOTSUP when APIs are not available.Richard W.M. Jones2012-03-201-4/+6
|
* New API: vgmeta: Download volume group metadata.Richard W.M. Jones2012-03-171-0/+10
|
* generator: Sort camel-case structs.Richard W.M. Jones2012-03-161-0/+1
|
* New APIs: isoinfo and isoinfo-device.Richard W.M. Jones2012-03-162-0/+54
| | | | | Get ISO primary volume descriptor information for either ISO devices or ISO files.
* generator: Fix CompareWithString test.Richard W.M. Jones2012-03-161-1/+1
| | | | | This type of test was not used, and in fact the generated test simply didn't work.
* generator: Fix FUInt{32,64} struct field types.Richard W.M. Jones2012-03-161-2/+4
| | | | | | We were not using an unsigned type in the XDR. This doesn't affect data integrity or the protocol, but it makes it more complicated for the daemon to set these fields.
* New API: lvcreate-free: Create logical volume as % of free space.Richard W.M. Jones2012-03-151-0/+18
|
* New API: zero_free_space: zero free space in a filesystem.Richard W.M. Jones2012-03-151-0/+14
| | | | | | | | | | | | | | Add an API for doing what virt-sparsify was doing: freeing up free space in a filesystem. The current implementation is simple-minded: we create a file, fill it with zeroes until we run out of space, then delete the file. However the description leaves it open to do a better implementation, eg. using sparsification support that is currently being worked on in ext4 and qemu. The implementation also sends progress notifications, which is an advantage over the old 'dd' method.
* Use O_CLOEXEC / SOCK_CLOEXEC for almost all file descriptors.Richard W.M. Jones2012-03-141-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | The presumption is that all file descriptors should be created with the close-on-exec flag set. The only exception are file descriptors that we want passed through to exec'd subprocesses (mainly pipes and stdin/stdout/stderr). For open calls, we pass O_CLOEXEC as an extra flag, eg: fd = open ("foo", O_RDONLY|O_CLOEXEC); This is a Linux-ism, but using a macro we can easily make it portable. For sockets, similarly: sock = socket (..., SOCK_STREAM|SOCK_CLOEXEC, ...); For accepted sockets, we use the Linux accept4 system call which allows flags to be supplied, but we use the Gnulib 'accept4' module to make this portable. For dup, dup2, we use the Linux dup3 system call, and the Gnulib modules 'dup3' and 'cloexec'.
* java: Enable -Xlint:all and fix all warnings.Richard W.M. Jones2012-03-142-1/+2
|
* Replace 'int' with 'size_t' passim.Richard W.M. Jones2012-03-132-5/+5
| | | | | Analyze all uses of 'int' in the code, and replace with 'size_t' where appropriate.
* tests: Remove/fix unused variables warnings.Richard W.M. Jones2012-03-121-1/+0
|
* erlang: Remove unused variables.Richard W.M. Jones2012-03-121-2/+0
|
* bindtests: Use size_t instead of int for array iterators.Richard W.M. Jones2012-03-121-7/+7
|
* Document error message from resize2fs (RHBZ#755729, RHBZ#801640).Richard W.M. Jones2012-03-091-3/+9
|
* resize2fs: Run 'e2fsck -f' automatically if filesystem is not mounted.Richard W.M. Jones2012-03-091-11/+2
|
* Mark e2fsck-f as deprecated, replaced by e2fsck API.Richard W.M. Jones2012-03-091-1/+1
|
* fish: Document that guestfish sets pgroup to true (RHBZ#801273).Richard W.M. Jones2012-03-081-1/+3
|
* fish: Properly free up strings, lists along all error paths (found by Coverity).Richard W.M. Jones2012-03-081-84/+106
| | | | | | | | | | | | | | | | | | | | This also includes some tidying up of the generated code. Error: RESOURCE_LEAK: /builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13254: alloc_fn: Calling allocation function "parse_string_list". /builddir/build/BUILD/libguestfs-1.16.5/fish/fish.c:1386: alloc_fn: Storage is returned from allocation function "realloc". /builddir/build/BUILD/libguestfs-1.16.5/fish/fish.c:1386: var_assign: Assigning: "argv_new" = "realloc(argv, 8UL * argv_len)". /builddir/build/BUILD/libguestfs-1.16.5/fish/fish.c:1392: var_assign: Assigning: "argv" = "argv_new". /builddir/build/BUILD/libguestfs-1.16.5/fish/fish.c:1396: return_alloc: Returning allocated memory "argv". /builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13254: var_assign: Assigning: "devices" = storage returned from "parse_string_list(argv[i++])". /builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13271: leaked_storage: Variable "devices" going out of scope leaks the storage it points to. /builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13288: leaked_storage: Variable "devices" going out of scope leaks the storage it points to. /builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13293: leaked_storage: Variable "devices" going out of scope leaks the storage it points to. /builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13311: leaked_storage: Variable "devices" going out of scope leaks the storage it points to. /builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13316: leaked_storage: Variable "devices" going out of scope leaks the storage it points to. /builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13334: leaked_storage: Variable "devices" going out of scope leaks the storage it points to. /builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13349: leaked_storage: Variable "devices" going out of scope leaks the storage it points to. /builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13355: leaked_storage: Variable "devices" going out of scope leaks the storage it points to.
* Dead code: Remove comma-check in first if-clause (found by Coverity).Richard W.M. Jones2012-03-081-3/+4
| | | | | | | | Error: DEADCODE: /builddir/build/BUILD/libguestfs-1.16.5/fish/event-names.c:65: dead_error_condition: On this path, the condition "comma" cannot be true. /builddir/build/BUILD/libguestfs-1.16.5/fish/event-names.c:57: const: After this line, the value of "comma" is equal to 0. /builddir/build/BUILD/libguestfs-1.16.5/fish/event-names.c:57: assignment: Assigning: "comma" = "0". /builddir/build/BUILD/libguestfs-1.16.5/fish/event-names.c:65: dead_error_line: Execution cannot reach this statement "fputc(44, fp);".
* inspection: Add detection of FreeDOS (RHBZ#786215).Richard W.M. Jones2012-03-071-0/+8
| | | | | FreeDOS is returned as type="dos", distro="freedos". No version or application information is returned at present.
* Add support for Buildroot and Cirros distributions.Richard W.M. Jones2012-03-071-0/+8
|
* Remove ConfigOnly flag from set-autosync.Richard W.M. Jones2012-03-051-1/+1
| | | | | | guestfs_set_autosync sets a flag which affects guestfs_close, and so this call can be made at any time before the handle is closed, not just in the config state.
* Make "template" a reserved word.Marcin Gibula2012-03-042-4/+4
| | | | | | Function guestfs_mkdtemp uses c++ keyword "template" as a parameter name. In result, attempt to use guestfs.h header in c++ program results in compile error.
* New API: set-label, for setting a label on any filesystem.Richard W.M. Jones2012-02-271-2/+26
| | | | | | Currently only ext2/3/4 and (newly) NTFS are supported. This change also deprecates set-e2label.
* New APIs: ntfsclone-in, ntfsclone-out.Richard W.M. Jones2012-02-271-0/+27
|
* New API: ntfsfix for fixing problems on NTFS.Richard W.M. Jones2012-02-271-0/+16
| | | | Note this is not a "chkdsk" equivalent tool.
* Add a flag to make some functions called only at CONFIG state (RHBZ#796520).Wanlong Gao2012-02-234-34/+43
| | | | | | | Add a flag "ConfigOnly" to make sure that some non-daemon functions should be called only at CONFIG state (RHBZ#796520). Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* daemon: Don't xdr_free uninitialized args struct on error paths.Richard W.M. Jones2012-02-131-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For stubs of functions that had arguments, code did this: static void mount_stub (XDR *xdr_in) { int r; struct guestfs_mount_args args; if (optargs_bitmask != 0) { //... goto done; } // possibly other tests here memset (&args, 0, sizeof args); [...] done: xdr_free ((xdrproc_t) xdr_guestfs_mount_args, (char *) &args); return; } This caused xdr_free to be called on uninitialized 'args' struct, causing a segfault. The fix is to add another label, so the code looks like: static void mount_stub (XDR *xdr_in) { int r; struct guestfs_mount_args args; if (optargs_bitmask != 0) { //... goto done_no_free; } // possibly other tests here memset (&args, 0, sizeof args); [...] done: xdr_free ((xdrproc_t) xdr_guestfs_mount_args, (char *) &args); done_no_free: return; } This fixes commit 330fbea5b2d6bd7db84f7ea7afe87cf1bcd438e0 and commit 0344248af55802bbbd816b349ec1ba9305996f6e.
* wipefs: Fix documentation.Richard W.M. Jones2012-02-101-3/+1
| | | | This fixes commit a2b3e0900ee14e5a49d526c24e22edefc3030f99.
* NEW API: add a new api wipefsWanlong Gao2012-02-101-0/+16
| | | | | | | Add the new api wipefs to erase the filesystem signatures on a device but now erase any data. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* New API: llz: This runs ls -laZ and is useful for showing SELinux contexts.Richard W.M. Jones2012-02-091-0/+9
|
* Clarify the error message when unavailable functions are called (RHBZ#679737).Richard W.M. Jones2012-02-011-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Callers are supposed to use the availability API to check for functions that may not be available in particular builds of libguestfs. If they don't do this, currently they tend to get obscure error messages, eg: libguestfs: error: zerofree: /dev/vda1: zerofree: No such file or directory This commit changes the error message to explain what callers ought to be doing instead: libguestfs: error: zerofree: feature 'zerofree' is not available in this build of libguestfs. Read 'AVAILABILITY' in the guestfs(3) man page for how to check for the availability of features. This patch makes the stubs check for availability. The stub code changes to: static void zerofree_stub (XDR *xdr_in) { [...] /* The caller should have checked before calling this. */ if (! optgroup_zerofree_available ()) { reply_with_error ("feature '%s' is not available in this\n" "build of libguestfs. Read 'AVAILABILITY' in the guestfs(3) man page for\n" "how to check for the availability of features.", "zerofree"); goto done; } [...]
* ocaml: Fix bytecode bindings for functions with >= 6 args.Richard W.M. Jones2012-01-271-1/+1
|
* gobject: Add an explicit close callMatthew Booth2012-01-261-11/+45
| | | | | This change binds guestfs_close(). It consequently results in RConstOptString being able to throw an error.
* gobject: Allow RConstOptString to return an errorMatthew Booth2012-01-261-18/+11
| | | | | | | | | | | RConstOptString cannot return an error in the C api. This makes it a special case for the GObject api, as all other return types have a corresponding GError **err argument to return an error. This change removes this special case, and includes the possibility of an error return in the API. An error is indicated by setting *err to a non-NULL value. This change is in preparation for adding a close api. An attempt to call any api, even RConstOptString, on a closed handle must return an error.
* php: function_entry -> zend_function_entry.Richard W.M. Jones2012-01-221-1/+1
| | | | | | function_entry was left over from PHP 3. See: http://news.php.net/php.pecl.dev/7123
* bindtests: Test optargs in test0Matthew Booth2012-01-203-30/+180
| | | | | | | | Note that this change disables compiling and running the haskell bindtests. The haskell bindings do not implement optargs, and adding optargs to test0 causes that method not to be bound in the haskell bindings. This prevents the haskell bindtests from compiling. These should be re-enabled when optargs are implemented.
* gobject: Add basic bindtestsMatthew Booth2012-01-202-0/+35
|
* gobject: Add GObject bindingsMatthew Booth2012-01-203-0/+882
|
* generator: Add CamelName flagMatthew Booth2012-01-203-5/+15
| | | | | | | | | | We can make a good guess at camel case names for most APIs. For example, add_drive_opts can be automatically transformed to AddDriveOpts. However, other apis don't produce a satisfactory name when transformed automatically. For example, we would want md_create to produce MDCreate rather than MdCreate. This change adds a CamelName flag which allows a camel case name to be specified explicitly when the automatic transformation isn't satisfactory.
* c: Fix prototype generator when last argument is a BufferInMatthew Booth2012-01-201-1/+7
| | | | | | We were passing the name of the last argument directly to va_start. However, if the last argument is a BufferIn it expands to 2 arguments, the latter of which is <name>_size.
* bindtests: Add a test for RBufferOutMatthew Booth2012-01-202-0/+2
| | | | Fixup the existing test, and add an entry in actions so it's actually generated.