Displaying 12 results from an estimated 12 matches for "generate_daemon_structs_cleanups_c".
2017 Jun 19
2
Re: [PATCH v7 10/13] utils: Split out structs cleanups and printing into common/structs.
...t be used by the daemon, so interferes with us using
> common/utils in the daemon, so they are moved to a different library.
> ---
I checked it again, and the daemon does use structs cleanups:
$ cat generator/main.ml
[...]
output_to "daemon/structs-cleanups.c"
Daemon.generate_daemon_structs_cleanups_c;
output_to "daemon/structs-cleanups.h"
Daemon.generate_daemon_structs_cleanups_h;
See commits 32f0f9b032db592b50c4a4b0da29ef0de0478633 and
31fb6e20418e8f1b0647c92af0464f2009e9a997.
So structs cleanups could stay in libutils -- OTOH, structs printing
is only used in the lib...
2017 Mar 10
2
[PATCH 1/2] daemon: generate cleanup handlers for structs
...erator/daemon.ml b/generator/daemon.ml
index 3941d97..9453d12 100644
--- a/generator/daemon.ml
+++ b/generator/daemon.ml
@@ -840,3 +840,104 @@ let generate_daemon_optgroups_h () =
) optgroups;
pr "#endif /* GUESTFSD_OPTGROUPS_H */\n"
+
+(* Generate structs-cleanups.c file. *)
+and generate_daemon_structs_cleanups_c () =
+ generate_header CStyle GPLv2plus;
+
+ pr "\
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include \"daemon.h\"
+#include \"guestfs_protocol.h\"
+
+";
+
+ pr "/* Cleanup functions used by CLEANUP_* macros. Do not c...
2017 Jun 19
0
Re: [PATCH v7 10/13] utils: Split out structs cleanups and printing into common/structs.
...s using
> > common/utils in the daemon, so they are moved to a different library.
> > ---
>
> I checked it again, and the daemon does use structs cleanups:
>
> $ cat generator/main.ml
> [...]
> output_to "daemon/structs-cleanups.c"
> Daemon.generate_daemon_structs_cleanups_c;
> output_to "daemon/structs-cleanups.h"
> Daemon.generate_daemon_structs_cleanups_h;
Those are different from common/structs/structs-cleanups.[ch] though
(hence why they use different generator functions to generate them).
Rich.
--
Richard Jones, Virtualization Gr...
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
2018 Apr 09
0
[PATCH 3/3] daemon: autogenerate most of OCaml interfaces
...String.sub modname 1 (String.length modname - 1) in
+ output_to (sprintf "daemon/%s.mli" fn)
+ (Daemon.generate_daemon_caml_interface modname)
(* Main program. *)
let () =
@@ -155,6 +160,11 @@ Run it from the top source directory using the command
Daemon.generate_daemon_structs_cleanups_c;
output_to "daemon/structs-cleanups.h"
Daemon.generate_daemon_structs_cleanups_h;
+ let daemon_ocaml_interfaces = [
+ "Blkid"; "Btrfs"; "Devsparts"; "File"; "Filearch"; "Findfs"; "Inspect";
+ &quo...
2018 Apr 10
0
[PATCH v2 5/5] daemon: autogenerate OCaml interfaces
...ization : unit -> unit
val generate_daemon_names : unit -> unit
diff --git a/generator/main.ml b/generator/main.ml
index 34bca68d9..e51313779 100644
--- a/generator/main.ml
+++ b/generator/main.ml
@@ -155,6 +155,23 @@ Run it from the top source directory using the command
Daemon.generate_daemon_structs_cleanups_c;
output_to "daemon/structs-cleanups.h"
Daemon.generate_daemon_structs_cleanups_h;
+ let daemon_ocaml_interfaces =
+ List.fold_left (
+ fun set { impl } ->
+ let ocaml_function =
+ match impl with
+ | OCaml f -> fst (String.split &quo...
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 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned:
- Added the Optgroups module as suggested.
- Remove command temporary files.
- Replace command ~flags with ?fold_stdout_on_stderr.
- Nest _with_mounted function.
- Rebase & retest.
Rich.
2017 Sep 18
0
[PATCH 2/5] Make sure every *.ml file has a corresponding *.mli file.
...oc\"\n" group
) optgroups_names
+let generate_daemon_optgroups_mli () =
+ generate_header OCamlStyle GPLv2plus;
+
+ List.iter (
+ fun group ->
+ pr "val %s_available : unit -> bool\n" group
+ ) optgroups_names
+
(* Generate structs-cleanups.c file. *)
let generate_daemon_structs_cleanups_c () =
generate_header CStyle GPLv2plus;
diff --git a/generator/daemon.mli b/generator/daemon.mli
index 6d643bc29..a2ba123ef 100644
--- a/generator/daemon.mli
+++ b/generator/daemon.mli
@@ -27,5 +27,6 @@ val generate_daemon_names : unit -> unit
val generate_daemon_optgroups_c : unit -> unit...
2018 Apr 10
9
[PATCH v2 0/5] daemon: generate almall 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 all the OCaml interfaces of
daemon actions.
[1] https://www.redhat.com/archives/libguestfs/2018-April/msg00059.html
Thanks,
Pino Toscano (5):
daemon: directly use Optgroups
daemon: use the structs from the Structs module
daemon: move Lvm.lv_canonical to new Lvm_utils module
2017 Sep 18
6
[PATCH 0/5] Fix OCaml dependencies.
This works reliably for me ...
Rich.
2017 Jun 19
16
[PATCH v7 00/13] Refactor utilities
This is just the utilities part of the patch series from:
https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html
I believe this addresses everything raised in comments on that
patch series.
Rich.