IBM® Carrier Grade Server X3650 TRevision 3.0 81• [EACCES]: Search permission is denied on a component of the path prefix, or the log file existsand 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, ora 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 pathnamecomponent is longer than {NAME_MAX} while {_POSIX_NO_TRUNC} is in effect.• [ENFILE]: An implementation-defined, system-wide limit on log descriptors, file descriptors, orother 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 readfrom the specified log file.• [EBUSY]: The active system log is temporarily unavailable due to maintenance activity.17.2.1.5 Cross-Referencesopen()17.2.2 Read from an Event LogFunction: syscon_log_read()17.2.2.1 Synopsis#include int syscon_log_read(syscon_logd_t logdes, struct syscon_log_entry *entry,void *log_buf, size_t log_len);17.2.2.2 DescriptionThe syscon_log_read() function shall read the event record at the read pointer associated with logdescriptor logdes, from the log file associated with logdes. syscon_log_read() shall copy the eventrecord's syscon_log_entry structure into the buffer pointed to by entry, and the record's variable-lengthdata 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_bufbuffer. 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_sizeshall be set to the value of the event record’s log_size member, no matter how many bytes are copied tolog_buf.A successful call to syscon_log_read() shall advance the read pointer associated with logdes to the nextevent record following the one read (or to the end of the log, if there is no next record).17.2.2.3 ReturnsUpon successful completion, syscon_log_read() shall return zero. Otherwise, an error number shall bereturned to indicate the error, the read pointer shall remain unchanged, and the data pointed to by entryand log_buf shall be undefined.