errlog_write Subroutine

Purpose

Changes the previously read error log entry.

Syntax

library liberrlog.a

#include <sys/errlog.h>

int errlog_write(handle, entry)
errlog_handle_t handle;
errlog_entry_t *entry;

Description

The errlog_write subroutine is used to update the most recently read log entry. Neither the length nor the sequence number of the entry may be changed. The entry is simply updated in place.

If the errlog_write subroutine is used in a multi-threaded application, the program should obtain a lock around the read/write pair to avoid conflict.

Parameters

The handle parameter must contain a handle returned by a previous errlog_open call.

The entry parameter must point to an entry returned by the previous error log find function.

Return Values

Upon successful completion, the errlog_write subroutine returns 0.

If a parameter is invalid, the errlog_write subroutine returns LE_ERR_INVARG.

The errlog_write subroutine may also return one of the following:

Item Description
LE_ERR_INVFILE The data on file is invalid.
LE_ERR_IO An i/o error occurred.
LE_ERR_NOWRITE The entry to be written didn't match the entry being updated.