search for: libnbd_have_nbd_

Displaying 4 results from an estimated 4 matches for "libnbd_have_nbd_".

2019 Jun 03
1
[libnbd PATCH] generator: Add #define witnesses for all API
...enerator/generator +++ b/generator/generator @@ -2712,6 +2712,12 @@ let print_extern name args ret = print_call name args ret; pr ";\n" +let print_extern_and_define name args ret = + let name_upper = String.uppercase_ascii name in + print_extern name args ret; + pr "#define LIBNBD_HAVE_NBD_%s 1\n" name_upper; + pr "\n" + let generate_include_libnbd_h () = generate_header CStyle; @@ -2729,14 +2735,23 @@ let generate_include_libnbd_h () = List.iter (fun (n, i) -> pr "#define LIBNBD_%-30s %d\n" n i) constants; pr "\n"; pr "extern...
2019 Jun 27
3
[libnbd PATCH] generator: Add support for namespace constants
...;allocation", [ + "STATE_HOLE", 1 lsl 0; + "STATE_ZERO", 1 lsl 1; + ] ]; +] + (*----------------------------------------------------------------------*) (* Helper functions. *) @@ -2908,6 +2915,25 @@ let print_extern_and_define name args ret = pr "#define LIBNBD_HAVE_NBD_%s 1\n" name_upper; pr "\n" +let print_ns_ctxt ns ns_upper ctxt consts = + let ctxt_upper = String.uppercase_ascii ctxt in + pr "#define LIBNBD_CONTEXT_%s_%s \"%s:%s\"\n" + ns_upper ctxt_upper ns ctxt; + pr "\n"; + pr "/* \"%s:%s\&qu...
2019 Aug 09
0
[PATCH libnbd 2/2] generator: Change handling of Flags to be a true optional argument.
...losure_typedefs () = ) unique_cls; pr "\n" -let print_extern_and_define name args ret = +let print_extern_and_define name args optargs ret = let name_upper = String.uppercase_ascii name in - print_extern name args ret; + print_extern name args optargs ret; pr "#define LIBNBD_HAVE_NBD_%s 1\n" name_upper; pr "\n" @@ -3511,7 +3525,8 @@ let generate_include_libnbd_h () = pr "\n"; print_closure_typedefs (); List.iter ( - fun (name, { args; ret }) -> print_extern_and_define name args ret + fun (name, { args; optargs; ret }) -> +...
2019 Aug 09
4
[PATCH libnbd 0/2] generator: Preparatory changes to the generator.
These are some simplifications to the generator. They don't probably make much sense on their own, but they are preparatory to better handling of enums, and or'd lists of flags. Rich.