cr_open(3)                                                       cr_open(3)
 NAME    [Toc]    [Back]
      cr_open() - open crash dump for reading
 SYNOPSIS    [Toc]    [Back]
      #include <libcrash.h>
      int cr_open(const char *path, CRASH **crash_cb, int flags);
 DESCRIPTION    [Toc]    [Back]
      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    [Toc]    [Back]
      Returns zero for success.  Other possible return values are described
      in libcrash(5).
 EXAMPLES    [Toc]    [Back]
      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    [Toc]    [Back]
      cr_open() was developed by HP.
 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003
 cr_open(3)                                                       cr_open(3)
 SEE ALSO    [Toc]    [Back]
      cr_close(3), cr_perror(3), libcrash(5).
 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003 [ Back ] |