Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ocs_ramlog.h File Reference
#include "ocs_textbuf.h"

Go to the source code of this file.

Macros

#define OCS_RAMLOG_DEFAULT_BUFFERS   5
 

Functions

ocs_ramlog_t * ocs_ramlog_init (ocs_t *ocs, uint32_t buffer_len, uint32_t buffer_count)
 Allocate a ramlog buffer. More...
 
void ocs_ramlog_free (ocs_t *ocs, ocs_ramlog_t *ramlog)
 Free a ramlog buffer. More...
 
void ocs_ramlog_clear (ocs_t *ocs, ocs_ramlog_t *ramlog, int clear_start_of_day, int clear_recent)
 Clear a ramlog buffer. More...
 
 __attribute__ ((format(printf, 2, 3))) extern int32_t ocs_ramlog_printf(void *os
 
const char __attribute__ ((format(printf, 2, 0))) extern int32_t ocs_ramlog_vprintf(ocs_ramlog_t *ramlog
 
int32_t ocs_ddump_ramlog (ocs_textbuf_t *textbuf, ocs_ramlog_t *ramlog)
 Perform ramlog buffer driver dump. More...
 

Variables

const char * fmt
 
const char const char va_list ap
 

Macro Details

#define OCS_RAMLOG_DEFAULT_BUFFERS   5

Definition at line 46 of file ocs_ramlog.h.

Function Details

__attribute__ ( (format(printf, 2, 3))  )
const char __attribute__ ( (format(printf, 2, 0))  )
int32_t ocs_ddump_ramlog ( ocs_textbuf_t *  textbuf,
ocs_ramlog_t *  ramlog 
)

Perform ramlog buffer driver dump.

The RAM logging buffer is appended to the driver dump data.

Parameters
textbufPointer to the driver dump text buffer.
ramlogPointer to the RAM logging buffer.
Returns
Returns 0 on success, or a negative error code value on failure.

Definition at line 266 of file ocs_ramlog.c.

void ocs_ramlog_clear ( ocs_t *  ocs,
ocs_ramlog_t *  ramlog,
int  clear_start_of_day,
int  clear_recent 
)

Clear a ramlog buffer.

The text in the start of day and/or recent ramlog text buffers is cleared.

Parameters
ocsPointer to driver structure.
ramlogPointer to RAM logging buffer structure.
clear_start_of_dayClear the start of day (driver init) portion of the ramlog.
clear_recentClear the recent messages portion of the ramlog.
Returns
None.

Definition at line 148 of file ocs_ramlog.c.

void ocs_ramlog_free ( ocs_t *  ocs,
ocs_ramlog_t *  ramlog 
)

Free a ramlog buffer.

A previously allocated RAM logging buffer is freed.

Parameters
ocsPointer to driver structure.
ramlogPointer to RAM logging buffer structure.
Returns
None.

Definition at line 116 of file ocs_ramlog.c.

ocs_ramlog_t* ocs_ramlog_init ( ocs_t *  ocs,
uint32_t  buffer_len,
uint32_t  buffer_count 
)

Allocate a ramlog buffer.

Initialize a RAM logging buffer with text buffers totalling buffer_len.

Parameters
ocsPointer to driver structure.
buffer_lenTotal length of RAM log buffers.
buffer_countNumber of text buffers to allocate (totalling buffer-len).
Returns
Returns pointer to ocs_ramlog_t instance, or NULL.

Definition at line 65 of file ocs_ramlog.c.

Variable Details

const char const char va_list ap

Definition at line 54 of file ocs_ramlog.h.

const char const char* fmt

Definition at line 52 of file ocs_ramlog.h.