diff options
author | ru <ru@FreeBSD.org> | 2004-07-02 23:52:20 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2004-07-02 23:52:20 +0000 |
commit | 01548ace1533487f9c0488f55112c9d8641f8184 (patch) | |
tree | 23294a96f715e1e5bc35c1029ec151c90ee95b96 /lib/libkvm | |
parent | 47f5e31e2bb626743fa9e912918201fe505b1419 (diff) | |
download | FreeBSD-src-01548ace1533487f9c0488f55112c9d8641f8184.zip FreeBSD-src-01548ace1533487f9c0488f55112c9d8641f8184.tar.gz |
Mechanically kill hard sentence breaks.
Diffstat (limited to 'lib/libkvm')
-rw-r--r-- | lib/libkvm/kvm.3 | 9 | ||||
-rw-r--r-- | lib/libkvm/kvm_getfiles.3 | 6 | ||||
-rw-r--r-- | lib/libkvm/kvm_getprocs.3 | 15 | ||||
-rw-r--r-- | lib/libkvm/kvm_getswapinfo.3 | 15 | ||||
-rw-r--r-- | lib/libkvm/kvm_nlist.3 | 6 | ||||
-rw-r--r-- | lib/libkvm/kvm_open.3 | 15 | ||||
-rw-r--r-- | lib/libkvm/kvm_read.3 | 3 |
7 files changed, 46 insertions, 23 deletions
diff --git a/lib/libkvm/kvm.3 b/lib/libkvm/kvm.3 index e06fd2a..1d3c5eb 100644 --- a/lib/libkvm/kvm.3 +++ b/lib/libkvm/kvm.3 @@ -64,7 +64,8 @@ The .Fn kvm_open function is first called to obtain a descriptor for all subsequent calls. .Sh COMPATIBILITY -The kvm interface was first introduced in SunOS. A considerable +The kvm interface was first introduced in SunOS. +A considerable number of programs have been developed that use this interface, making backward compatibility highly desirable. In most respects, the Sun kvm interface is consistent and clean. @@ -77,11 +78,13 @@ and .Fn kvm_nlist ) has been incorporated into the .Bx -interface. Indeed, many kvm +interface. +Indeed, many kvm applications (i.e., debuggers and statistical monitors) use only this subset of the interface. .Pp -The process interface was not kept. This is not a portability +The process interface was not kept. +This is not a portability issue since any code that manipulates processes is inherently machine dependent. .Pp diff --git a/lib/libkvm/kvm_getfiles.3 b/lib/libkvm/kvm_getfiles.3 index c89a35c..d803c97 100644 --- a/lib/libkvm/kvm_getfiles.3 +++ b/lib/libkvm/kvm_getfiles.3 @@ -63,14 +63,16 @@ The and .Fa arg arguments constitute a predicate which limits the set of files -returned. No predicates are currently defined. +returned. +No predicates are currently defined. .Pp The number of files found is returned in the reference parameter .Fa cnt . The files are returned as a contiguous array of file structures, preceded 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 +subsequent kvm library calls. +Data should be copied out if it needs to be saved. .Sh RETURN VALUES The diff --git a/lib/libkvm/kvm_getprocs.3 b/lib/libkvm/kvm_getprocs.3 index b2703a1..bacaed6 100644 --- a/lib/libkvm/kvm_getprocs.3 +++ b/lib/libkvm/kvm_getprocs.3 @@ -68,7 +68,8 @@ The and .Fa arg arguments constitute a predicate which limits the set of processes -returned. The value of +returned. +The value of .Fa op describes the filtering predicate as follows: .Pp @@ -116,7 +117,8 @@ command line arguments passed to process indicated by .Fa p . Most likely, these arguments correspond to the values passed to .Xr exec 3 -on process creation. This information is, however, +on process creation. +This information is, however, deliberately under control of the process itself. Note that the original command name can be found, unaltered, in the p_comm field of the process structure returned by @@ -125,7 +127,8 @@ in the p_comm field of the process structure returned by The .Fa nchr argument indicates the maximum number of characters, including null bytes, -to use in building the strings. If this amount is exceeded, the string +to use in building the strings. +If this amount is exceeded, the string causing the overflow is truncated and the partial result is returned. This is handy for programs like .Xr ps 1 @@ -139,7 +142,8 @@ is zero, no limit is imposed and all argument strings are returned in their entirety. .Pp The memory allocated to the argv pointers and string storage -is owned by the kvm library. Subsequent +is owned by the kvm library. +Subsequent .Fn kvm_getprocs and .Xr kvm_close 3 @@ -149,7 +153,8 @@ The .Fn kvm_getenvv function is similar to .Fn kvm_getargv -but returns the vector of environment strings. This data is +but returns the vector of environment strings. +This data is also alterable by the process. .Sh RETURN VALUES The diff --git a/lib/libkvm/kvm_getswapinfo.3 b/lib/libkvm/kvm_getswapinfo.3 index d28fc05..1927a9e 100644 --- a/lib/libkvm/kvm_getswapinfo.3 +++ b/lib/libkvm/kvm_getswapinfo.3 @@ -29,10 +29,12 @@ information for each swap device, for up to \- 1 devices. The number of devices, up to .Fa maxswap -\- 1, is returned. A grand +\- 1, is returned. +A grand total of all swap devices (including any devices that go beyond .Fa maxswap -\- 1) is returned in one additional array entry. This +\- 1) is returned in one additional array entry. +This entry is not counted in the return value. Thus, if you specify a .Fa maxswap @@ -40,7 +42,8 @@ value of 1, the function will typically return the value 0 and the single .Vt kvm_swap structure will be filled with -the grand total over all swap devices. The grand total is calculated +the grand total over all swap devices. +The grand total is calculated from all available swap devices whether or not you made room for them all in the array. The grand total is returned. @@ -51,7 +54,8 @@ If an error occurs, -1 is returned. .Pp Each swap partition and the grand total is summarized in the .Vt kvm_swap -structure. This structure contains the following fields: +structure. +This structure contains the following fields: .Pp .Bl -item -offset indent -compact .It @@ -84,6 +88,7 @@ If the load average was unobtainable, \-1 is returned; otherwise, the number of swap devices actually retrieved is returned. .Pp If the name of the swap device does not fit in the static char buffer -in the structure, it is truncated. The buffer is always zero terminated. +in the structure, it is truncated. +The buffer is always zero terminated. .Sh SEE ALSO .Xr kvm 3 diff --git a/lib/libkvm/kvm_nlist.3 b/lib/libkvm/kvm_nlist.3 index c49bd3a..c1dd8b7 100644 --- a/lib/libkvm/kvm_nlist.3 +++ b/lib/libkvm/kvm_nlist.3 @@ -60,12 +60,14 @@ an entry whose n_name field is (see .Xr nlist 3 ) . Each symbol is looked up using the n_name field, and if found, the -corresponding n_type and n_value fields are filled in. These fields are set +corresponding n_type and n_value fields are filled in. +These fields are set to 0 if the symbol is not found. .Pp The .Xr kldsym 2 -system call is used to locate the symbol. This is a less than perfect +system call is used to locate the symbol. +This is a less than perfect emulation of the nlist values but has the advantage of being aware of kernel modules and is reasonably fast. .Sh RETURN VALUES diff --git a/lib/libkvm/kvm_open.3 b/lib/libkvm/kvm_open.3 index 2e2794f..a289a7e 100644 --- a/lib/libkvm/kvm_open.3 +++ b/lib/libkvm/kvm_open.3 @@ -63,7 +63,8 @@ and return a descriptor used to access kernel virtual memory via the .Xr kvm 3 -library routines. Both active kernels and crash dumps are accessible +library routines. +Both active kernels and crash dumps are accessible through this interface. .Pp The @@ -121,9 +122,11 @@ other provides an improved error reporting framework. .Pp The .Fn kvm_open -function is the Sun kvm compatible open call. Here, the +function is the Sun kvm compatible open call. +Here, the .Fa errstr -argument indicates how errors should be handled. If it is +argument indicates how errors should be handled. +If it is .Dv NULL , no errors are reported and the application cannot know the specific nature of the failed kvm call. @@ -164,7 +167,8 @@ Thus, .Fn kvm_openfiles will place any error message in the .Fa errbuf -argument. This buffer should be _POSIX2_LINE_MAX characters large (from +argument. +This buffer should be _POSIX2_LINE_MAX characters large (from <limits.h>). .Sh RETURN VALUES The @@ -185,7 +189,8 @@ The .Fn kvm_close function returns 0 on success and -1 on failure. .Sh BUGS -There should not be two open calls. The ill-defined error semantics +There should not be two open calls. +The ill-defined error semantics of the Sun library and the desire to have a backward-compatible library for .Bx diff --git a/lib/libkvm/kvm_read.3 b/lib/libkvm/kvm_read.3 index 2e5a3fb..a2a2485 100644 --- a/lib/libkvm/kvm_read.3 +++ b/lib/libkvm/kvm_read.3 @@ -57,7 +57,8 @@ The and .Fn kvm_write functions are used to read and write kernel virtual memory (or a crash -dump file). See +dump file). +See .Fn kvm_open 3 or .Fn kvm_openfiles 3 |