search for: libnbd_namespace_

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

2019 Jun 27
3
[libnbd PATCH] generator: Add support for namespace constants
..."%s:%s\" context related constants */\n" ns ctxt; + List.iter (fun (n, i) -> pr "#define LIBNBD_%-30s %d\n" n i) 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 "\n"; + pr "/* \"%s\" namespace contexts */\n" ns; + List.iter ( + fun (ctxt, consts) -> print_ns_ctxt ns ns_upper ctxt consts + ) ctxts; + pr "\n" + let generate_include_libnbd_h () = generate_heade...
2019 Jun 27
0
Re: [libnbd PATCH] generator: Add support for namespace constants
...seless, since listing contexts of a namespace is not exposed, Rich still has the idea of adding a 'qemu-nbd --list' counterpart, so defining a constant for the "base:" and "qemu:" namespaces makes sense for that even if we can't use it now. Hmm - your patch defines LIBNBD_NAMESPACE_BASE to "base", but in practice we'd want to pass "base:" when querying which contexts are available in that namespace. > > - whether this should live in a separate (still included in libnbd.h) file, Single file is fine by me for now; we can always split late...