[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Understanding the Diagnostic Subsystem for AIX

dlog_close

Purpose

Closes the Diagnostic Event Log opened by dlog_open.

Syntax

#include                <diag/diag_log.h>

int dlog_close(dl_info *info)

Description

The dlog_close subroutine closes the log file opened with dlog_open. It will also free the memory allocated with dlog_open.

Parameters

Parameter Description
info Pointer to structure of format:
 typedef struct _log_info {
    int fd;                            /* File descriptor                   */
    int lockId;                        /* ODM Lock id                       */
    dl_att *dlAtt;                     /* Pointer to log attributes         */
    dl_einfo *dlArray;                 /* Pointer to log array              */
} dl_info;

typedef struct _log_einfo {
    int version;                       /* Entry Version                     */
    char logType;                      /* Log Type - I,S,N,E,X              */
    unsigned int size;                 /* Entry Size                        */
    unsigned int offset;               /* Offset from the file's beginning  */
} dl_einfo;

typedef struct _log_att {
    int version;                       /* Version                           */
    unsigned int numEntries;           /* number of log entried             */
    unsigned int lastIndex;            /* index of latest entry             */
    unsigned int nextSeqNum;           /* sequence number of next log entry */
    unsigned int maxLogSize;           /* maximum size of log               */
    unsigned int arrayOffset;          /* array offset                      */
    unsigned int wrapCount;            /* number of times file has wrapped  */
} dl_att;

Return Value

Upon successful completion, 0 is returned. Otherwise, a value of -1 is returned.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]