cr_open.3 (2010 09)

c
cr_open(3) cr_open(3)
NAME
cr_open() - open crash dump for reading
SYNOPSIS
#include <libcrash.h>
int cr_open(const char *path, CRASH **crash_cb, int flags);
DESCRIPTION
The cr_open() library call opens a crash dump and passes back a crash dump descriptor.
The path argument points to a path name naming a crash dump directory or file, and must not exceed
PATH_MAX bytes in length.
The CRASH * to which crash_cb points is set to a crash dump descriptor, which can then be passed to the
other
cr_*() functions to access the crash dump.
flags is a bitmask of zero or more of the following flag values, which affect the operation of future calls to
libcrash routines for this crash dump, except for cr_verify (3), which has its own flags parameter.
CR_NOCHECKSUM
The library will not attempt to verify checksums of files in the crash dump if this
flag is set.
CR_DELAYMSGS The library will write messages to stderr during time-consuming operations
(decompressions and checksums) if this flag is set.
RETURN VALUE
Returns zero for success. Other possible return values are described in libcrash (5).
EXAMPLES
The following call to
cr_open() opens crash dump contained in the directory
/var/adm/crash/core.0
and returns the crash dump descriptor crash_cb. For an example of
reading the crash dump
/var/adm/crash/core.0
, see the cr_read (3) manual entry.
#include <libcrash.h>
CRASH *crash_cb;
int ret;
ret = cr_open ("/var/adm/crash/core.0", &crash_cb, CR_DELAYMSGS);
AUTHOR
cr_open() was developed by HP.
SEE ALSO
cr_close(3), cr_perror(3), libcrash(5).
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)