IBM® Carrier Grade Server X3650 T
Revision 3.0
87
17.2.5.4 Errors
If any of the following conditions occur, the syscon_log_close() function shall return the corresponding
error number:
[EBADF]: The logdes argument is not a valid log descriptor.
17.2.5.5 Cross-References
close()
17.2.6 Reposition the Read Pointer
Function: syscon_log_seek()
17.2.6.1 Synopsis
#include <syscon.h>
int syscon_log_seek(syscon_logd_t logdes, const syscon_log_query_t *query,
int direction);
17.2.6.2 Description
The syscon_log_seek() function shall change the read pointer associated with the logdes log descriptor
to the position specified by the query and direction arguments, as described below. If the query argument
is equal to NULL, it is considered to match every record in the log.
The direction argument must be one of the seek directions listed in Table 1. Each seek direction shall be
a constant of type int. These seek directions shall be defined in the header <syscon.h>:
Table 1. Seek Directions
Name Description
SYSCONLOG_SEEK_START Set the read pointer to the beginning of the log.
SYSCONLOG_SEEK_END Set the read pointer to the end of the log.
SYSCONLOG_SEEK_FIRST Set the read pointer to point to the first event record that matches query
SYSCONLOG_SEEK_LAST Set the read pointer to point to the last event record that matches query
SYSCONLOG_SEEK_FORWARD Advance the read pointer to the next event record that matches query
SYSCONLOG_SEEK_BACKWARD Move the read pointer backward to the next event record that matches
query
If the direction argument is equal to SYSCONLOG_SEEK_START, the read pointer shall be set to the
beginning of the log (i.e., pointing to the first record, if any, in the event log). If the query argument is not
equal to NULL, syscon_log_seek() shall fail.
If the direction argument is equal to SYSCONLOG_SEEK_END, the read pointer shall be set to the end
of the log (i.e., after the last record, if any, in the event log). If the query argument is not equal to NULL,
syscon_log_seek() shall fail.
If the direction argument is equal to SYSCONLOG_SEEK_FIRST, then the read pointer shall be set to
point to the first record in the event log that matches query. If there is no matching record,
syscon_log_seek() shall fail.