search for: nbd_unlocked_set_list_exports

Displaying 6 results from an estimated 6 matches for "nbd_unlocked_set_list_exports".

2020 Jul 20
0
Re: [PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...omplicate things, with qemu-nbd -x we do return an error from connect* each time because we cannot set the export name correctly until we've fetched the export names. Hence the example ignores the return value from connect (unless ENOTSUP). This is a bit of a mess ... > >+int > >+nbd_unlocked_set_list_exports (struct nbd_handle *h, bool list) > >+{ > >+ h->list_exports = true; > > s/true/list/ (you never really tested clearing the mode...) Oops. > >+char * > >+nbd_unlocked_get_list_export_name (struct nbd_handle *h, > >+ int i)...
2020 Jul 20
2
Re: [PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...; > + } > + return 0; > + > +} /* END STATE MACHINE */ > diff --git a/generator/states-newstyle-opt-starttls.c b/generator/states-newstyle-opt-starttls.c > index d220c4f..2d74e5f 100644 > --- a/generator/states-newstyle-opt-starttls.c > +++ b/lib/handle.c > +int > +nbd_unlocked_set_list_exports (struct nbd_handle *h, bool list) > +{ > + h->list_exports = true; s/true/list/ (you never really tested clearing the mode...) > +char * > +nbd_unlocked_get_list_export_name (struct nbd_handle *h, > + int i) > +{ > + char *name; > +...
2020 Jul 20
2
[PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
Proposal for new APIs to list exports. The general shape of the API can probably best be seen from the examples/list-exports.c example. Rich.
2020 Jul 20
0
[PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...< h->nr_exports; ++i) + free (h->exports[i]); + free (h->exports); free_cmd_list (h->cmds_to_issue); free_cmd_list (h->cmds_in_flight); free_cmd_list (h->cmds_done); @@ -226,6 +230,52 @@ nbd_unlocked_get_export_name (struct nbd_handle *h) return copy; } +int +nbd_unlocked_set_list_exports (struct nbd_handle *h, bool list) +{ + h->list_exports = true; + return 0; +} + +/* NB: may_set_error = false. */ +int +nbd_unlocked_get_list_exports (struct nbd_handle *h) +{ + return h->list_exports; +} + +int +nbd_unlocked_get_nr_list_exports (struct nbd_handle *h) +{ + if (!h->list...
2020 Aug 18
3
[libnbd PATCH v3 0/2] Implementing NBD_OPT_LIST
This is a subset of my v2 posting, but limited to just the NBD_OPT_LIST handling. The biggest change since v2 is the addition of added unit testing in all four language bindings (C, python, ocaml, golang). The tests require nbdkit built from git on PATH, and may not be entirely idiomatic, but I at least validated that they catch issues (for example, adding an exit statement near the end of the
2020 Aug 14
18
[libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo
Well, I'm not quite done (I still want to get nbdinfo to work on a single nbd connection for all cases when reading the heads of the file is not required), but I'm happy with patches 1-11, and 12-13 show where I'm headed for getting NBD_OPT_INFO to work. Posting now to see if some of the earlier patches are ready to commit while I continue working on the latter half. Eric Blake (13):