pragmatism first

ATREAD(3) - Linux manual page online | Library functions

Read version objects with attribute citations expanded.

Tue Feb 16 20:33:25 1993
atReadExpand(3) AtFS Toolkit Library atReadExpand(3)


atOpenExpand, atReadExpand, atCloseExpand - read version objects with attribute citations expanded atGetWriteName - get bound version name of a version object opened with atOpenExpand


#include <atfs.h> #include <atfstk.h> int atOpenExpand(char *version, int expand_busy) ; int atReadExpand(int desc, char *bufp, int nbytes) ; void atCloseExpand(int desc) ; char *atGetWriteName(int desc) ; extern int atBindError ; extern char atBindErrorMsg[] ;


atOpenExpand, atReadExpand, and atCloseExpand are designed as a nearly plug-compatible replacement for the system calls open(2), read(2), and close(2) for reading of AtFS ver‐ sion objects with attribute citations expanded. atOpenExpand opens the file or AtFS version object version for reading with atReadExpand. Version points to the pathname of a file or AtFS version object. If the flag expand_busy is non-zero, attribute citations are expanded in busy versions also. atOpenExpand returns a descriptor that is valid as argument to successive calls to atReadExpand and atCloseEx‐ pand. atReadExpand attempts to read nbytes of data from the object referenced by the descriptor desc into the buffer pointed to by bufp. If desc is zero, atReadExpand reads from the standard input. atReadExpand returns the number of bytes actually read. atCloseExpand frees the resources associated with the descriptor desc. atGetWriteName returns a pointer to the bound version name of the version object for which atOpenExpand returned the descriptor desc.


On error atOpenExpand and atReadExpand return -1 and set errno appropriately. If one of these returns an error and errno is set to ENOMEM, the application may retry the opera‐ tion, possibly after freeing some memory. If atOpenExpand returns an error and atBindError has a non-zero value, the string version did not select a version object or not a unique version object. In this case atBindEr‐ rorMsg contains an appropriate error message. Possible Values of errno after a call to atOpenExpand: ENOMEM Not enough memory could be allocated. EMFILE All available descriptors are in use. All errno values returned by open(2) or read(2). Possible Values of errno after a call to atReadExpand: ENOMEM Not enough memory could be allocated. EBADF Invalid descriptor.


Since atOpenExpand reads the complete contents of version into memory, it fails on very large version objects.


intro(2), open(2), read(2), close(2), errno(3), atattribute(3), atbind(3).
AtFStk-1.12 Tue Feb 16 20:33:25 1993 atReadExpand(3)
This manual Reference Other manuals
atread(3) referred by vgrep(1)
refer to atattribute(3) | atbind(3) | close(2) | errno(3) | intro(2) | open(2) | read(2)
Download raw manual
Index AtFS Toolkit Library (+64) AtFStk-1.12 (+66) № 3 (+68044)
Go top