Commit | Line | Data |
---|---|---|
5e2a83c1 KS |
1 | .\" Copyright (c) 1992 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" %sccs.include.redist.man% | |
5 | .\" | |
6 | .\" @(#)kvm_getfiles.3 5.1 (Berkeley) %G% | |
7 | .\" | |
8 | .Dd | |
9 | .Dt KVM_GETFILES 3 | |
10 | .Os | |
11 | .Sh NAME | |
12 | .Nm kvm_getfiles | |
13 | .Nd survey open files | |
14 | .Sh SYNOPSIS | |
15 | .Fd #include <kvm.h> | |
16 | .Fd #include <sys/kinfo.h> | |
17 | .Fd #define KERNEL | |
18 | .Fd #include <sys/file.h> | |
19 | .Fd #undef KERNEL | |
20 | .\" .Fa kvm_t *kd | |
21 | .br | |
22 | .Ft char * | |
23 | .Fn kvm_getfiles "kvm_t *kd" "int op" "int arg" "int *cnt" | |
24 | .Sh DESCRIPTION | |
25 | .Fn kvm_getfiles | |
26 | returns a (sub-)set of the open files in the kernel indicated by | |
27 | .Fa kd. | |
28 | The | |
29 | .Fa op | |
30 | and | |
31 | .Fa arg | |
32 | arguments constitute a predicate which limits the set of processes | |
33 | returned. No predicates are currently defined. | |
34 | .Pp | |
35 | The number of processes found is returned in the reference parameter | |
36 | .Fa cnt . | |
37 | The files are returned as a contiguous array of file structures, | |
38 | preceeded by the address of the first file entry in the kernel. | |
39 | This memory is owned by kvm and is not guaranteed to be persistent across | |
40 | subsequent kvm library calls. Data should be copied out if it needs to be | |
41 | saved. | |
42 | .Sh RETURN VALUES | |
43 | .Fn kvm_getfiles | |
44 | will return NULL on failure. | |
45 | .Pp | |
46 | .Sh BUGS | |
47 | This routine does not belong in the kvm interface. | |
48 | .Sh SEE ALSO | |
49 | .Xr kvm 3 , | |
50 | .Xr kvm_open 3 , | |
51 | .Xr kvm_openfiles 3 , | |
52 | .Xr kvm_close 3 , | |
53 | .Xr kvm_read 3 , | |
54 | .Xr kvm_write 3 , | |
55 | .Xr kvm_nlist 3 , | |
56 | .Xr kvm_geterr 3 |