1nbd_opt_info(3)                     LIBNBD                     nbd_opt_info(3)
2
3
4

NAME

6       nbd_opt_info - request the server for information about an export
7

SYNOPSIS

9        #include <libnbd.h>
10
11        int nbd_opt_info (struct nbd_handle *h);
12

DESCRIPTION

14       Request that the server supply information about the export name
15       previously specified by the most recent nbd_set_export_name(3) or
16       nbd_connect_uri(3).  This can only be used if nbd_set_opt_mode(3)
17       enabled option mode.
18
19       If successful, functions like nbd_is_read_only(3) and nbd_get_size(3)
20       will report details about that export.  In general, if nbd_opt_go(3) is
21       called next, that call will likely succeed with the details remaining
22       the same, although this is not guaranteed by all servers.
23
24       Not all servers understand this request, and even when it is
25       understood, the server might fail the request even when a corresponding
26       nbd_opt_go(3) would succeed.
27

RETURN VALUE

29       If the call is successful the function returns 0.
30

ERRORS

32       On error "-1" is returned.
33
34       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
35       of the error.
36

HANDLE STATE

38       The handle must be negotiating, otherwise this call will return an
39       error.
40

VERSION

42       This function first appeared in libnbd 1.4.
43
44       If you need to test if this function is available at compile time check
45       if the following macro is defined:
46
47        #define LIBNBD_HAVE_NBD_OPT_INFO 1
48

SEE ALSO

50       nbd_aio_opt_info(3), nbd_connect_uri(3), nbd_create(3),
51       nbd_get_size(3), nbd_is_read_only(3), nbd_opt_go(3),
52       nbd_set_export_name(3), nbd_set_opt_mode(3), libnbd(3).
53

AUTHORS

55       Eric Blake
56
57       Richard W.M. Jones
58
60       Copyright (C) 2019-2021 Red Hat Inc.
61

LICENSE

63       This library is free software; you can redistribute it and/or modify it
64       under the terms of the GNU Lesser General Public License as published
65       by the Free Software Foundation; either version 2 of the License, or
66       (at your option) any later version.
67
68       This library is distributed in the hope that it will be useful, but
69       WITHOUT ANY WARRANTY; without even the implied warranty of
70       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
71       Lesser General Public License for more details.
72
73       You should have received a copy of the GNU Lesser General Public
74       License along with this library; if not, write to the Free Software
75       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
76       02110-1301 USA
77
78
79
80libnbd-1.10.1                     2021-10-25                   nbd_opt_info(3)
Impressum