search for: generate_daemon_stubs

Displaying 20 results from an estimated 36 matches for "generate_daemon_stubs".

2017 Apr 20
6
[PATCH 0/5] generator: daemon: Various simplifications to stubs code.
This is a series of simplifications to the stubs code. It's all refactoring, there is no functional change. Rich.
2017 Apr 25
0
[PATCH] daemon: Use CLEANUP_* functions to avoid an explicit free in stub functions.
--- generator/daemon.ml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/generator/daemon.ml b/generator/daemon.ml index b00627063..9d5ba00b2 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -155,13 +155,13 @@ let generate_daemon_stubs actions () = | RBool _ -> pr " int r;\n" | RConstString _ | RConstOptString _ -> failwithf "RConstString|RConstOptString cannot be used by daemon functions" - | RString _ -> pr " char *r;\n" - | RStringList _ | RHashta...
2017 Jun 19
0
[PATCH v7 13/13] daemon: Link guestfsd with libutils.
...aemon/btrfs.c daemon/cap.c daemon/checksum.c daemon/cleanups.c -daemon/cleanups.h daemon/cmp.c daemon/command.c daemon/command.h diff --git a/generator/daemon.ml b/generator/daemon.ml index 0300dc54b..2ae462864 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -397,7 +397,7 @@ let generate_daemon_stubs actions () = | RStringList (RPlainString, n) | RHashtable (RPlainString, RPlainString, n) -> pr " struct guestfs_%s_ret ret;\n" name; - pr " ret.%s.%s_len = count_strings (r);\n" n n; + pr " ret.%s.%s_len = guestfs_...
2017 Jul 14
0
[PATCH 02/27] daemon: Allow parts of the daemon and APIs to be written in OCaml.
...functions : Types.action list -> Types.action list (** Filter {!actions}, returning only functions requiring documentation. *) diff --git a/generator/daemon.ml b/generator/daemon.ml index 2ae462864..ac410b733 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -471,6 +471,193 @@ let generate_daemon_stubs actions () = pr "}\n\n"; ) (actions |> daemon_functions |> sort) +let generate_daemon_caml_types_ml () = + generate_header OCamlStyle GPLv2plus + +let generate_daemon_caml_callbacks_ml () = + generate_header OCamlStyle GPLv2plus; + + if actions |> impl_ocaml_functi...
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.
2017 Jun 03
3
[PATCH 0/3]: daemon: Reimplement ‘file’ API in OCaml.
This patch series is just FYI at the moment. However it does pass the tests. The daemon is a self-contained program. We don't need to write it all in C. Writing parts of it in OCaml would make it simpler and less error-prone. In particular if the daemon was written in a more sane programming language then we could move the inspection code to run entirely inside the appliance, which would
2017 Jul 21
0
[PATCH v2 01/23] daemon: Allow parts of the daemon and APIs to be written in OCaml.
...functions : Types.action list -> Types.action list (** Filter {!actions}, returning only functions requiring documentation. *) diff --git a/generator/daemon.ml b/generator/daemon.ml index 2ae462864..5004509e6 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -471,6 +471,324 @@ let generate_daemon_stubs actions () = pr "}\n\n"; ) (actions |> daemon_functions |> sort) +let generate_daemon_caml_types_ml () = + generate_header OCamlStyle GPLv2plus + +let generate_daemon_caml_callbacks_ml () = + generate_header OCamlStyle GPLv2plus; + + if actions |> impl_ocaml_functi...
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...tyle = ret, args, optargs } -> + fun { name; style = ret, args, optargs } -> let args_passed_to_daemon = args @ args_of_optargs optargs in let args_passed_to_daemon = List.filter (function String ((FileIn|FileOut), _) -> false | _ -> true) @@ -83,7 +83,7 @@ let generate_daemon_stubs_h () = "; List.iter ( - fun { name = name } -> + fun { name } -> pr "extern void %s_stub (XDR *xdr_in);\n" name; ) (actions |> daemon_functions |> sort); @@ -117,7 +117,7 @@ let generate_daemon_stubs actions () = "; List.iter ( - fun...
2012 Oct 22
3
[PATCH 0/2 NOT WORKING] Symbol versioning
John, This was my attempt to add symbol versioning to the library, letting us break ABI without breaking any existing callers. Unfortunately it doesn't work: - the new versioned symbols are marked local in libguestfs.so - the existing symbols should now have @GUESTFS_0.0 versions, but don't The documentation for this stuff is extremely thin, and I've got a bad case of
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.
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.
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...er (function String ((FileIn|FileOut), _) -> false | _ -> true) + args_passed_to_daemon in let style = ret, args_passed_to_daemon, [] in generate_prototype ~single_line:true ~newline:true ~in_daemon:true ~prefix:"do_" @@ -123,8 +123,8 @@ let generate_daemon_stubs actions () = let args_passed_to_daemon = args @ args_of_optargs optargs in let args_passed_to_daemon = - List.filter (function FileIn _ | FileOut _ -> false | _ -> true) - args_passed_to_daemon in + List.filter (function String ((FileIn|FileOut), _) -&gt...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.
2017 Oct 04
11
[PATCH 0/9] build: Require OCaml >= 4.02.
Per my previous email: https://www.redhat.com/archives/libguestfs/2017-September/msg00203.html I'd like to talk about requiring a more modern version of the OCaml compiler. These commits show some of the code changes which would be possible with OCaml >= 3.12 [which it turns out we already require by accident] and also with OCaml >= 4.02. The latter is my favoured option. Rich.
2018 Apr 09
0
[PATCH 3/3] daemon: autogenerate most of OCaml interfaces
...unctions implemented in OCaml. * Basically we implement the do_<name> function here, and * have it call out to OCaml code. diff --git a/generator/daemon.mli b/generator/daemon.mli index 40bf31302..f0268ba99 100644 --- a/generator/daemon.mli +++ b/generator/daemon.mli @@ -21,6 +21,7 @@ val generate_daemon_stubs_h : unit -> unit val generate_daemon_stubs : Types.action list -> unit -> unit val generate_daemon_caml_stubs : unit -> unit val generate_daemon_caml_callbacks_ml : unit -> unit +val generate_daemon_caml_interface : string -> unit -> unit val generate_daemon_dispatch : unit...
2018 Apr 10
0
[PATCH v2 5/5] daemon: autogenerate OCaml interfaces
...unctions implemented in OCaml. * Basically we implement the do_<name> function here, and * have it call out to OCaml code. diff --git a/generator/daemon.mli b/generator/daemon.mli index 40bf31302..f0268ba99 100644 --- a/generator/daemon.mli +++ b/generator/daemon.mli @@ -21,6 +21,7 @@ val generate_daemon_stubs_h : unit -> unit val generate_daemon_stubs : Types.action list -> unit -> unit val generate_daemon_caml_stubs : unit -> unit val generate_daemon_caml_callbacks_ml : unit -> unit +val generate_daemon_caml_interface : string -> unit -> unit val generate_daemon_dispatch : unit...
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
This rather complex set of patches allow non-optargs functions to gain optional arguments, while preserving source and binary backwards compatibility. The problem is that we cannot add an optional argument to an existing function. For example, we might want to add flags to the 'lvresize' API which currently has no optional arguments.
2018 Apr 09
5
[PATCH 0/3] daemon: generate almost all the API OCaml interfaces
Hi, as a followup for the signature fix for mount_vfs [1], here it is a patch series to generate automatically most of the OCaml interfaces of daemon actions. Only the Lvm and Mount modules are left with hand-written interfaces. [1] https://www.redhat.com/archives/libguestfs/2018-April/msg00059.html Thanks, Pino Toscano (3): daemon: directly use Optgroups daemon: use the structs from the
2017 Sep 20
8
[PATCH v2 0/6] Fix OCaml dependencies.
v1 -> v2: - Fixed everything mentioned in patch review. - Libdir module is removed as a separate commit. Rich.
2017 Jun 03
12
[PATCH v2 00/12] Allow APIs to be implemented in OCaml.
Version 1 was here: https://www.redhat.com/archives/libguestfs/2017-June/msg00003.html This patch series reimplements a few more APIs in OCaml, including some very important core APIs like ?list_filesystems? and ?mount?. All the tests pass after this. The selection of APIs that I have moved may look a little random, but in fact they are all APIs consumed by the inspection code (and some more