nbd_supports_uri(3)

πŸ’… nbd_supports_uri β€” true if libnbd was compiled with support for NBD URIs

okay bestie, welcome to the libnbd corner of the manual pages (that's section 3 of the manual, iykyk) πŸŽ€ this one's literally so short and so sweet β€” it's just a vibe check on your libnbd build.


✨ SYNOPSIS ✨

#include <libnbd.h>

int nbd_supports_uri (
      struct nbd_handle *h
    );

that's it. that's the whole thing. one function, one handle, zero drama πŸ’…


🌸 DESCRIPTION 🌸

so here's the tea β˜• β€” this function returns true if libnbd was compiled with libxml2, because libxml2 is the thing that's required to support NBD URIs. no libxml2, no URIs, simple as that.

and if it wasn't compiled with libxml2? it returns false. not throwing shade, just reporting the facts 🫢

it's giving "compile-time vibe check" and honestly? iconic.


πŸ¦‹ RETURN VALUE πŸ¦‹

this call returns a boolean value. (which is a cute way of saying true-or-false, no cap ✨)


πŸ”₯ ERRORS πŸ”₯

good news bestie: this function does not fail. like, at all. it cannot fail. it's the most unbothered function in the whole library 😭

⚠️ okay but there IS one lil rule: the following parameters must not be NULL: "h". that's your struct nbd_handle *h from the synopsis, and it's gotta be a real, live handle. for more details on that whole situation, see "Non-NULL parameters" in libnbd(3).

⭐ VERSION ⭐

this function first appeared in libnbd 1.0 πŸŽ€ a true elder of the library, respect the icon πŸ‘‘

if you need to test whether this function is available at compile time, check if the following macro is defined:

#define LIBNBD_HAVE_NBD_SUPPORTS_URI 1

that macro is literally your "hey does this exist yet" detector, use it wisely 🧚


🌈 SEE ALSO 🌈

the whole bestie squad, all in (3):

like the "URI girls" of the libnbd universe fr fr β€” if this whole URI situation has you curious, go read those next πŸ’–


🫢 AUTHORS 🫢

  • Eric Blake
  • Richard W.M. Jones

legends. main character energy. we stan πŸ‘‘


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

🫢 and yes β€” read your license, bestie, it literally tells you to.

alright that's the whole page! this gorgeous lil doc shipped as part of libnbd-1.25.8 and was dated 2026-10-13 β€” so yeah, go check whether your build has URI support and slay πŸ’…πŸ’–πŸ¦‹

πŸ“¦ where this page comes from