Changeset 6520befe in rtems


Ignore:
Timestamp:
Aug 27, 1998, 8:16:39 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
af5a571
Parents:
d65d22a0
Message:

Modified log_open() to reflect review.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/new_chapters/eventlog.t

    rd65d22a0 r6520befe  
    170170
    171171int log_open(
    172   const logd_t         *logdes,
     172  logd_t               *logdes,
    173173  const char           *path,
    174174  const log_query_t    *query
     
    189189@item  EINTR
    190190A signal interrupted the call to log_open().
    191 
    192 @item EINVAL
    193 The log_facility field of the query argument is not a valid
    194 facility set.
    195191
    196192@item EINVAL
     
    225221The @code{log_open} function establishes the connection between a
    226222log file and a log file descriptor.  It creates an open log file
    227 description that refers to a log file and a log file descriptor that
    228 refers to that open log file description.  The log file descriptor is
    229 used by other log functions to refer to that log file.  The @code{path}
    230 argument points to a pathname naming a log file.  A @code{path}
    231 argument of NULL specifies the current system log file. 
    232 
    233 The @code{query} argument points to a log query specification that
    234 restricts log operations using the returned log file descriptor to
    235 to event records from the log file which match the query.  The
    236 predicate which determines the success of the match operation is the
    237 logical AND of the individual comparison predicates for each member
    238 of the log query specification.  The query attribute of the open file
    239 description is set to filter as specified by the @code{query} argument.
    240 If the value of the query argument is not NULL, the value of the
    241 @code{log_facility} member of the @code{query} specification shall be
    242 a set of valid log facilities or the @code{log_open} shall fail.  If
    243 the value of the @code{query} argument is not NULL, the value of the
    244 @code{log_severity} member of the @code{query} specification shall be
    245 less than or equal to @code{LOG_SEVERITY_MAX} or the @code{log_open}
    246 shall fail.  If the value of the @code{query} argument is NULL, no
    247 query filter shall be applied.
    248 
    249 @subheading NOTES:
    250 
    251 The @code{_POSIX_LOGGING} feature flag is defined to indicate
    252 this service is available.
     223descriptor that refers to this query stream on the specified log file
     224The log file descriptor is used by the other log functions to refer
     225to that log query stream.  The @code{path} argument points to a
     226pathname for a log file.  A @code{path} argument of NULL specifies
     227the current system log file. 
     228
     229The @code{query} argument is not NULL, then it points to a log query
     230specification that is used to filter the records in the log file on
     231subsequent @code{log_read} operations.  This restricts the set of
     232event records read using the returned log file descriptor to those
     233which match the query.  A query match occurs for a given record when
     234that record's facility is a member of the query's facility set and
     235the record's severity is greater than or equal to the severity specified
     236in the query.
     237
     238If the value of the @code{query} argument is NULL, no query filter
     239shall be applied.
     240
     241@subheading NOTES:
     242
     243The @code{_POSIX_LOGGING} feature flag is defined to indicate
     244this service is available.
     245
     246POSIX specifies that @code{EINVAL} will be returned if the
     247@code{log_facilities} field of the @code{query} argument is not
     248a valid facility set.  In this implementation, this condition
     249can never occur.
     250
     251Many error codes that POSIX specifies to be returned by @code{log_open}
     252should actually be detected by @code{open} and passed back by the
     253@code{log_open} implementation.  In this implementation, @code{EACCESS},
     254@code{EMFILE}, @code{ENAMETOOLONG}, @code{ENFILE}, @code{ENOENT},
     255and @code{ENOTDIR} are detected in this manner.
    253256
    254257@page
Note: See TracChangeset for help on using the changeset viewer.