1nbd_can_meta_context(3)             LIBNBD             nbd_can_meta_context(3)
2
3
4

NAME

6       nbd_can_meta_context - does the server support a specific meta context?
7

SYNOPSIS

9        #include <libnbd.h>
10
11        int nbd_can_meta_context (struct nbd_handle *h,
12                                  const char *metacontext);
13

DESCRIPTION

15       Returns true if the server supports the given meta context (see
16       nbd_add_meta_context(3)).  Returns false if the server does not.
17
18       The single parameter is the name of the metadata context, for example
19       "LIBNBD_CONTEXT_BASE_ALLOCATION".  <libnbd.h> includes defined
20       constants for well-known namespace contexts beginning with
21       "LIBNBD_CONTEXT_", but you are free to pass in other contexts.
22
23       This call does not block, because it returns data that is saved in the
24       handle from the NBD protocol handshake.
25

RETURN VALUE

27       This call returns a boolean value.
28

ERRORS

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

HANDLE STATE

36       The handle must be connected and finished handshaking with the server,
37       or shut down, otherwise this call will return an error.
38

VERSION

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

SEE ALSO

48       "Flag calls" in libnbd(3), nbd_add_meta_context(3),
49       nbd_block_status(3), nbd_aio_block_status(3), nbd_create(3), libnbd(3).
50

AUTHORS

52       Eric Blake
53
54       Richard W.M. Jones
55
57       Copyright (C) 2019 Red Hat Inc.
58

LICENSE

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