rvm_create_log(3)

NAME
rvm_create_log - RVM log file creation

SYNOPSIS

#include "rvm.h"
rvm_return_t rvm_create_log (options, length, mode)
rvm_options   *options;  /* pointer to a RVM options record */
rvm_offset_t  *length;   /* length of log record area in file to be created */
long          mode;      /* protection mode of file to be created */

DESCRIPTION
rvm_create_log provides a mechanism for creating a log file from within an application. It is intended to allow an application to be self-installing by silently creating the log and other RVM structures it needs. To provide some protection against an applications automatically over-writing a log containing valid records, rvm_create_log can be used to create logs in Unix files only, and only if the file does not already exist. Creating logs in raw partitions must be done with the utility rvmutl. The name of the log file to be created must be specified in the options record. An options record created with typedef rvm_options_t must be used. RVM_EOPTIONS will be returned if options does not point to a valid record. If either the name is not provided, or the file cannot be created and initialized, RVM_ELOG will be returned. Also, the total length of the file to be created must be permitted by the file system. This includes the length specified for log records plus the overhead necessary for the log status area, presently one sector. Options other than the log file name are ignored. The mode parameter is the Unix file system protection mode and must allow writing by the owner. An i/o error will be returned if the file cannot be created or written. rvm_create_log does not declare the created log file as the operational log. This must be done by specifying an options descriptor to rvm_set_options, rvm_initialize, or rvm_map.

DIAGNOSTICS

RVM_SUCCESS
    success

RVM_ELOG
    no log file has been specified

RVM_EIO
    I/O or kernel error, errno has code number

RVM_EOPTIONS
    invalid RVM options record or pointer

RVM_ENO_MEMORY
    heap exhausted

RVM_ENAME_TOO_LONG
    file name longer than 1023 characters

RVM_ETOO_BIG
    file length requested greater than file system permits

RVM_EINIT
    RVM not initialized

SEE ALSO
rvm_set_options (3), rvm_initialize (3), rvm_map (3)

AUTHOR
Hank Mashburn