MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sys_modfind

Function sys_modfind

freebsd/kern/kern_module.c:422–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420}
421
422int
423sys_modfind(struct thread *td, struct modfind_args *uap)
424{
425 int error = 0;
426 char name[MAXMODNAME];
427 module_t mod;
428
429 if ((error = copyinstr(uap->name, name, sizeof name, 0)) != 0)
430 return (error);
431
432 MOD_SLOCK;
433 mod = module_lookupbyname(name);
434 if (mod == NULL)
435 error = ENOENT;
436 else
437 td->td_retval[0] = module_getid(mod);
438 MOD_SUNLOCK;
439 return (error);
440}
441
442MODULE_VERSION(kernel, __FreeBSD_version);
443

Callers

nothing calls this directly

Calls 3

module_lookupbynameFunction · 0.85
module_getidFunction · 0.85
copyinstrFunction · 0.50

Tested by

no test coverage detected