1nbd_get_version(3) LIBNBD nbd_get_version(3)
2
3
4
6 nbd_get_version - return the version of the library
7
9 #include <libnbd.h>
10
11 const char * nbd_get_version (
12 struct nbd_handle *h
13 );
14
16 Return the version of libnbd. This is returned as a string in the form
17 "major.minor.release" where each of major, minor and release is a small
18 positive integer. For example:
19
20 minor
21 ↓
22 "1.0.3"
23 ↑ ↑
24 major release
25
26 major = 0
27 The major number was 0 for the early experimental versions of
28 libnbd where we still had an unstable API.
29
30 major = 1
31 The major number is 1 for the versions of libnbd with a long-term
32 stable API and ABI. It is not anticipated that major will be any
33 number other than 1.
34
35 minor = 0, 2, ... (even)
36 The minor number is even for stable releases.
37
38 minor = 1, 3, ... (odd)
39 The minor number is odd for development versions. Note that new
40 APIs added in a development version remain experimental and subject
41 to change in that branch until they appear in a stable release.
42
43 release
44 The release number is incremented for each release along a
45 particular branch.
46
48 This call returns a statically allocated string, valid for the lifetime
49 of the process or until libnbd is unloaded by dlclose(3). You must not
50 try to free the string.
51
53 This function does not fail.
54
55 The following parameters must not be NULL: "h". For more information
56 see "Non-NULL parameters" in libnbd(3).
57
59 This function first appeared in libnbd 1.0.
60
61 If you need to test if this function is available at compile time check
62 if the following macro is defined:
63
64 #define LIBNBD_HAVE_NBD_GET_VERSION 1
65
67 nbd_create(3), nbd_get_package_name(3), libnbd(3).
68
70 Eric Blake
71
72 Richard W.M. Jones
73
75 Copyright Red Hat
76
78 This library is free software; you can redistribute it and/or modify it
79 under the terms of the GNU Lesser General Public License as published
80 by the Free Software Foundation; either version 2 of the License, or
81 (at your option) any later version.
82
83 This library is distributed in the hope that it will be useful, but
84 WITHOUT ANY WARRANTY; without even the implied warranty of
85 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
86 Lesser General Public License for more details.
87
88 You should have received a copy of the GNU Lesser General Public
89 License along with this library; if not, write to the Free Software
90 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
91 02110-1301 USA
92
93
94
95libnbd-1.16.5 2023-09-26 nbd_get_version(3)