nbd_get_strict_mode(3)
β¨ nbd_get_strict_mode(3) β¨
okay so this is a page from the libnbd manual and honestly it's a little sleeper hit β it's the one that tells you which protocol strictness vibes are currently being enforced. let's get into it π
π NAME π
nbd_get_strict_mode β see which strictness flags are in effect. that's it, that's the whole thing, and it's lowkey important π«Ά
πΈ SYNOPSIS πΈ
#include <libnbd.h>
uint32_t nbd_get_strict_mode (
struct nbd_handle *h
);
bestie, it's a getter. one handle in, one uint32_t out. no drama π
π¦ DESCRIPTION π¦
so what this does is return flags indicating which protocol strictness items are being enforced locally by libnbd rather than by the server. like, these are the rules your own library is out here policing by itself, no server input needed, main character energy fr fr π
one thing to keep in mind (and this is a real one, not a drill): the return value from a newer library version may include bits that were undefined at the time of compilation. so if you built against an older header and then run against a newer lib, you might see bits you've literally never heard of. that's expected, not a bug β don't panic π
β RETURN VALUE β
This call returns a bitmask of LIBNBD_STRICT_* values. bitmask, so you're gonna be doing bitwise checks β you know the drill β¨
π₯ ERRORS π₯
This function does not fail. no cap, it literally cannot fail. it's giving unbothered, it's giving flawless π
The following parameters must not be NULL: "h". For more information see "Non-NULL parameters" in libnbd(3). so like, don't hand it a null handle, that's the one thing π«
π§ VERSION π§
This function first appeared in libnbd 1.6.
If you need to test if this function is available at compile time check if the following macro is defined:
#define LIBNBD_HAVE_NBD_GET_STRICT_MODE 1
iykyk β that macro is your little vibe check for compile time π«
π· SEE ALSO π·
(the setter is right there, go read it, they're besties) π«Ά
π AUTHORS π
- Eric Blake
- Richard W.M. Jones
legends, honestly. 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
real talk: that's the legal section, so keep it exactly as-is if you're actually shipping anything. the vibes are mine, the warranty disclaimer is theirs π
and that's the page!! this one's from libnbd-1.25.8, dated 2026-10-13, so that's the era of the manual you're reading β slay, go forth and check your strictness flags ππ
π¦ 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