1nbd_set_debug(3)                    LIBNBD                    nbd_set_debug(3)
2
3
4

NAME

6       nbd_set_debug - set or clear the debug flag
7

SYNOPSIS

9        #include <libnbd.h>
10
11        int nbd_set_debug (
12              struct nbd_handle *h, bool debug
13            );
14

DESCRIPTION

16       Set or clear the debug flag.  When debugging is enabled, debugging
17       messages from the library are printed to stderr, unless a debugging
18       callback has been defined too (see nbd_set_debug_callback(3)) in which
19       case they are sent to that function.  This flag defaults to false on
20       newly created handles, except if "LIBNBD_DEBUG=1" is set in the
21       environment in which case it defaults to true.
22

RETURN VALUE

24       If the call is successful the function returns 0.
25

ERRORS

27       On error -1 is returned.
28
29       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
30       of the error.
31
32       The following parameters must not be NULL: "h".  For more information
33       see "Non-NULL parameters" in libnbd(3).
34

VERSION

36       This function first appeared in libnbd 1.0.
37
38       If you need to test if this function is available at compile time check
39       if the following macro is defined:
40
41        #define LIBNBD_HAVE_NBD_SET_DEBUG 1
42

SEE ALSO

44       nbd_create(3), nbd_set_debug_callback(3), nbd_set_handle_name(3),
45       libnbd(3).
46

AUTHORS

48       Eric Blake
49
50       Richard W.M. Jones
51
53       Copyright Red Hat
54

LICENSE

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