errlog_set_direction 子例程
用途
为错误日志查找函数设置方向。
语法
library liberrlog.a
#include <sys/errlog.h>
int errlog_set_direction(handle, direction)
errlog_handle_t handle;
int direction;描述
缺省情况下, errlog_find_next 和 errlog_find_sequence 子例程会从最新的日志条目开始搜索错误日志,并在时间上后退。 errlog_set_direction 子例程用于改变该方向。
参数
句柄参数必须包含由先前的 errlog_open 调用返回的句柄。
方向参数必须为 前 (_FORWARD) 或 LE_REVERSE。 如果未使用 errlog_set_direction 子例程,那么 LE_REVERSE 是缺省值。
返回值
成功完成后, errlog_set_direction 子例程返回 0。
如果参数无效,那么 errlog_set_direction 子例程返回 _ERR_INVARG。