KLDFIND(2)

πŸ’– KLDFIND(2) πŸ’–

okay so bestie, this page is from the System Calls Manual, section 2, and it's all about kldfind. no cap. πŸ’…


✨ NAME ✨

kldfind β€” returns the fileid of a kld file 🫢

πŸ“š LIBRARY πŸ“š

this one lives in the Standard C Library (libc, -lc). periodt. ✨

πŸͺ„ SYNOPSIS πŸͺ„

here's the exact summoning code, copy it character for character, bestie:

#include <sys/param.h>
#include <sys/linker.h>

int
kldfind(const char *file);

🌸 DESCRIPTION 🌸

The kldfind() system call returns the fileid of the kld file referenced by file. that's it. it's giving very focused, very main character. πŸ’–

πŸ”₯ RETURN VALUES πŸ”₯

The kldfind() system call returns the fileid of the kld file referenced by file. Upon error, kldfind() returns -1 and sets errno to indicate the error. so if it's not slaying, it's -1 and errno tells you why. 😭

πŸ’€ ERRORS πŸ’€

errno is set to the following if kldfind() fails:

  • [EFAULT] β€” The data required for this operation could not be read from the kernel space. πŸ’€
  • [ENOENT] β€” The file specified is not loaded in the kernel. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, bestie, they're the friend group:

πŸ¦‹ HISTORY πŸ¦‹

The kld interface first appeared in FreeBSD 3.0. iconic behavior. ⭐


source/version: Debian; date: March 3, 1999; page: KLDFIND(2). bye bestie πŸ’…βœ¨

πŸ“¦ where this page comes from