nbd_set_debug3
Set or clear the debug flag
Usage
#include <libnbd.h>int nbd_set_debug (struct nbd_handle *h, bool debug);
Overview
Set or clear the debug flag. When debugging is enabled, debugging messages from the library are printed to stderr, unless a debugging callback has been defined too (see nbd_set_debug_callback(3)) in which case they are sent to that function. This flag defaults to false on newly created handles, except if "LIBNBD_DEBUG=1" is set in the environment in which case it defaults to true.
Return value
If the call is successful the function returns 0.
Errors
On error -1 is returned.
Refer to "ERROR HANDLING" in libnbd(3) for how to get further details of the error.
The following parameters must not be NULL: "h". For more information see "Non-NULL parameters" in libnbd(3).
Version
This function first appeared in libnbd 1.0.
If you need to test if this function is available at compile time check if the following macro is defined:
#define LIBNBD_HAVE_NBD_SET_DEBUG 1
Releases
4 releases since Debian 11 (Bullseye); the text changed 3 times.