nbd_get_package_name(3)
π nbd_get_package_name β like, what's the library's name, bestie?
okay so this one is from the LIBNBD manual, and it's genuinely the easiest page in the whole set β it's giving "breathe and point at the sign" energy π
β¨ NAME β¨
nbd_get_package_name β returns the name of the library, that's it, that's the whole job π«Ά
πΈ SYNOPSIS πΈ
#include <libnbd.h>
const char * nbd_get_package_name (
struct nbd_handle *h
);
π¦ DESCRIPTION π¦
So you call it and it hands you back the name of the library. It's literally always "libnbd" β unless somebody went and rebuilt the library with a different name at compile time, which, like, valid, do your thing π
β RETURN VALUE β
You get a statically allocated string back. Not a copy, not a fresh malloc, just a pointer to a string that lives with the library.
How long is it good for? For the lifetime of the process, or until libnbd gets unloaded by dlclose(3) β whichever comes first, bestie π
π¨ Do not try to free the string. Just... don't. It's not yours, it was never yours, hands off π
π ERRORS π
This function does not fail. Iconic behaviour honestly, no notes π
But β and this is the part people skip β the following parameters must not be NULL: "h". For more info go read "Non-NULL parameters" in libnbd(3) π§
π VERSION π
This function first appeared in libnbd 1.0.
Need to know at compile time if it's available? Check whether this macro is defined:
#define LIBNBD_HAVE_NBD_GET_PACKAGE_NAME 1
π SEE ALSO π
nbd_create(3), nbd_get_version(3), nbd_get_version_extra(3), libnbd(3).
π AUTHORS π
Eric Blake
Richard W.M. Jones
π COPYRIGHT π
Copyright Red Hat
πΈ LICENSE πΈ
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
okay that's the page!! mwah π this little cutie is from libnbd-1.25.8, dated 2026-10-13, and it says bye πβ¨
π¦ where this page comes from
- centos-stream 10: libnbd-devel 1.25.8-1.el10 Β· LGPL-2.0-or-later AND BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms