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