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 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