Changeset View
Changeset View
Standalone View
Standalone View
lib/libsys/kldfind.2
| Show All 17 Lines | |||||
| .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||||
| .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||||
| .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
| .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
| .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
| .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
| .\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
| .\" | .\" | ||||
| .Dd March 3, 1999 | .Dd February 8, 2026 | ||||
| .Dt KLDFIND 2 | .Dt KLDFIND 2 | ||||
| .Os | .Os | ||||
| .Sh NAME | .Sh NAME | ||||
| .Nm kldfind | .Nm kldfind | ||||
| .Nd returns the fileid of a kld file | .Nd returns the fileid of a kld file | ||||
| .Sh LIBRARY | .Sh LIBRARY | ||||
| .Lb libc | .Lb libc | ||||
| .Sh SYNOPSIS | .Sh SYNOPSIS | ||||
| .In sys/linker.h | .In sys/linker.h | ||||
| .Ft int | .Ft int | ||||
| .Fn kldfind "const char *file" | .Fn kldfind "const char *file" | ||||
| .Sh DESCRIPTION | .Sh DESCRIPTION | ||||
| The | The | ||||
| .Fn kldfind | .Fn kldfind | ||||
| system call | system call | ||||
| returns the fileid of the kld file referenced by | returns the fileid of the kld file referenced by | ||||
| .Fa file . | .Fa file . | ||||
| .Sh RETURN VALUES | .Sh RETURN VALUES | ||||
| The | The | ||||
| .Fn kldfind | .Fn kldfind | ||||
| system call | system call | ||||
| returns the fileid of the kld file referenced by | returns the fileid of the kld file referenced by | ||||
| .Fa file . | .Fa file , which can be specified as a full or relative path, or | ||||
| otherwise is searched within the module path as defined by the | |||||
| .Xr sysctl 8 | |||||
temcbun_gmail.com: I'm not sure: maybe it's better to reference sysctl(3) here instead. | |||||
| .Va kern.module_path . | |||||
| The .ko | |||||
| extension for | |||||
| .Fa file | |||||
| is not mandatory . | |||||
| Upon error, | Upon error, | ||||
| .Fn kldfind | .Fn kldfind | ||||
| returns -1 and sets | returns -1 and sets | ||||
| .Va errno | .Va errno | ||||
| to indicate the error. | to indicate the error. | ||||
| .Sh ERRORS | .Sh ERRORS | ||||
| .Va errno | .Va errno | ||||
| is set to the following if | is set to the following if | ||||
| Show All 26 Lines | |||||
I'm not sure: maybe it's better to reference sysctl(3) here instead.