IBM® Carrier Grade Server X3650 T
Revision 3.0
88
If the direction argument is equal to SYSCONLOG_SEEK_LAST, then the read pointer shall be set to
point to the last record in the event log that matches query. If there is no matching record,
syscon_log_seek() shall fail.
If the direction argument is equal to SYSCONLOG_SEEK_FORWARD, the read pointer shall be
advanced (toward the end of the log) until it points to the next event record that matches query. If, before
the call to syscon_log_seek(), the read pointer already points to a record that matches query, the read
pointer shall remain unchanged.
2
If there is no matching record between the current read pointer and the
end of the log, syscon_log_seek() shall fail.
If the direction argument is equal to SYSCONLOG_SEEK_BACKWARD, the read pointer shall be moved
backward (toward the beginning of the log) until it points to an event record that matches query. The read
pointer shall always be moved backward at least one record unless syscon_log_seek() fails. If there is
no matching record between the current read pointer and the beginning of the log, syscon_log_seek()
shall fail.
17.2.6.3 Returns
Upon successful completion, syscon_log_seek() shall return zero. Otherwise, an error number shall be
returned to indicate the error, and the read pointer associated with logdes shall remain unchanged.
17.2.6.4 Errors
If any of the following conditions occur, the syscon_log_seek() function shall return the corresponding
error number:
• [EINVAL]: The logdes argument is not a valid log descriptor.
• [EINVAL]: The direction argument is not a valid direction code.
• [EINVAL]: The query argument is not NULL, but does not point to a valid query object.
• [EINVAL]: The direction argument is equal to SYSCONLOG_SEEK_START or
SYSCONLOG_SEEK_END, but the query argument is not NULL.
• [ENOENT]: The direction argument is equal to SYSCONLOG_SEEK_FIRST or
SYSCONLOG_SEEK_LAST, but there is no matching record in the specified log.
• [ENOENT]: The direction argument is equal to SYSCONLOG_SEEK_FORWARD, but there is no
matching record in the specified log between the current pointer and the end.
• [ENOENT]: The direction argument is equal to SYSCONLOG_SEEK_BACKWARD, but there is
no matching record in the specified log between the current pointer and the beginning.
17.2.6.5 Cross-References
lseek(), syscon_log_query_create()
17.2.7 Compare Event Record Severities
Function: syscon_log_severity_compare()
2
In particular, syscon_log_seek(logdes, NULL, SYSCONLOG_SEEK_FORWARD), though permitted, shall never
advance the read pointer.