.\" Copyright (c) 1992 The Regents of the University of California. .\" All rights reserved. .\" .\" This code is derived from software developed by the Computer Systems .\" Engineering group at Lawrence Berkeley Laboratory under DARPA contract .\" BG 91-66 and contributed to Berkeley. .\" .\" %sccs.include.redist.man% .\" .\" @(#)kvm_getfiles.3 5.3 (Berkeley) 05/26/92 .\" .Dd .Dt KVM_GETFILES 3 .Os .Sh NAME .Nm kvm_getfiles .Nd survey open files .Sh SYNOPSIS .Fd #include .Fd #include .Fd #define KERNEL .Fd #include .Fd #undef KERNEL .\" .Fa kvm_t *kd .br .Ft char * .Fn kvm_getfiles "kvm_t *kd" "int op" "int arg" "int *cnt" .Sh DESCRIPTION .Fn kvm_getfiles returns a (sub-)set of the open files in the kernel indicated by .Fa kd. The .Fa op and .Fa arg arguments constitute a predicate which limits the set of files returned. No predicates are currently defined. .Pp The number of processes found is returned in the reference parameter .Fa cnt . The files are returned as a contiguous array of file structures, preceeded by the address of the first file entry in the kernel. This memory is owned by kvm and is not guaranteed to be persistent across subsequent kvm library calls. Data should be copied out if it needs to be saved. .Sh RETURN VALUES .Fn kvm_getfiles will return NULL on failure. .Pp .Sh BUGS This routine does not belong in the kvm interface. .Sh SEE ALSO .Xr kvm 3 , .Xr kvm_open 3 , .Xr kvm_openfiles 3 , .Xr kvm_close 3 , .Xr kvm_read 3 , .Xr kvm_write 3 , .Xr kvm_nlist 3 , .Xr kvm_geterr 3