KLDFIRSTMOD(2)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… kldfirstmod(2) β€” System Calls Manual bestie, we're here πŸ’…

hi bestie!! this is the page for kldfirstmod(2), straight out of the System Calls Manual. it's giving tiny syscall, big main-character energy, and we're gonna read it together. 🫢


🌸 NAME 🌸

kldfirstmod β€” return first module id from the kld file specified

πŸŽ€ LIBRARY πŸŽ€

Standard C Library β€” libc, -lc

✨ SYNOPSIS ✨

#include <sys/linker.h>

int
kldfirstmod(int fileid);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the kldfirstmod() system call returns the module id pertaining to the first module referenced by fileid. literally that's it: you hand it fileid, and it hands you back the module id of the first module that fileid references. slay. ✨

⭐ RETURN VALUES ⭐

kldfirstmod() will return the id of the first module referenced by fileid, or 0 if there are no references. no references? zero. periodt. πŸ’…

πŸ’€ ERRORS πŸ’€

  • [ENOENT] β€” the kld file referenced by fileid was not found. 😭
bestie, that's the error case this page gives us: if that kld file is not found, [ENOENT] is the vibe. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

kldfind(2), kldload(2), kldnext(2), kldstat(2), kldsym(2), kldunload(2), modfind(2), modfnext(2), modnext(2), modstat(2), kld(4), kldstat(8)

go read those if you wanna complete the kld cinematic universe. πŸ“

🌈 HISTORY 🌈

The kld interface first appeared in FreeBSD 3.0. iconic behavior, honestly. πŸ‘‘


xoxo, your syscall bestie πŸ’– β€” this page's source/version and date are Debian and March 3, 1999. periodt. πŸŽ€

πŸ“¦ where this page comes from