KVM_FILES(3) BSD Programmer's Manual KVM_FILES(3)NAME
kvm_files - survey open files
SYNOPSIS
#include <sys/param.h>
#include <sys/sysctl.h>
#define KERNEL
#include <sys/file.h>
#undef KERNEL
#include <kvm.h>
struct file *
kvm_files(kvm_t *kd, int *cnt);
DESCRIPTION
The kvm_files() function obtains the table of open files from the kernel
indicated by kd.
The number of files found is returned in the reference parameter cnt. The
files are returned as a contiguous array of file structures whose f_filef
field has been modified to contain the address of the file itself. Memo-
ry for these structures is obtained via malloc(3) and should be released
via free(3) if desired.
RETURN VALUESkvm_files() will return NULL on failure.
SEE ALSOkvm(3), kvm_open(3), kvm_openfiles(3), kvm_close(3), kvm_read(3),
kvm_write(3), kvm_nlist(3), kvm_geterr(3)BSDI BSD/OS April 19, 1994 1