MODNEXT(2)
π MODNEXT(2) π
okay so this is the System Calls Manual entry for modnext, and we are about to make kernel module IDs make sense, bestie. No gatekeeping, just vibes and facts. π¦
πΈ NAME πΈ
modnext β return the modid of the next kernel module. periodt. π
π§ LIBRARY π§
Standard C Library (libc, -lc) β iconic, loaded, and ready. β¨
π SYNOPSIS π
#include <sys/param.h>
#include <sys/module.h>
int
modnext(int modid);
int
modfnext(int modid);
π¦ DESCRIPTION π¦
The modnext() system call returns the modid of the next kernel module β literally the one after modid β or 0 if modid is the last module in the list. slay.
If the modid value is 0, then modnext() will return the modid of the first module. cute, right?
The modfnext() system call must always be given a valid modid.
π¨ no cap, bestie:modfnext()does not play around β it must always be given a validmodid. No fake IDs, no guessing. π
π RETURN VALUES π
The modnext() system call returns the modid of the next module (see βDESCRIPTIONβ) or 0. If an error occurs, errno is set to indicate the error. that's the whole return-value vibe. π
π ERRORS π
The only error set by modnext() is ENOENT, which is set when modid refers to a kernel module that does not exist (is not loaded). so if it's not loaded, it's not showing up β simple as that. π«Ά
π SEE ALSO π
kldfind(2)kldfirstmod(2)kldload(2)kldnext(2)kldstat(2)kldsym(2)kldunload(2)modfind(2)modstat(2)kld(4)kldstat(8)
π°οΈ HISTORY π°οΈ
The kld interface first appeared in FreeBSD 3.0. a classic. β
made with π from Debian, dated September 28, 2000 β that's MODNEXT(2) signing off, mwah π
π¦ 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