Displaying 20 results from an estimated 33 matches for "copy_t".
Did you mean:
copy_to
2009 Aug 28
1
[PATCHES] avoid more warnings
...0_byte, ocaml_guestfs_sfdisk_byte,
ocaml_guestfs_sfdisk_N_byte.
---
src/generator.ml | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/generator.ml b/src/generator.ml
index 46fcf2c..fa7d240 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -6770,6 +6770,10 @@ copy_table (char * const * argv)
let needs_extra_vs =
match fst style with RConstOptString _ -> true | _ -> false in
+ pr "/* Emit prototype to appease gcc's -Wmissing-prototypes. */\n";
+ pr "CAMLprim value ocaml_guestfs_%s (value %s" name (List.hd...
2023 Jun 27
1
[PATCH libguestfs 1/4] ocaml: Replace old enter/leave_blocking_section calls
...l.ml
+++ b/generator/OCaml.ml
@@ -429,6 +429,7 @@ and generate_ocaml_c () =
#include <caml/memory.h>
#include <caml/mlvalues.h>
#include <caml/signals.h>
+#include <caml/threads.h>
#include <guestfs.h>
#include \"guestfs-utils.h\"
@@ -689,12 +690,12 @@ copy_table (char * const * argv)
pr "\n";
if blocking then
- pr " caml_enter_blocking_section ();\n";
+ pr " caml_release_runtime_system ();\n";
pr " r = %s " c_function;
generate_c_call_args ~handle:"g" style...
2023 Jun 27
4
[PATCH libguestfs 0/4] Fix ups for OCaml 5
No action required here as I have pushed this already, this is
just for your information.
Rich.
2016 Feb 05
7
[PATCH 0/7] lib: Stop exporting the safe_malloc, etc. functions.
The safe_malloc (etc) functions call g->abort_fn on failure. That's
not appropriate for language bindings, and we never intended that
these internal functions be used from language bindings, that was just
a historical accident.
This patch series removes any external use of the safe_* functions.
Rich.
2015 Aug 24
3
[PATCH 1/3] ocaml: dynamically generate the content of Guestfs.Errno
...; external %s : unit -> int = \"ocaml_guestfs_get_%s\" \"noalloc\"\n"
+ le e;
+ pr " let errno_%s = %s ()\n" e le
+ ) ocaml_errnos;
+ pr "\
end
(* Give the exceptions names, so they can be raised from the C code. *)
@@ -717,6 +728,48 @@ copy_table (char * const * argv)
)
) external_functions_sorted
+(* Generate the OCaml bindings C errnos. *)
+and generate_ocaml_c_errnos () =
+ generate_header CStyle LGPLv2plus;
+
+ pr "\
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <st...
2012 Jan 09
1
[PATCH 1/2] generator: Rename java_structs to camel_structs to better reflect their purpose
This map was originally included just for the java bindings, but is generally
useful to any binding which uses camel case by requirement or convention.
---
generator/generator_haskell.ml | 4 ++--
generator/generator_java.ml | 10 +++++-----
generator/generator_main.ml | 2 +-
generator/generator_structs.ml | 12 +++++-------
generator/generator_structs.mli | 8 ++++----
5
2009 Nov 09
1
[PATCH libguestfs] indent with spaces, not TABs
...r " %s = resolve_win_path (argv[%d]);\n" name i;
+ pr " if (%s == NULL) return -1;\n" name
| OptString name ->
pr " %s = STRNEQ (argv[%d], \"\") ? argv[%d] : NULL;\n"
name i i
@@ -7255,7 +7255,7 @@ copy_table (char * const * argv)
| StringList n | DeviceList n ->
pr " ocaml_guestfs_free_strings (%s);\n" n;
| Pathname _ | Device _ | Dev_or_Path _ | String _ | OptString _
- | Bool _ | Int _ | Int64 _
+ | Bool _ | Int _ | Int64 _
| FileIn _ |...
2014 Feb 10
5
[PATCH 0/4] add GUID validation (RHBZ#1008417)
Hi,
this patch serie adds a new GUID type in the generator, which would do
the same as String, but also validating (just in the C output) the
passed GUID string.
This allows to reject invalid GUIDs before passing them to low-level
tools.
Pino Toscano (4):
utils: add a function to validate a GUID string
generator: add a GUID parameter type
generator: generate code for parameter validation
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...+ | StringList n | DeviceList n | RelativePathnameList n ->
pr " free (%s);\n" n
) args;
List.iter (
diff --git a/generator/ocaml.ml b/generator/ocaml.ml
index 5d92fcb..d8ab3b1 100644
--- a/generator/ocaml.ml
+++ b/generator/ocaml.ml
@@ -600,7 +600,7 @@ copy_table (char * const * argv)
| BufferIn n ->
pr " size_t %s_size = caml_string_length (%sv);\n" n n;
pr " char *%s = guestfs_int_safe_memdup (g, String_val (%sv), %s_size);\n" n n n
- | StringList n | DeviceList n ->
+ | Stri...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...n ->
+ | StringList n | DeviceList n | FilenameList n ->
pr " free (%s);\n" n
) args;
List.iter (
diff --git a/generator/ocaml.ml b/generator/ocaml.ml
index 5d92fcb..4bbe5bc 100644
--- a/generator/ocaml.ml
+++ b/generator/ocaml.ml
@@ -600,7 +600,7 @@ copy_table (char * const * argv)
| BufferIn n ->
pr " size_t %s_size = caml_string_length (%sv);\n" n n;
pr " char *%s = guestfs_int_safe_memdup (g, String_val (%sv), %s_size);\n" n n n
- | StringList n | DeviceList n ->
+ | Stri...
2012 Oct 30
5
[PATCH v3 0/5] Add symbol versioning.
This is a simpler patch series to add symbol versioning.
I have pushed patches 1-3 upstream.
Rich.
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...ot;
@@ -297,7 +297,7 @@ class guestfs ?environment ?close_on_exit () =
);
List.iter
(fun alias -> pr " method %s = self#%s\n" alias name) non_c_aliases
- ) all_functions_sorted;
+ ) external_functions_sorted;
pr " end\n"
@@ -431,7 +431,7 @@ copy_table (char * const * argv)
(* generate the function for typ *)
emit_ocaml_copy_list_function typ
| typ, _ -> () (* empty *)
- ) (rstructs_used_by all_functions);
+ ) (rstructs_used_by external_functions);
(* The wrappers. *)
List.iter (
@@ -669,7 +669,7 @@ copy_ta...
2011 Nov 09
6
[PATCH] Add tune2fs support to libguestfs.
At the moment OpenStack uses kpartx and nbd to resize filesystems and
inject files to guests. I sincerely hope they don't allow untrusted
users to upload guest images / AMIs :-(
To fix this I'm looking into adding libguestfs support as an optional
backend in OpenStack.
The only missing feature in libguestfs is the ability to call tune2fs
on a filesystem. This patch series adds tune2fs
2012 Oct 30
7
[PATCH v2 0/7] Add symbol versioning (now working).
This rather more complex patch series adds symbol versioning (7/7
shows it in action). This works for me, tested by running old and new
virt-inspector binaries against the new library.
Rich.
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but
don't update apis which must return mountables.
Matt
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky
for development (too easy to miss new ones) so I spent some
time last week and today working on removing them.
The first patch gets us down to almost no warnings with
the original -Wall setting. That was by far the hardest part.
Once I'd done that, I enabled nearly all of gcc's warnings via
gnulib's warnings and manywarnings modules
2013 Jan 30
1
[PATCH] Make internal-only functions and structures private
...4e6c 100644
--- a/generator/erlang.ml
+++ b/generator/erlang.ml
@@ -270,7 +270,7 @@ extern void free_strings (char **r);
pr " return erl_mk_list (t, %d);\n" (List.length cols);
pr "}\n";
pr "\n";
- ) structs;
+ ) external_structs;
(* Emit a copy_TYPE_list function definition only if that function is used. *)
List.iter (
diff --git a/generator/fish.ml b/generator/fish.ml
index f7e111f..077a0b4 100644
--- a/generator/fish.ml
+++ b/generator/fish.ml
@@ -279,7 +279,7 @@ Guestfish will prompt for these separately."
) cols;
p...
2016 Sep 02
6
[PATCH 0/4] generator: Some work to split large C files
By splitting up large C files we can make parallel compiles
a bit faster.
Rich.
2014 Dec 10
2
[PATCH v1 0/2] Implement guestfs_add_libvirt_dom.
This is only lightly tested at the moment.
For context see:
https://bugzilla.redhat.com/show_bug.cgi?id=1138203#c40
https://bugzilla.redhat.com/show_bug.cgi?id=1075143
https://bugzilla.redhat.com/show_bug.cgi?id=1075164
Note this is not a complete fix. At least one more libguestfs patch
is required (to implement virDomainPtr in the python bindings). Plus
a virt-manager patch.
Rich.
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
https://bugzilla.redhat.com/show_bug.cgi?id=847880
https://bugzilla.redhat.com/show_bug.cgi?id=847881
This patch series adds various optional arguments to the tar-in and
tar-out commands.
Firstly (1/7) an optional "compress" flag is added to select
compression. This makes the calls tgz-in/tgz-out/txz-in/txz-out
deprecated, and expands the range of compression types available.