From 23f014af5bc0ee4dd3a5cfcc7cf21f8cf7911776 Mon Sep 17 00:00:00 2001 From: Wade A Smith Date: Fri, 11 Sep 1998 19:21:41 +0000 Subject: Added documentation for the log_facilityisvalid routine and add thew status code EINVAL to the log_seek routine. --- doc/new_chapters/eventlog.t | 70 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 3 deletions(-) (limited to 'doc/new_chapters/eventlog.t') diff --git a/doc/new_chapters/eventlog.t b/doc/new_chapters/eventlog.t index 0dfefa146e..717962d824 100644 --- a/doc/new_chapters/eventlog.t +++ b/doc/new_chapters/eventlog.t @@ -35,6 +35,7 @@ The directives provided by the event logging manager are: @item @code{log_facilityaddset} - Manipulate log facility sets @item @code{log_facilitydelset} - Manipulate log facility sets @item @code{log_facilityismember} - Manipulate log facility sets +@item @code{log_facilityisvalid} - Manipulate log facility sets @end itemize @section Background @@ -70,11 +71,21 @@ XXX Events @subsection Creating and Writing a non-System Log -Discuss creating and writing to a non-system log. +The following snips of code create a non-System log file at /temp/. +A previously read entry and buffer (log_buf) of size readsize are written +into the log. See the dicussion on opening and reading a log for +how the entry is created. @example - log_create - log_write loop +#include + : + logd_t *outlog = NULL; + char *path = "/temp/"; + + log_create( outlog, path ); + : + log_write_entry( outlog, &entry, log_buf, readsize ); + @end example @subsection Reading a Log @@ -699,6 +710,8 @@ int log_seek( @table @b @item EBADF The @code{logdes} argument is not a valid log file descriptor. +@item EINVAL +The @code{log_recid} argument is not a valid record id. @end table @@ -1026,6 +1039,57 @@ supplied as an argument to any of the @code{log_facilityaddset}, @code{logfacilitydelset}, @code{log_facilityismember} or @code{log_open} functions, the results are undefined. +@page +@subsection log_facilityismember - Manipulate log facility sets + +@subheading CALLING SEQUENCE: + +@ifset is-C +@example +#include + +int log_facilityisvalid( + log_facility_t facilityno +); +@end example +@end ifset + +@ifset is-Ada +@end ifset + +@subheading STATUS CODES: + +@table @b +@item EFAULT +The @code{set} or @code{member} argument is an invalid pointer. + +@item EINVAL +The @code{facilityno} argument is not a valid facility. + +@end table + +@subheading DESCRIPTION: + +The @code{log_facilityisvalid} function tests whether the facility +specified by the value of the argument @code{facilityno} is a valid +facility number which is less than 32. Upon successful completion, +the @code{log_facilityisvalid} function either returns a value of +0 if the specified facility is a valid facility or value of EINVAL +if the specified facility is not a valid facility. + +@subheading NOTES: + +The @code{_POSIX_LOGGING} feature flag is defined to indicate +this service is available. + +Applications shall call either @code{log_facilityemptyset} or +@code{log_facilityfillset} at least once for each object of type +@code{log_facilityset_t} prior to any other use of that object. If +such an object is not initialized in this way, but is nonetheless +supplied as an argument to any of the @code{log_facilityaddset}, +@code{logfacilitydelset}, @code{log_facilityismember} or +@code{log_open} functions, the results are undefined. + @page @subsection log_create - Creates a log file -- cgit v1.2.3