From d3fcb2cf25368a3470c2a4382df6efc23276c207 Mon Sep 17 00:00:00 2001 From: yar Date: Wed, 22 Feb 2006 15:11:12 +0000 Subject: Tell the truth about a) how to get the first fileid, and b) what return values from kldstat(2) can be expected. Bump .Dd. MFC after: 3 days --- lib/libc/sys/kldnext.2 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/libc/sys/kldnext.2 b/lib/libc/sys/kldnext.2 index 607761a..ff929c3 100644 --- a/lib/libc/sys/kldnext.2 +++ b/lib/libc/sys/kldnext.2 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 3, 1999 +.Dd February 22, 2006 .Dt KLDNEXT 2 .Os .Sh NAME @@ -47,15 +47,20 @@ returns the fileid of the next kld file (that is, the one after or 0 if .Va fileid is the last file loaded. +To get the fileid of the first kld file, pass +.Va fileid +of 0 to +.Fn kldnext . .Sh RETURN VALUES The .Fn kldnext system call -returns the fileid of the next kld file (see DESCRIPTION) or 0. -If an error -occurs, +returns the fileid of the next kld file or 0 if successful. +Otherwise +.Fn kldnext +returns the value \-1 and sets the global variable .Va errno -is set to indicate the error. +to indicate the error. .Sh ERRORS The only error set by .Fn kldnext -- cgit v1.1