Displaying 11 results from an estimated 11 matches for "get_list_export_nam".
Did you mean:
get_list_export_name
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 18
0
[libnbd PATCH v3 2/2] api: Add nbd_aio_opt_list
...nly be used if L<nbd_set_opt_mode(3)> enabled option mode.
-In this mode, during connection we query the server for the list
-of NBD exports and collect them in the handle. You can query
-the list of exports provided by the server by calling
-L<nbd_get_nr_list_exports(3)> and L<nbd_get_list_export_name(3)>.
-After choosing the export you want, set the export name
-(L<nbd_set_export_name(3)>), then finish connecting with L<nbd_opt_go(3)>.
+The <list> function is called once per advertised export, with any
+C<user_data> passed to this function, and with C<name> and...
2020 Jul 29
3
[libnbd PATCH 0/2] Expose export description
An incremental improvement on top of listing exports. I still think
it's worth experimenting with revisiting how our API for list mode
should actually work [1] (so that we can reuse a single connection for
both grabbing the list and finally using NBD_OPT_GO), but this change
was easier to whip together while still thinking about that.
[1]
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.
..._nr_list_exports (nbd) == 0) {
+ fprintf (stderr, "Server does not support "
+ "listing exports.\n");
+ exit (EXIT_FAILURE);
+ }
+
+ /* Display the list of exports. */
+ for (i = 0;
+ i < nbd_get_nr_list_exports (nbd);
+ i++) {
+ name = nbd_get_list_export_name (nbd, i);
+ printf ("[%d] %s\n", i, name);
+ free (name);
+ }
+ printf ("Which export to connect to? ");
+ if (scanf ("%d", &i) != 1) exit (EXIT_FAILURE);
+ name = nbd_get_list_export_name (nbd, i);
+ printf ("Connecting to %s ...\n", name);
+...
2020 Aug 14
0
[libnbd PATCH v2 11/13] api: Add nbd_aio_opt_list
...nly be used if L<nbd_set_opt_mode(3)> enabled option mode.
-In this mode, during connection we query the server for the list
-of NBD exports and collect them in the handle. You can query
-the list of exports provided by the server by calling
-L<nbd_get_nr_list_exports(3)> and L<nbd_get_list_export_name(3)>.
-After choosing the export you want, set the export name
-(L<nbd_set_export_name(3)>), then finish connecting with L<nbd_opt_go(3)>.
+The <list> function is called once per advertised export, with any
+C<user_data> passed to this function, and with C<name> and...
2020 Aug 11
3
[libnbd PATCH] API: Add nbd_set_opt_mode to expose NEGOTIATING state
...ing negotiation.";
+ example = Some "examples/list-exports.c";
+ see_also = [Link "get_opt_mode"; Link "opt_go"; Link "opt_abort";
+ Link "get_list_exports";
+ Link "get_nr_list_exports"; Link "get_list_export_name"];
+ };
+
+ "get_opt_mode", {
+ default_call with
+ args = []; ret = RBool;
+ may_set_error = false;
+ shortdesc = "return whether option mode was enabled";
+ longdesc = "\
+Return true if option negotiation mode was enabled on this handle.";
+...
2020 Jul 20
2
Re: [PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...stderr, "Server does not support "
> + "listing exports.\n");
> + exit (EXIT_FAILURE);
> + }
> +
> + /* Display the list of exports. */
> + for (i = 0;
> + i < nbd_get_nr_list_exports (nbd);
> + i++) {
> + name = nbd_get_list_export_name (nbd, i);
> + printf ("[%d] %s\n", i, name);
> + free (name);
> + }
Looks like a pretty simple way to do the iteration.
> + printf ("Which export to connect to? ");
> + if (scanf ("%d", &i) != 1) exit (EXIT_FAILURE);
scanf("%d"...
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):
2020 Aug 03
5
[libnbd PATCH 0/4] More nbdinfo fixes
This rounds up the remaining bugs that I originally identified in:
https://www.redhat.com/archives/libguestfs/2020-July/msg00153.html
Eric Blake (4):
api: Permit export list APIs when Connected
info: Support --list with serializing servers
info: Fix --json output when list size != 1
info: Permit --size --json
generator/API.ml | 6 +++---
info/info-list-json.sh | 9 +++++++++
2020 Jul 24
4
[libnbd PATCH 0/3] Expose server block size constraints
Necessary when writing a client that wants to avoid unnecessary EINVAL
errors from sending unaligned requests.
At some point, we may want to add synchronous convenience API wrappers
that do request splitting or read-modify-write to obey server
constraints while still appearing to the library client as accepting
any possible request. But such a wrapper should only be synchronous
and not copied to