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 (struct nbd_handle *h);
12
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
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
51 This function does not fail.
52
54 This function first appeared in libnbd 1.0.
55
56 If you need to test if this function is available at compile time check
57 if the following macro is defined:
58
59 #define LIBNBD_HAVE_NBD_GET_VERSION 1
60
62 nbd_create(3), nbd_get_package_name(3), libnbd(3).
63
65 Eric Blake
66
67 Richard W.M. Jones
68
70 Copyright (C) 2019-2021 Red Hat Inc.
71
73 This library is free software; you can redistribute it and/or modify it
74 under the terms of the GNU Lesser General Public License as published
75 by the Free Software Foundation; either version 2 of the License, or
76 (at your option) any later version.
77
78 This library is distributed in the hope that it will be useful, but
79 WITHOUT ANY WARRANTY; without even the implied warranty of
80 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
81 Lesser General Public License for more details.
82
83 You should have received a copy of the GNU Lesser General Public
84 License along with this library; if not, write to the Free Software
85 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
86 02110-1301 USA
87
88
89
90libnbd-1.12.5 2022-07-10 nbd_get_version(3)