Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rf_getalloccap(3P4) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rf_getcachecap(3P4)

rf_getbiocap(3P4)

rf_getaiocap(3P4)

rf_getdiocap(3P4)

rf_getalloccap(3P4)

NAME

rf_getalloccap − get allocation capabilities of realtime files and file systems

SYNOPSIS

#include <rtfiles.h>

int rf_getalloccap(fildes, capbufp)
int fildes;
struct rf_capallocbuf ∗capbufp;

DESCRIPTION

The rf_getalloccap function allows the calling process to obtain the allocation capabilities of the file specified by fildes. 

If fildes specifies a file which is not a directory, then the capabilities refer to the file itself.  If fildes specifies a directory, then the capabilities refer to files created within that directory. 

The capabilities of the file on file system will be stored in the rf_capallocbuf structure specified by the capbufp argument upon successful completion. 

The rf_capallocbuf structure is declared in the <rtfiles.h> header file.  The structure has the following members:

off_tatc_allocmin;
off_tatc_allocmax;
off_tatc_allocincr;
int  atc_allocincrtype;
intatc_allocflags;

The fields atc_allocmin and atc_allocmax will contain the minimum and maximum file preallocation size, in bytes. 

The field atc_allocincr contains the granularity of increment for file allocation.  atc_allocincrtype specifies how to interpret the granularity of increment (ATC_MULTIPLY will be set to indicate that allocation size must be integral multiple of atc_allocincr). 

atc_allocflags contains flags associated with preallocation.  The only flag is:

ATC_SEQ
Sequential preallocation is possible.

RETURN VALUE

Upon successful completion, the function rf_getalloccap returns a value of 0;  otherwise it returns a value of -1 and sets errno to indicate the error. 

ERRORS

Under the following conditions, the function rf_getalloccap fails and sets errno to:

­[EBADF] The fildes argument is not a valid file descriptor. 

­[EINVAL] The rf_getalloccap function in not supported for the specified file or file system. 

SEE ALSO

rf_getcachecap(3P4), rf_getbiocap(3P4), rf_getaiocap(3P4),
rf_getdiocap(3P4).

WARNING

rf_getalloccap is based on IEEE Draft Standard P1003.4/D12.  This is an unapproved draft, subject to change.  Use of information contained in this unapproved draft is at your own risk.  This interface will change to reflect any changes made by future drafts of POSIX 1003.4. 

CX/UX Programmer’s Reference Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026