search for: print_ns_ctxt

Displaying 2 results from an estimated 2 matches for "print_ns_ctxt".

2019 Jun 27
3
[libnbd PATCH] generator: Add support for namespace constants
...;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\" context related constants */\n" ns ctxt; + List.iter (fu...
2019 Jun 27
0
Re: [libnbd PATCH] generator: Add support for namespace constants
...; +for contexts known to libnbd, B<E<lt>libnbd.hE<gt>> contains constants +beginning with C<LIBNBD_STATE_> that may help decipher the values. It is possible for the extent function to be called more times than you expect (if the server is buggy), @@ -2926,7 +2934,7 @@ let print_ns_ctxt ns ns_upper ctxt consts = let print_ns ns ctxts = let ns_upper = String.uppercase_ascii ns in pr "/* \"%s\" namespace */\n" ns; - pr "#define LIBNBD_NAMESPACE_%s \"%s\"\n" ns_upper ns; + pr "#define LIBNBD_NAMESPACE_%s \"%s:\"\n"...