#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#include <fcntl.h>
#include <time.h>
#include "repo.h"
#include "repopage.h"
Go to the source code of this file.
Defines | |
#define | _XOPEN_SOURCE 500 |
#define | BLOCK_SIZE (65536*1) |
#define | HS (65536) |
#define | SOLV_ERROR_EOF 3 |
#define | SOLV_ERROR_CORRUPT 6 |
Typedefs | |
typedef __uint16_t | Ref |
Functions | |
static unsigned int | compress_buf (const unsigned char *in, unsigned int in_len, unsigned char *out, unsigned int out_len) |
static unsigned int | unchecked_decompress_buf (const unsigned char *in, unsigned int in_len, unsigned char *out, unsigned int out_len __attribute__((unused))) |
void | repopagestore_init (Repopagestore *store) |
void | repopagestore_free (Repopagestore *store) |
unsigned char * | repopagestore_load_page_range (Repopagestore *store, unsigned int pstart, unsigned int pend) |
unsigned int | repopagestore_compress_page (unsigned char *page, unsigned int len, unsigned char *cpage, unsigned int max) |
static unsigned int | read_u32 (FILE *fp) |
int | repopagestore_read_or_setup_pages (Repopagestore *store, FILE *fp, unsigned int pagesz, unsigned int blobsz) |
void | repopagestore_disable_paging (Repopagestore *store) |
#define _XOPEN_SOURCE 500 |
Definition at line 21 of file repopage.c.
#define BLOCK_SIZE (65536*1) |
#define HS (65536) |
Referenced by compress_buf().
#define SOLV_ERROR_EOF 3 |
Definition at line 739 of file repopage.c.
#define SOLV_ERROR_CORRUPT 6 |
Definition at line 740 of file repopage.c.
typedef __uint16_t Ref |
Definition at line 39 of file repopage.c.
static unsigned int compress_buf | ( | const unsigned char * | in, | |
unsigned int | in_len, | |||
unsigned char * | out, | |||
unsigned int | out_len | |||
) | [static] |
static unsigned int unchecked_decompress_buf | ( | const unsigned char * | in, | |
unsigned int | in_len, | |||
unsigned char * | out, | |||
unsigned int out_len | __attribute__(unused) | |||
) | [static] |
Definition at line 405 of file repopage.c.
void repopagestore_init | ( | Repopagestore * | store | ) |
Definition at line 554 of file repopage.c.
References _Repopagestore::pagefd.
Referenced by repo_add_solv_flags(), and repodata_initdata().
void repopagestore_free | ( | Repopagestore * | store | ) |
Definition at line 560 of file repopage.c.
References _Repopagestore::blob_store, _Repopagestore::mapped, _Repopagestore::pagefd, _Repopagestore::pages, and sat_free().
Referenced by repodata_freedata().
unsigned char* repopagestore_load_page_range | ( | Repopagestore * | store, | |
unsigned int | pstart, | |||
unsigned int | pend | |||
) |
Definition at line 573 of file repopage.c.
References BLOB_PAGESIZE, _Repopagestore::blob_store, _Attrblobpage::file_offset, _Attrblobpage::file_size, _Repopagestore::mapped, _Attrblobpage::mapped_at, _Repopagestore::ncanmap, _Repopagestore::pagefd, _Repopagestore::pages, _Repopagestore::rr_counter, sat_realloc2(), and unchecked_decompress_buf().
Referenced by get_vertical_data(), and repopagestore_disable_paging().
unsigned int repopagestore_compress_page | ( | unsigned char * | page, | |
unsigned int | len, | |||
unsigned char * | cpage, | |||
unsigned int | max | |||
) |
static unsigned int read_u32 | ( | FILE * | fp | ) | [inline, static] |
int repopagestore_read_or_setup_pages | ( | Repopagestore * | store, | |
FILE * | fp, | |||
unsigned int | pagesz, | |||
unsigned int | blobsz | |||
) |
Definition at line 762 of file repopage.c.
References BLOB_PAGESIZE, _Repopagestore::blob_store, _Attrblobpage::file_offset, _Attrblobpage::file_size, _Attrblobpage::mapped_at, _Repopagestore::num_pages, _Repopagestore::pagefd, _Repopagestore::pages, read_u32(), sat_malloc2(), SOLV_ERROR_CORRUPT, SOLV_ERROR_EOF, and unchecked_decompress_buf().
Referenced by repo_add_solv_flags().
void repopagestore_disable_paging | ( | Repopagestore * | store | ) |
Definition at line 850 of file repopage.c.
References _Repopagestore::num_pages, and repopagestore_load_page_range().
Referenced by repodata_disable_paging().