summaryrefslogtreecommitdiffstats
path: root/ocaml/guestfs-c.c
Commit message (Collapse)AuthorAgeFilesLines
* ocaml: Get rid of CAMLprim.Richard W.M. Jones2012-10-151-8/+8
| | | | It's wrong to use it, and in any case it doesn't do anything on Linux.
* New APIs: guestfs_create_flags, guestfs_parse_environment,Richard W.M. Jones2012-10-151-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | guestfs_parse_environment_list. Add a new function for creating a handle: guestfs_h *guestfs_create_flags (unsigned flags [, ...]); This variant lets you supply flags and extra arguments, although extra arguments are not used at the moment. Of particular interest is the ability to separate the creation of the handle from the parsing of environment variables like LIBGUESTFS_DEBUG. guestfs_create does both together, which prevents us from propagating errors from parsing environment variables back to the caller (guestfs_create has always printed any errors on stderr and then just ignored them). If you are interested in these errors, you can now write: g = guestfs_create_flags (GUESTFS_CREATE_NO_ENVIRONMENT); if (!g) exit (EXIT_FAILURE); r = guestfs_parse_environment (g); if (!r) exit (EXIT_FAILURE); Also you can *omit* the call to guestfs_parse_environment, which creates a handle unaffected by the environment (which was not possible before). This commit also includes new (backwards compatible) changes to the OCaml, Perl, Python, Ruby and Java constructors that let you use the flags.
* build: Rename most C files that contain underscore with dash.Richard W.M. Jones2012-07-191-0/+423
This is just code motion. Some files cannot be renamed. Notably rpcgen input and output files must not contain dash characters, else rpcgen breaks.