nbd_aio_get_fd(3)

✨ nbd_aio_get_fd(3) β€” the libnbd bestie page πŸ’…

okay so this is nbd_aio_get_fd(3), straight out of the LIBNBD manual universe, and it's literally the glow-up for getting at the file descriptor behind a connection πŸ¦‹

🌸 NAME 🌸

nbd_aio_get_fd β€” return file descriptor associated with this connection

✨ SYNOPSIS ✨

#include <libnbd.h>

int nbd_aio_get_fd (
      struct nbd_handle *h
    );

πŸ’– DESCRIPTION πŸ’–

bestie. this function returns the underlying file descriptor associated with this connection. that's the whole vibe. 🫢

you can use it to check if the file descriptor is ready for reading or writing, and then call nbd_aio_notify_read(3) or nbd_aio_notify_write(3). see also nbd_aio_get_direction(3).

⚠️ okay but fr fr: do not do anything else with the file descriptor. no extra little experiments, no side quests. that's the rule. πŸ’€

πŸŽ€ RETURN VALUE πŸŽ€

this call returns a file descriptor. iconic. ✨

😭 ERRORS 😭

on error -1 is returned.

refer to "ERROR HANDLING" in libnbd(3) for how to get further details of the error.

the following parameters must not be NULL: "h". for more info see "Non-NULL parameters" in libnbd(3).

🌈 VERSION 🌈

this function first appeared in libnbd 1.0.

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

#define LIBNBD_HAVE_NBD_AIO_GET_FD 1

πŸ”₯ SEE ALSO πŸ”₯

πŸ‘‘ 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


and that's the page, bestie πŸ“ this was libnbd-1.25.8, dated 2026-10-13, and yes it's giving "licensed, documented, and absolutely slaying" πŸ’…βœ¨

πŸ“¦ where this page comes from