KLDFIRSTMOD(2)
π
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 byfileidwas 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
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1999 Chris Costello
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms