1nbd_get_version(3)                  LIBNBD                  nbd_get_version(3)
2
3
4

NAME

6       nbd_get_version - return the version of the library
7

SYNOPSIS

9        #include <libnbd.h>
10
11        const char * nbd_get_version (struct nbd_handle *h);
12

DESCRIPTION

14       Return the version of libnbd.  This is returned as a string in the form
15       "major.minor.release" where each of major, minor and release is a small
16       positive integer.  For example:
17
18            minor
19
20           "1.0.3"
21            ↑   ↑
22        major   release
23
24       major = 0
25           The major number was 0 for the early experimental versions of
26           libnbd where we still had an unstable API.
27
28       major = 1
29           The major number is 1 for the versions of libnbd with a long-term
30           stable API and ABI.  It is not anticipated that major will be any
31           number other than 1.
32
33       minor = 0, 2, ... (even)
34           The minor number is even for stable releases.
35
36       minor = 1, 3, ... (odd)
37           The minor number is odd for development versions.  Note that new
38           APIs added in a development version remain experimental and subject
39           to change in that branch until they appear in a stable release.
40
41       release
42           The release number is incremented for each release along a
43           particular branch.
44

RETURN VALUE

46       This call returns a statically allocated string, valid for the lifetime
47       of the process or until libnbd is unloaded by dlclose(3).  You must not
48       try to free the string.
49

ERRORS

51       This function does not fail.
52
53       The following parameters must not be NULL: "h".  For more information
54       see "Non-NULL parameters" in libnbd(3).
55

VERSION

57       This function first appeared in libnbd 1.0.
58
59       If you need to test if this function is available at compile time check
60       if the following macro is defined:
61
62        #define LIBNBD_HAVE_NBD_GET_VERSION 1
63

SEE ALSO

65       nbd_create(3), nbd_get_package_name(3), libnbd(3).
66

AUTHORS

68       Eric Blake
69
70       Richard W.M. Jones
71
73       Copyright (C) 2019-2021 Red Hat Inc.
74

LICENSE

76       This library is free software; you can redistribute it and/or modify it
77       under the terms of the GNU Lesser General Public License as published
78       by the Free Software Foundation; either version 2 of the License, or
79       (at your option) any later version.
80
81       This library is distributed in the hope that it will be useful, but
82       WITHOUT ANY WARRANTY; without even the implied warranty of
83       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
84       Lesser General Public License for more details.
85
86       You should have received a copy of the GNU Lesser General Public
87       License along with this library; if not, write to the Free Software
88       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
89       02110-1301 USA
90
91
92
93libnbd-1.14.2                     2023-01-03                nbd_get_version(3)
Impressum