summaryrefslogtreecommitdiffstats
path: root/generator
Commit message (Collapse)AuthorAgeFilesLines
* tests: More efficient use of strings in the object code.Richard W.M. Jones2012-11-201-37/+32
| | | | | No functional change. (cherry picked from commit a74f1681686e534e9c1883e26278cf7e0b74da07)
* tests: Cleanup code that prints each test name.Richard W.M. Jones2012-11-201-12/+18
| | | | | This is just code motion. (cherry picked from commit 2deb235cf4d30e715507f02b02a0391e1d0c3ee9)
* tests: Change code for printing warnings about untested functions.Richard W.M. Jones2012-11-201-3/+12
| | | | | Just code cleanup, no functional change. (cherry picked from commit 56c7967cadbd87ca922e02355f142f70744c1330)
* tests: Remove dead code in generated output.Richard W.M. Jones2012-11-201-10/+0
| | | | (cherry picked from commit 04a8cffee7d93bd7fc82f7cf9ef16db75933a273)
* tests: Format the generated code properly.Richard W.M. Jones2012-11-201-6/+12
| | | | | This is just whitespace changes in the output. (cherry picked from commit 599a1930b0778fb93dcbb4bd679f9263fe650683)
* tests: wipefs: Don't try to wipe mounted filesystem.Richard W.M. Jones2012-11-201-1/+2
| | | | | | | | | Previously wipefs (the utility) allowed this, but it's obviously a bad thing to do and the new wipefs gives an error if you try it: wipefs: error: /dev/VG/LV: probing initialization failed: Device or resource busy (cherry picked from commit 6ac943fbef4fa8386da456048f856a387f941fc2)
* ocaml: Get rid of CAMLprim.Richard W.M. Jones2012-10-301-8/+8
| | | | | | It's wrong to use it, and in any case it doesn't do anything on Linux. (cherry picked from commit 3d46f7dc038f87e00a27e9f294d4115436f1ff23)
* lib: Pointer arg to safe_memdup function should be const.Richard W.M. Jones2012-10-301-1/+1
| | | | (cherry picked from commit 64e8e0011c6e961bae010b6008d07f501d53f35d)
* launch: Add warning not to avoid calling launch twice on the same handle.Richard W.M. Jones2012-10-301-1/+6
| | | | | | | For more information on this topic, see: https://www.redhat.com/archives/libguestfs/2012-October/msg00045.html (cherry picked from commit 2e388e8a3740aa470276b78027f51304a7f0ff92)
* docs: add_drive: Clean up documentation of the 'filename' parameter.Richard W.M. Jones2012-10-301-4/+5
| | | | | Cherry picked from commit 1467ea00b850bec2722671a400adb2ffda533365 and modified for stable-1.18 branch.
* docs: Minor cleanup of documentation for add_drive 'name' parameter.Richard W.M. Jones2012-10-301-2/+3
| | | | (cherry picked from commit 60650da1ed7b6d916ceeee0e397c7bb2fbc282e5)
* generator: Tidy up comments in guestfs_protocol.x.Richard W.M. Jones2012-10-011-9/+19
| | | | (cherry picked from commit db6a8512402f068815f882928662af0d8f5eec83)
* generator: Allow an optional emacs-mode at the top of generated files.Richard W.M. Jones2012-10-011-2/+7
| | | | (cherry picked from commit a95d4261b8cedc31bfc3c5358be7b346b27d457b)
* daemon: stubs: Move all arg decls to top of function.Richard W.M. Jones2012-09-191-2/+2
| | | | | | | | | | | | | For some reason, argument declarations were handled inconsistently for strings and non-string arguments. Non-string arguments were all declared at the top of the function stub, where as string arguments were declared in place. Be consistent. This is just code motion. (cherry picked from commit c387b69cba8f145438188b2b4567abbc9580ade0)
* 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: Remove trailing whitespace.Richard W.M. Jones2012-09-193-5/+5
| | | | | Found by 'make syntax-check'. (cherry picked from commit 2cac8d490e9884a8c7376e49fd1cda2e3d3abec1)
* generator: Remove inaccurate comment.Richard W.M. Jones2012-09-191-20/+0
| | | | | | The correct way to extend functions is documented in generator/README. This comment was no longer accurate. (cherry picked from commit 44a11e955b31f7c0cf463a04d640263cccdd0c4d)
* syntax: Use STREQ/STRNEQ in place of strcmp.Richard W.M. Jones2012-09-191-1/+3
| | | | | Found by 'make syntax-check'. (cherry picked from commit b0cefb417d01c6dcb87cc6bafe9c19b98c690c9d)
* perl: Add <stdio.h> and <stdlib.h> for printf and malloc.Richard W.M. Jones2012-09-191-0/+2
| | | | (cherry picked from commit cd8976a5b52425f9d7c45249e1a593a341d91c52)
* perl: Include <inttypes.h> and assume it always defines PRId64 and PRIu64.Richard W.M. Jones2012-09-191-8/+2
| | | | | | | If these are not defined in the header files, it's a problem on the platform which we should fix with gnulib. Our replacement definitions might be wrong here. (cherry picked from commit 188b44ee458a666bee8a18ed47cccdec25859aff)
* fish: Replace '_' with '-' in deprecation cross-refs (thanks Olaf Hering).Richard W.M. Jones2012-09-192-3/+5
| | | | (cherry picked from commit 8acdc23622ea95a233ac831d67c143517aa94bba)
* java: Fix >= 32 optargs (thanks Wanlong Gao).Richard W.M. Jones2012-09-181-1/+1
| | | | (cherry picked from commit f65dee769d1fc53c5963c381bf8a1bf02654f78c)
* perl: bindtests: Fix 64 bit integers on input on 32 bit Perl interpreter.Richard W.M. Jones2012-08-302-4/+26
| | | | (cherry picked from commit 15cd9dde5e0e4a7d510de71ef8991750971cf6d1)
* Mac OS X: Fixed combination of running autogen.sh on Linux and building on ↵Masami HIRATA2012-08-301-0/+1
| | | | | | | Mac OS X Signed-off-by: Masami HIRATA <msmhrt@gmail.com> (cherry picked from commit 0a275bd090850963f331a115a4fadfbf1dfb1caf)
* docs: Document null disks.Richard W.M. Jones2012-08-301-0/+3
| | | | | | It's always been possible to use /dev/null as a disk image. Document this formally in the API. (cherry picked from commit e1e8b3a1cfdeee34fbd51f79b8724c5a58f25c10)
* java: Fix bindtests when passing 64 bit integer literals.Richard W.M. Jones2012-08-301-2/+2
| | | | (cherry picked from commit 704e46af9c054fe3571884989c992dfd7d8284e5)
* ocaml: Fix bindtests when passing negative optional arguments.Richard W.M. Jones2012-08-301-2/+2
| | | | (cherry picked from commit 9526f632d80f8d66ecf8a7da5444e1446129fceb)
* generator: Allow permission of output files to be specified.Richard W.M. Jones2012-08-302-3/+3
| | | | (cherry picked from commit 449bd4b50ff8ecd9128439a39a74ca731a17aa1f)
* bindtests: Space before parens in call.Richard W.M. Jones2012-08-301-1/+1
| | | | (cherry picked from commit 690bdaa3927e56d33e241752eef37f887274d73b)
* ocaml: Use Store_field macro instead of caml_modify.Richard W.M. Jones2012-08-301-1/+1
| | | | | | | | Use the safer, higher level Store_field macro when constructing arrays of structs to return. I don't know if it is strictly necessary in this case, but it's safer. (cherry picked from commit 769a6f24c60e7a4d55560025554796ba4be19d03)
* generator: 'delete' is a reserved word (in C++).Richard W.M. Jones2012-08-111-4/+4
| | | | (cherry picked from commit 7d6f76709e71b38e0bc4f018c4d873a32ffe19da)
* ruby: Mark all VALUEs as volatile.Richard W.M. Jones2012-08-051-15/+26
| | | | (cherry picked from commit 083125f709c8ca6ec56abf99df918e70376a99bd)
* ruby: Allow optional arguments hash to be really optional.Richard W.M. Jones2012-08-051-38/+59
| | | | | | | | | | | | | | | Allow optargs functions to be called as either: g.mkfs_opts(fs, device) or: g.mkfs_opts(fs, device, { optargs hash }) This also preserves backwards compatibility with once_has_no_optargs functions such as mkfs. (cherry picked from commit 0f837ec068783a6318ba6f7490b567566bce2aa4)
* ruby: In event wrapper, ignore callback functions which have type T_ZOMBIE.Richard W.M. Jones2012-08-051-2/+7
| | | | | Note that in old versions of Ruby, T_ZOMBIE was not defined. (cherry picked from commit 5f30912d74a553399d2bda055560d4340a15088d)
* Mac OS X: Use u_int64_t/uint64_t instead of unsigned hyper in .x fileMasami HIRATA2012-08-051-8/+23
| | | | | | | | Signed-off-by: Masami HIRATA <msmhrt@gmail.com> RWMJ: Fixed whitespace in generator_xdr.ml (cherry picked from commit d74e7fad28ae7a2f894a12d30807f4b36078bf13)
* python: Set file encoding to utf-8.Richard W.M. Jones2012-08-051-0/+5
| | | | (cherry picked from commit a6366f5dae0e8332cfdad0894aa6e5c7fc3faa2c)
* build: Rename most C files that contain underscore with dash.Richard W.M. Jones2012-08-053-6/+6
| | | | | | | | | | | | | | 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.
* case_sensitive_path: Allow trailing path element to be missing (RHBZ#840115).Richard W.M. Jones2012-08-051-1/+4
| | | | | | | | | | | | | | case_sensitive_path is undefined when the final path element doesn't exist. Currently it returns an error, but this means that creating a new file doesn't work as expected: $ guestfish --rw -i -d windows touch 'win:c:\blah' libguestfs: error: case_sensitive_path: blah no file or directory found with this name We should allow this case (provided there is no trailing slash) so that new files or directories can be created. (cherry picked from commit 973581780d8a006f336684fef6762801402d775d)
* perl: In examples, call $g->shutdown, $g->close.Richard W.M. Jones2012-08-051-1/+2
| | | | (cherry picked from commit f6846d74c947bd8b711ef0b29148fa1e90580354)
* perl: Use $g instead of $h in documentation.Richard W.M. Jones2012-08-051-19/+19
| | | | | | $g is the "standard" name for libguestfs handles. (cherry picked from commit a99ea198b24745c49cdb42645c3497ac3b0e6a2f)
* java: Generate overloaded non-optargs method for each optargs method.Richard W.M. Jones2012-08-051-0/+23
| | | | | | | | | | | | | | | For example the existing method: public void mkfs_opts (String fstype, String device, Map<..> optargs); is now accompanied by this overloaded method which is a simple wrapper: public void mkfs_opts (String fstype, String device) throws LibGuestFSException { mkfs_opts (fstype, device, null); } (cherry picked from commit 0da2dbef26a9efddbc1f4cd6cbe796b3b5f98d13)
* generator: Add a note in generator/README about safely extending functions.Richard W.M. Jones2012-08-051-0/+9
| | | | (cherry picked from commit 196742cd46a8d80f0298f9f58c540482919306a3)
* generator: Move note in comment to generator/README file.Richard W.M. Jones2012-08-052-8/+7
| | | | (cherry picked from commit cf0defedb8121a0ff39c1d4c6d9f3eee9fd7ee72)
* New API: guestfs_shutdown: Cleanly shutdown the backend.Richard W.M. Jones2012-07-061-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* New API: guestfs_nr_devicesRichard W.M. Jones2012-07-061-0/+12
| | | | | | | | This returns the number of whole block devices added. It is usually simpler to call this than to list the devices and count them, which is what we do in some places in the current codebase. (cherry picked from commit 152b179a19e43fcb0baec65ea65d394ee1dba891)
* New API: device-index.Richard W.M. Jones2012-07-061-1/+14
| | | | | | | | This returns the index of the device, eg. /dev/sdb => 1. Or you can think of it as the order that the device was added, or the index of the device in guestfs_list_devices. (cherry picked from commit a9d7d044f552855a7ef78d953c0c2672e35bfc80)
* Ensure #include <config.h> occurs in every C file.Richard W.M. Jones2012-06-287-0/+14
| | | | (cherry picked from commit 1d17a6e9d8f434f952f3c171b5a81ca6b916fa1f)
* src/actions.c: Include <config.h> in this generated file.Richard W.M. Jones2012-06-281-0/+2
| | | | | | | | On RHEL 5, because _GNU_SOURCE was not defined, open_memstream was not being declared, resulting in miscompilation and a segfault in the trace code whenever open_memstream returned a pointer >= 0x80000000 (which would be truncated to a 32 bit int and then sign-extended). (cherry picked from commit 6777425636d1c04494e52c61dc44f523458d12d3)
* ruby: Add a replacement rb_hash_lookup function for Ruby 1.8.5.Richard W.M. Jones2012-06-281-0/+16
| | | | | This function was first added to Ruby in 1.8.7. (cherry picked from commit 8098d062b4cb70defd4aecba0ba8cd75cf893751)
* blockdev_getbsz: Remove test.Richard W.M. Jones2012-06-211-2/+1
| | | | | | The output of this test depends on page size, so on ppc64 it returns 64K. (cherry picked from commit 42475dd21fbdc551137fe815efadf08a87729642)