IBM® Carrier Grade Server X3650 T
Revision 3.0
81
•
[EACCES]: Search permission is denied on a component of the
path
prefix, or the log file exists
and read permission is denied.
•
[EINVAL]:
The
path
argument refers to a file that is not a log file.
•
[EMFILE]: The calling process already has {SYSCONLOG_OPEN_MAX} log descriptors open, or
a per-process limit on resources such as file descriptors would be exceeded by this call.
•
[ENAMETOOLONG]: The length of the
path
string exceeds {PATH_MAX}, or a pathname
component is longer than {NAME_MAX} while {_POSIX_NO_TRUNC} is in effect.
•
[ENFILE]: An implementation-defined, system-wide limit on log descriptors, file descriptors, or
other such resources would be exceeded by this call.
•
[ENOENT]: The file specified by the
path
argument does not exist.
•
[ENOTDIR]: A component of the
path
prefix is not a directory.
•
[EPERM]: The caller does not have the appropriate implementation-defined permission to read
from the specified log file.
•
[EBUSY]: The active system log is temporarily unavailable due to maintenance activity.
17.2.1.5 Cross-References
open()
17.2.2
Read from an Event Log
Function: syscon_log_read()
17.2.2.1 Synopsis
#include <syscon.h>
int syscon_log_read(syscon_logd_t logdes, struct syscon_log_entry *entry,
void *log_buf, size_t log_len);
17.2.2.2 Description
The
syscon_log_read
() function shall read the event record at the read pointer associated with log
descriptor
logdes
, from the log file associated with
logdes
.
syscon_log_read
() shall copy the event
record's
syscon_log_entry
structure into the buffer pointed to by
entry
, and the record's variable-length
data into the buffer pointed to by
log_buf
.
If the
log_buf
argument is
NULL
or the
log_len
argument is zero, no data shall be copied to the
log_buf
buffer. Otherwise,
n
bytes of the variable portion of the event record shall be copied to the
log_buf
buffer,
where
n
is the smaller of
log_len
and the event record’s
log_size
member. The value of
entry
->
log_size
shall be set to the value of the event record’s
log_size
member, no matter how many bytes are copied to
log_buf
.
A successful call to
syscon_log_read
() shall advance the read pointer associated with
logdes
to the next
event record following the one read (or to the end of the log, if there is no next record).
17.2.2.3 Returns
Upon successful completion,
syscon_log_read
() shall return zero. Otherwise, an error number shall be
returned to indicate the error, the read pointer shall remain unchanged, and the data pointed to by
entry
and
log_buf
shall be undefined.
Summary of Contents for Carrier Grade X3650 T
Page 8: ...IBM Carrier Grade Server X3650 T Revision 3 0 viii This page intentionally left blank...
Page 12: ...IBM Carrier Grade Server X3650 T Revision 3 0 4...
Page 15: ...IBM Carrier Grade Server X3650 T Revision 3 0 7...
Page 17: ...IBM Carrier Grade Server X3650 T Revision 3 0 9...
Page 25: ...IBM Carrier Grade Server X3650 T Revision 3 0 17...
Page 43: ...IBM Carrier Grade Server X3650 T Revision 3 0 35...