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 beNULL:"h". that's yourstruct nbd_handle *hfrom the synopsis, and it's gotta be a real, live handle. for more details on that whole situation, see"Non-NULL parameters"inlibnbd(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 π
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
- 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