Changeset 82db2d3a in rtems


Ignore:
Timestamp:
Aug 28, 1998, 7:59:44 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
90c60f7
Parents:
566669f5
Message:

Reviewed log_read().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/new_chapters/eventlog.t

    r566669f5 r82db2d3a  
    2424@item @code{log_write_entry} - Write entry to any log file
    2525@item @code{log_open} - Open a log file
    26 @item @code{log_read} - Read from the system Log
     26@item @code{log_read} - Read from a log file
    2727@item @code{log_notify} - Notify Process of writes to the system log
    2828@item @code{log_close} - Close log descriptor
     
    463463
    464464@page
    465 @subsection log_read - Read from the system Log
     465@subsection log_read - Read from a log file
    466466
    467467@subheading CALLING SEQUENCE:
     
    487487
    488488@table @b
     489@item E2BIG
     490This error indicates an inconsistency in the implementation.
     491Report this as a bug.
     492
    489493@item EBADF
    490 The logdes argument is not a valid log file descriptor.
     494The @code{logdes} argument is not a valid log file descriptor.
     495
     496@item EFAULT
     497The @code{entry} argument is not a valid pointer to a log entry structure.
     498
     499@item EFAULT
     500The @code{log_sizeread} argument is not a valid pointer to a size_t.
    491501
    492502@item EBUSY
    493 No data available.  The open log file descriptor references
    494 the current system log.  and there are no unread event records
    495 remaining.
     503No data available.  There are no unread event records remaining
     504in this log file.
    496505
    497506@item EINTR
     
    501510An I/O error occurred in reading from the event log.
    502511
    503 @end table
    504 
    505 @subheading DESCRIPTION:
    506 
    507 The @code{log_read} function shall attempt to read the @code{log_entry}
    508 structure and @code{log_len} bytes of data from the next event record
    509 of the log file associated with the open log file descriptor @code{logdes},
    510 placing the @code{log_entry} structure into the buffer pointed to by
    511 @code{entry}, and the data into the buffer pointed to by @code{log_buf}.
    512 The log record ID of the returned event record shall be stored in the
     512@item EINVAL
     513The matching event record has data associated with it and
     514@code{log_buf} was not a valid pointer.
     515
     516@item EINVAL
     517The matching event record has data associated with it which is
     518longer than @code{log_len}.
     519
     520@end table
     521
     522@subheading DESCRIPTION:
     523
     524The @code{log_read} function reads the @code{log_entry}
     525structure and up to @code{log_len} bytes of data from the next
     526event record of the log file associated with the open log file
     527descriptor @code{logdes}.  The event record read is placed
     528into the @code{log_entry} structure pointed to by
     529@code{entry} and any data into the buffer pointed to by @code{log_buf}.
     530The log record ID of the returned event record is be stored in the
    513531@code{log_recid} member of the @code{log_entry} structure for the event
    514532record.
    515533
    516534If the query attribute of the open log file description associated with
    517 the @code{logdes} is set, the event record read shall match that query.
    518 If the @code{entry} argument is not NULL it will point to a @code{log_entry}
    519 structure which shall be filled with the creation information for this log
    520 entry.  If the argument @code{log_buf} is not NULL the data written with the
    521 log entry will be placed in the buffer.  The size of the buffer is specified
    522 by the argument @code{log_len}.
    523 
    524 If the @code{log_read} is successful the call shall store the actual length
     535the @code{logdes} is set, the event record read will match that query.
     536
     537If the @code{log_read} is successful the call stores the actual length
    525538of the data associated with the event record into the location specified by
    526 @code{log_sizeread}.  This number may be smaller or greater than
     539@code{log_sizeread}.  This number will be less than or equal to
    527540@code{log_len}.
    528541
     
    531544The @code{_POSIX_LOGGING} feature flag is defined to indicate
    532545this service is available.
     546
     547When @code{EINVAL} is returned, then no data is returned although the
     548event record is returned.  This is an extension to the POSIX specification.
     549
     550The POSIX specification specifically allows @code{log_read} to write
     551greater than @code{log_len} bytes into @code{log_buf}.  This is highly
     552undesirable and this implementation will NOT do this.
    533553
    534554@page
Note: See TracChangeset for help on using the changeset viewer.