| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a thread safety issue with the current OCaml bindings which
is well explained in the bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=604691
This commit fixes the safety issue by copying strings temporarily
before releasing the thread lock. Updated code looks like this:
char *filename = guestfs_safe_strdup (g, String_val (filenamev));
int r;
caml_enter_blocking_section ();
r = guestfs_add_drive_ro (g, filename);
caml_leave_blocking_section ();
free (filename);
if (r == -1)
ocaml_guestfs_raise_error (g, "add_drive_ro");
Also included is a regression test.
|
| |
|
|
|
|
| |
* ocaml/guestfs_c.c (ocaml_guestfs_create, ocaml_guestfs_close): Declare.
|
|
|
|
| |
* ocaml/guestfs_c.c (guestfs_custom_operations): Add a cast.
|
|
|
|
|
| |
* ocaml/guestfs_c.c (ocaml_guestfs_strings_val): Declare index as
unsigned int.
|
|
|
|
|
|
| |
* ocaml/guestfs_c.c: Include <config.h>.
* examples/to-xml.c: Likewise.
* examples/hello.c: Likewise.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|