#include "system.h"
#include <rpmio_internal.h>
#include <rpmmessages.h>
#include <rpmerr.h>
#include "falloc.h"
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | faFileHeader |
struct | faHeader |
struct | faFooter |
Defines | |
#define | FA_MAGIC 0x02050920 |
Functions | |
static ssize_t | Pread (FD_t fd, void *buf, size_t count, _libio_off_t offset) |
pread(2) clone. | |
static ssize_t | Pwrite (FD_t fd, const void *buf, size_t count, _libio_off_t offset) |
pwrite(2) clone. | |
FD_t | fadOpen (const char *path, int flags, mode_t perms) |
unsigned int | fadAlloc (FD_t fd, unsigned int size) |
void | fadFree (FD_t fd, unsigned int offset) |
static int | fadSanity (FD_t fd, int offset, const struct faHeader *fh, int printit) |
int | fadFirstOffset (FD_t fd) |
int | fadNextOffset (FD_t fd, unsigned int lastoff) |
Variables | |
static struct FDIO_s | fadio_s |
FDIO_t | fadio = &fadio_s |
The size fields doubly link this block list.
There is an additional free list weaved through the block list, which keeps new allocations fast.
Much of this was inspired by Knuth vol 1.
Definition in file falloc.c.
Definition at line 421 of file falloc.c.
References fadGetFileSize(), faHeader::freeNext, faHeader::freePrev, faHeader::isFree, RPMMESS_DEBUG, rpmMessage, and faHeader::size.
Referenced by fadNextOffset().
static ssize_t Pread | ( | FD_t | fd, | |
void * | buf, | |||
size_t | count, | |||
_libio_off_t | offset | |||
) | [static] |
pread(2) clone.
Definition at line 58 of file falloc.c.
References Fread(), Fseek(), and SEEK_SET.
Referenced by fadAlloc(), fadFree(), fadNextOffset(), and fadOpen().
static ssize_t Pwrite | ( | FD_t | fd, | |
const void * | buf, | |||
size_t | count, | |||
_libio_off_t | offset | |||
) | [static] |