xref: /freebsd/libexec/flua/libfreebsd/sys/linker/freebsd.sys.linker.3lua (revision fa4b5aa51f1b3971e92f831b8e67e83aaed3c212)
1.\"
2.\" SPDX-License-Identifier: BSD-2-Clause
3.\"
4.\" Copyright (c) 2024, Baptiste Daroussin <bapt@FreeBSD.org>
5.\"
6.Dd September 6, 2024
7.Dt FREEBSD.SYS.LINKER 3lua
8.Os
9.Sh NAME
10.Nm freebsd.sys.linker
11.Nd Lua binding to
12.Fx 's
13Linker functions
14.Sh SYNOPSIS
15.Bd -literal
16local linker = require('freebsd.sys.linker')
17.Ed
18.Pp
19.Bl -tag -width XXXX -compact
20.It Dv fileid, err, errno = linker.kldload(name)
21.It Dv ok, err, errno = linker.kldunload(fileid|name)
22.El
23.Sh DESCRIPTION
24The
25.Nm
26module is a binding to the
27.Fx 's
28linker functions.
29List of functions:
30.Bl -tag -width XXXX
31.It Dv fileid, err = freebsd.sys.linker.kldload(name)
32Load the kernel module named
33.Fa name
34and return the identifier
35.Pq fileid
36as an interger.
37.It Dv ok, err, errno = freebsd.sys.linker.kldunload(fileid|name)
38Unload the kernel module identifier either by
39.Fa name
40as a string, or
41.Fa fileid
42as an integer.
43.El
44.Sh SEE ALSO
45.Xr kldload 2 ,
46.Xr kldunload 2
47