1nbd_set_handle_name(3)              LIBNBD              nbd_set_handle_name(3)
2
3
4

NAME

6       nbd_set_handle_name - set the handle name
7

SYNOPSIS

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

DESCRIPTION

16       Handles have a name which is unique within the current process.  The
17       handle name is used in debug output.
18
19       Handle names are normally generated automatically and have the form
20       "nbd1", "nbd2", etc., but you can optionally use this call to give the
21       handles a name which is meaningful for your application to make
22       debugging output easier to understand.
23

RETURN VALUE

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

ERRORS

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

VERSION

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

SEE ALSO

45       nbd_create(3), nbd_get_handle_name(3), 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_handle_name(3)
Impressum