PostgreSQL Source Code  git master
filemap.h File Reference
#include "datapagemap.h"
#include "storage/block.h"
#include "storage/relfilenode.h"
Include dependency graph for filemap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  file_entry_t
 
struct  filemap_t
 

Typedefs

typedef struct file_entry_t file_entry_t
 
typedef struct filemap_t filemap_t
 

Enumerations

enum  file_action_t {
  FILE_ACTION_CREATE, FILE_ACTION_COPY, FILE_ACTION_COPY_TAIL, FILE_ACTION_NONE,
  FILE_ACTION_TRUNCATE, FILE_ACTION_REMOVE
}
 
enum  file_type_t { FILE_TYPE_REGULAR, FILE_TYPE_DIRECTORY, FILE_TYPE_SYMLINK }
 

Functions

void filemap_create (void)
 
void calculate_totals (void)
 
void print_filemap (void)
 
void process_source_file (const char *path, file_type_t type, size_t newsize, const char *link_target)
 
void process_target_file (const char *path, file_type_t type, size_t newsize, const char *link_target)
 
void process_block_change (ForkNumber forknum, RelFileNode rnode, BlockNumber blkno)
 
void filemap_finalize (void)
 

Variables

filemap_tfilemap
 

Typedef Documentation

◆ file_entry_t

typedef struct file_entry_t file_entry_t

◆ filemap_t

typedef struct filemap_t filemap_t

Enumeration Type Documentation

◆ file_action_t

Enumerator
FILE_ACTION_CREATE 
FILE_ACTION_COPY 
FILE_ACTION_COPY_TAIL 
FILE_ACTION_NONE 
FILE_ACTION_TRUNCATE 
FILE_ACTION_REMOVE 

Definition at line 23 of file filemap.h.

24 {
25  FILE_ACTION_CREATE, /* create local directory or symbolic link */
26  FILE_ACTION_COPY, /* copy whole file, overwriting if exists */
27  FILE_ACTION_COPY_TAIL, /* copy tail from 'oldsize' to 'newsize' */
28  FILE_ACTION_NONE, /* no action (we might still copy modified
29  * blocks based on the parsed WAL) */
30  FILE_ACTION_TRUNCATE, /* truncate local file to 'newsize' bytes */
31  FILE_ACTION_REMOVE /* remove local file / directory / symlink */
file_action_t
Definition: filemap.h:23

◆ file_type_t

Enumerator
FILE_TYPE_REGULAR 
FILE_TYPE_DIRECTORY 
FILE_TYPE_SYMLINK 

Definition at line 34 of file filemap.h.

Function Documentation

◆ calculate_totals()

void calculate_totals ( void  )

Definition at line 606 of file filemap.c.

References file_entry_t::action, filemap_t::array, datapagemap::bitmapsize, datapagemap_iterate(), datapagemap_next(), filemap_t::fetch_size, FILE_ACTION_COPY, FILE_ACTION_COPY_TAIL, FILE_TYPE_REGULAR, filemap, i, filemap_t::narray, file_entry_t::newsize, file_entry_t::oldsize, file_entry_t::pagemap, pg_free(), filemap_t::total_size, and file_entry_t::type.

Referenced by main().

607 {
608  file_entry_t *entry;
609  int i;
610  filemap_t *map = filemap;
611 
612  map->total_size = 0;
613  map->fetch_size = 0;
614 
615  for (i = 0; i < map->narray; i++)
616  {
617  entry = map->array[i];
618 
619  if (entry->type != FILE_TYPE_REGULAR)
620  continue;
621 
622  map->total_size += entry->newsize;
623 
624  if (entry->action == FILE_ACTION_COPY)
625  {
626  map->fetch_size += entry->newsize;
627  continue;
628  }
629 
630  if (entry->action == FILE_ACTION_COPY_TAIL)
631  map->fetch_size += (entry->newsize - entry->oldsize);
632 
633  if (entry->pagemap.bitmapsize > 0)
634  {
636  BlockNumber blk;
637 
638  iter = datapagemap_iterate(&entry->pagemap);
639  while (datapagemap_next(iter, &blk))
640  map->fetch_size += BLCKSZ;
641 
642  pg_free(iter);
643  }
644  }
645 }
file_entry_t ** array
Definition: filemap.h:78
size_t newsize
Definition: filemap.h:50
uint32 BlockNumber
Definition: block.h:31
datapagemap_t pagemap
Definition: filemap.h:53
int narray
Definition: filemap.h:79
uint64 fetch_size
Definition: filemap.h:86
file_type_t type
Definition: filemap.h:44
bool datapagemap_next(datapagemap_iterator_t *iter, BlockNumber *blkno)
Definition: datapagemap.c:87
file_action_t action
Definition: filemap.h:46
filemap_t * filemap
Definition: filemap.c:23
size_t oldsize
Definition: filemap.h:49
uint64 total_size
Definition: filemap.h:85
int bitmapsize
Definition: datapagemap.h:18
datapagemap_iterator_t * datapagemap_iterate(datapagemap_t *map)
Definition: datapagemap.c:75
void pg_free(void *ptr)
Definition: fe_memutils.c:105
int i
Definition: filemap.h:41

◆ filemap_create()

void filemap_create ( void  )

Definition at line 113 of file filemap.c.

References filemap_t::array, Assert, filemap_t::first, filemap_t::last, filemap_t::narray, filemap_t::nlist, and pg_malloc().

Referenced by main().

114 {
115  filemap_t *map;
116 
117  map = pg_malloc(sizeof(filemap_t));
118  map->first = map->last = NULL;
119  map->nlist = 0;
120  map->array = NULL;
121  map->narray = 0;
122 
123  Assert(filemap == NULL);
124  filemap = map;
125 }
file_entry_t * first
Definition: filemap.h:67
file_entry_t ** array
Definition: filemap.h:78
void * pg_malloc(size_t size)
Definition: fe_memutils.c:47
int narray
Definition: filemap.h:79
int nlist
Definition: filemap.h:69
filemap_t * filemap
Definition: filemap.c:23
#define Assert(condition)
Definition: c.h:739
file_entry_t * last
Definition: filemap.h:68

◆ filemap_finalize()

void filemap_finalize ( void  )

Definition at line 570 of file filemap.c.

References filemap_t::array, filemap, filemap_list_to_array(), final_filemap_cmp(), filemap_t::narray, and qsort.

Referenced by main().

571 {
572  filemap_t *map = filemap;
573 
575  qsort(map->array, map->narray, sizeof(file_entry_t *),
577 }
static int final_filemap_cmp(const void *a, const void *b)
Definition: filemap.c:798
file_entry_t ** array
Definition: filemap.h:78
int narray
Definition: filemap.h:79
filemap_t * filemap
Definition: filemap.c:23
static void filemap_list_to_array(filemap_t *map)
Definition: filemap.c:546
Definition: filemap.h:41
#define qsort(a, b, c, d)
Definition: port.h:488

◆ print_filemap()

void print_filemap ( void  )

Definition at line 648 of file filemap.c.

References file_entry_t::action, action_to_str(), filemap_t::array, datapagemap::bitmapsize, datapagemap_print(), FILE_ACTION_NONE, filemap, i, filemap_t::narray, file_entry_t::pagemap, file_entry_t::path, pg_log_debug, and generate_unaccent_rules::stdout.

Referenced by main().

649 {
650  filemap_t *map = filemap;
651  file_entry_t *entry;
652  int i;
653 
654  for (i = 0; i < map->narray; i++)
655  {
656  entry = map->array[i];
657  if (entry->action != FILE_ACTION_NONE ||
658  entry->pagemap.bitmapsize > 0)
659  {
660  pg_log_debug("%s (%s)", entry->path,
661  action_to_str(entry->action));
662 
663  if (entry->pagemap.bitmapsize > 0)
664  datapagemap_print(&entry->pagemap);
665  }
666  }
667  fflush(stdout);
668 }
file_entry_t ** array
Definition: filemap.h:78
datapagemap_t pagemap
Definition: filemap.h:53
int narray
Definition: filemap.h:79
#define pg_log_debug(...)
Definition: logging.h:91
file_action_t action
Definition: filemap.h:46
filemap_t * filemap
Definition: filemap.c:23
static const char * action_to_str(file_action_t action)
Definition: filemap.c:580
void datapagemap_print(datapagemap_t *map)
Definition: datapagemap.c:117
int bitmapsize
Definition: datapagemap.h:18
char * path
Definition: filemap.h:43
int i
Definition: filemap.h:41

◆ process_block_change()

void process_block_change ( ForkNumber  forknum,
RelFileNode  rnode,
BlockNumber  blkno 
)

Definition at line 417 of file filemap.c.

References file_entry_t::action, filemap_t::array, Assert, datapagemap_add(), datasegpath(), FILE_ACTION_COPY, FILE_ACTION_COPY_TAIL, FILE_ACTION_CREATE, FILE_ACTION_NONE, FILE_ACTION_REMOVE, FILE_ACTION_TRUNCATE, filemap, file_entry_t::isrelfile, sort-test::key, filemap_t::narray, file_entry_t::pagemap, file_entry_t::path, path_cmp(), pfree(), and pg_fatal.

Referenced by extractPageInfo().

418 {
419  char *path;
421  file_entry_t *key_ptr;
422  file_entry_t *entry;
423  BlockNumber blkno_inseg;
424  int segno;
425  filemap_t *map = filemap;
426  file_entry_t **e;
427 
428  Assert(map->array);
429 
430  segno = blkno / RELSEG_SIZE;
431  blkno_inseg = blkno % RELSEG_SIZE;
432 
433  path = datasegpath(rnode, forknum, segno);
434 
435  key.path = (char *) path;
436  key_ptr = &key;
437 
438  e = bsearch(&key_ptr, map->array, map->narray, sizeof(file_entry_t *),
439  path_cmp);
440  if (e)
441  entry = *e;
442  else
443  entry = NULL;
444  pfree(path);
445 
446  if (entry)
447  {
448  Assert(entry->isrelfile);
449 
450  switch (entry->action)
451  {
452  case FILE_ACTION_NONE:
454  /* skip if we're truncating away the modified block anyway */
455  if ((blkno_inseg + 1) * BLCKSZ <= entry->newsize)
456  datapagemap_add(&entry->pagemap, blkno_inseg);
457  break;
458 
460 
461  /*
462  * skip the modified block if it is part of the "tail" that
463  * we're copying anyway.
464  */
465  if ((blkno_inseg + 1) * BLCKSZ <= entry->oldsize)
466  datapagemap_add(&entry->pagemap, blkno_inseg);
467  break;
468 
469  case FILE_ACTION_COPY:
470  case FILE_ACTION_REMOVE:
471  break;
472 
473  case FILE_ACTION_CREATE:
474  pg_fatal("unexpected page modification for directory or symbolic link \"%s\"", entry->path);
475  }
476  }
477  else
478  {
479  /*
480  * If we don't have any record of this file in the file map, it means
481  * that it's a relation that doesn't exist in the source system, and
482  * it was subsequently removed in the target system, too. We can
483  * safely ignore it.
484  */
485  }
486 }
void datapagemap_add(datapagemap_t *map, BlockNumber blkno)
Definition: datapagemap.c:32
file_entry_t ** array
Definition: filemap.h:78
#define pg_fatal(...)
Definition: pg_rewind.h:41
uint32 BlockNumber
Definition: block.h:31
datapagemap_t pagemap
Definition: filemap.h:53
int narray
Definition: filemap.h:79
static char * datasegpath(RelFileNode rnode, ForkNumber forknum, BlockNumber segno)
Definition: filemap.c:762
bool isrelfile
Definition: filemap.h:51
void pfree(void *pointer)
Definition: mcxt.c:1056
file_action_t action
Definition: filemap.h:46
filemap_t * filemap
Definition: filemap.c:23
#define Assert(condition)
Definition: c.h:739
char * path
Definition: filemap.h:43
e
Definition: preproc-init.c:82
Definition: filemap.h:41
static int path_cmp(const void *a, const void *b)
Definition: filemap.c:779

◆ process_source_file()

void process_source_file ( const char *  path,
file_type_t  type,
size_t  newsize,
const char *  link_target 
)

Definition at line 135 of file filemap.c.

References file_entry_t::action, generate_unaccent_rules::action, Assert, datapagemap::bitmap, datapagemap::bitmapsize, check_file_excluded(), datadir_target, FILE_ACTION_COPY, FILE_ACTION_COPY_TAIL, FILE_ACTION_CREATE, FILE_ACTION_NONE, FILE_ACTION_TRUNCATE, FILE_TYPE_DIRECTORY, FILE_TYPE_REGULAR, FILE_TYPE_SYMLINK, filemap, isRelDataFile(), file_entry_t::isrelfile, file_entry_t::link_target, lstat, MAXPGPATH, file_entry_t::newsize, file_entry_t::next, file_entry_t::oldsize, file_entry_t::pagemap, file_entry_t::path, pg_fatal, pg_malloc(), pg_str_endswith(), pg_strdup(), PG_TEMP_FILE_PREFIX, PG_TEMP_FILES_DIR, pgwin32_is_junction(), S_ISDIR, S_ISREG, snprintf, stat, file_entry_t::type, and generate_unaccent_rules::type.

Referenced by fetchSourceFileList(), and libpqProcessFileList().

137 {
138  bool exists;
139  char localpath[MAXPGPATH];
140  struct stat statbuf;
141  filemap_t *map = filemap;
143  size_t oldsize = 0;
144  file_entry_t *entry;
145 
146  Assert(map->array == NULL);
147 
148  /*
149  * Skip any files matching the exclusion filters. This has the effect to
150  * remove all those files on the target.
151  */
152  if (check_file_excluded(path, true))
153  return;
154 
155  /*
156  * Pretend that pg_wal is a directory, even if it's really a symlink. We
157  * don't want to mess with the symlink itself, nor complain if it's a
158  * symlink in source but not in target or vice versa.
159  */
160  if (strcmp(path, "pg_wal") == 0 && type == FILE_TYPE_SYMLINK)
162 
163  /*
164  * Skip temporary files, .../pgsql_tmp/... and .../pgsql_tmp.* in source.
165  * This has the effect that all temporary files in the destination will be
166  * removed.
167  */
168  if (strstr(path, "/" PG_TEMP_FILE_PREFIX) != NULL)
169  return;
170  if (strstr(path, "/" PG_TEMP_FILES_DIR "/") != NULL)
171  return;
172 
173  /*
174  * sanity check: a filename that looks like a data file better be a
175  * regular file
176  */
177  if (type != FILE_TYPE_REGULAR && isRelDataFile(path))
178  pg_fatal("data file \"%s\" in source is not a regular file", path);
179 
180  snprintf(localpath, sizeof(localpath), "%s/%s", datadir_target, path);
181 
182  /* Does the corresponding file exist in the target data dir? */
183  if (lstat(localpath, &statbuf) < 0)
184  {
185  if (errno != ENOENT)
186  pg_fatal("could not stat file \"%s\": %m",
187  localpath);
188 
189  exists = false;
190  }
191  else
192  exists = true;
193 
194  switch (type)
195  {
196  case FILE_TYPE_DIRECTORY:
197  if (exists && !S_ISDIR(statbuf.st_mode) && strcmp(path, "pg_wal") != 0)
198  {
199  /* it's a directory in source, but not in target. Strange.. */
200  pg_fatal("\"%s\" is not a directory", localpath);
201  }
202 
203  if (!exists)
204  action = FILE_ACTION_CREATE;
205  else
206  action = FILE_ACTION_NONE;
207  oldsize = 0;
208  break;
209 
210  case FILE_TYPE_SYMLINK:
211  if (exists &&
212 #ifndef WIN32
213  !S_ISLNK(statbuf.st_mode)
214 #else
215  !pgwin32_is_junction(localpath)
216 #endif
217  )
218  {
219  /*
220  * It's a symbolic link in source, but not in target.
221  * Strange..
222  */
223  pg_fatal("\"%s\" is not a symbolic link", localpath);
224  }
225 
226  if (!exists)
227  action = FILE_ACTION_CREATE;
228  else
229  action = FILE_ACTION_NONE;
230  oldsize = 0;
231  break;
232 
233  case FILE_TYPE_REGULAR:
234  if (exists && !S_ISREG(statbuf.st_mode))
235  pg_fatal("\"%s\" is not a regular file", localpath);
236 
237  if (!exists || !isRelDataFile(path))
238  {
239  /*
240  * File exists in source, but not in target. Or it's a
241  * non-data file that we have no special processing for. Copy
242  * it in toto.
243  *
244  * An exception: PG_VERSIONs should be identical, but avoid
245  * overwriting it for paranoia.
246  */
247  if (pg_str_endswith(path, "PG_VERSION"))
248  {
249  action = FILE_ACTION_NONE;
250  oldsize = statbuf.st_size;
251  }
252  else
253  {
254  action = FILE_ACTION_COPY;
255  oldsize = 0;
256  }
257  }
258  else
259  {
260  /*
261  * It's a data file that exists in both.
262  *
263  * If it's larger in target, we can truncate it. There will
264  * also be a WAL record of the truncation in the source
265  * system, so WAL replay would eventually truncate the target
266  * too, but we might as well do it now.
267  *
268  * If it's smaller in the target, it means that it has been
269  * truncated in the target, or enlarged in the source, or
270  * both. If it was truncated in the target, we need to copy
271  * the missing tail from the source system. If it was enlarged
272  * in the source system, there will be WAL records in the
273  * source system for the new blocks, so we wouldn't need to
274  * copy them here. But we don't know which scenario we're
275  * dealing with, and there's no harm in copying the missing
276  * blocks now, so do it now.
277  *
278  * If it's the same size, do nothing here. Any blocks modified
279  * in the target will be copied based on parsing the target
280  * system's WAL, and any blocks modified in the source will be
281  * updated after rewinding, when the source system's WAL is
282  * replayed.
283  */
284  oldsize = statbuf.st_size;
285  if (oldsize < newsize)
286  action = FILE_ACTION_COPY_TAIL;
287  else if (oldsize > newsize)
288  action = FILE_ACTION_TRUNCATE;
289  else
290  action = FILE_ACTION_NONE;
291  }
292  break;
293  }
294 
295  /* Create a new entry for this file */
296  entry = pg_malloc(sizeof(file_entry_t));
297  entry->path = pg_strdup(path);
298  entry->type = type;
299  entry->action = action;
300  entry->oldsize = oldsize;
301  entry->newsize = newsize;
302  entry->link_target = link_target ? pg_strdup(link_target) : NULL;
303  entry->next = NULL;
304  entry->pagemap.bitmap = NULL;
305  entry->pagemap.bitmapsize = 0;
306  entry->isrelfile = isRelDataFile(path);
307 
308  if (map->last)
309  {
310  map->last->next = entry;
311  map->last = entry;
312  }
313  else
314  map->first = map->last = entry;
315  map->nlist++;
316 }
char * datadir_target
Definition: pg_rewind.c:53
bool pg_str_endswith(const char *str, const char *end)
Definition: string.c:31
void * pg_malloc(size_t size)
Definition: fe_memutils.c:47
size_t newsize
Definition: filemap.h:50
#define PG_TEMP_FILES_DIR
Definition: pg_checksums.c:58
#define pg_fatal(...)
Definition: pg_rewind.h:41
char * bitmap
Definition: datapagemap.h:17
static bool check_file_excluded(const char *path, bool is_source)
Definition: filemap.c:492
datapagemap_t pagemap
Definition: filemap.h:53
file_type_t type
Definition: filemap.h:44
bool isrelfile
Definition: filemap.h:51
#define PG_TEMP_FILE_PREFIX
Definition: pg_checksums.c:59
#define MAXPGPATH
file_action_t action
Definition: filemap.h:46
char * link_target
Definition: filemap.h:56
struct file_entry_t * next
Definition: filemap.h:58
filemap_t * filemap
Definition: filemap.c:23
size_t oldsize
Definition: filemap.h:49
char * pg_strdup(const char *in)
Definition: fe_memutils.c:85
#define S_ISREG(m)
Definition: win32_port.h:299
#define stat(a, b)
Definition: win32_port.h:255
int bitmapsize
Definition: datapagemap.h:18
#define Assert(condition)
Definition: c.h:739
file_action_t
Definition: filemap.h:23
static bool isRelDataFile(const char *path)
Definition: filemap.c:679
char * path
Definition: filemap.h:43
#define S_ISDIR(m)
Definition: win32_port.h:296
#define lstat(path, sb)
Definition: win32_port.h:244
Definition: filemap.h:41
#define snprintf
Definition: port.h:192
bool pgwin32_is_junction(const char *path)

◆ process_target_file()

void process_target_file ( const char *  path,
file_type_t  type,
size_t  newsize,
const char *  link_target 
)

Definition at line 326 of file filemap.c.

References file_entry_t::action, filemap_t::array, Assert, datapagemap::bitmap, datapagemap::bitmapsize, datadir_target, FILE_ACTION_REMOVE, FILE_TYPE_DIRECTORY, FILE_TYPE_SYMLINK, filemap, filemap_list_to_array(), filemap_t::first, isRelDataFile(), file_entry_t::isrelfile, sort-test::key, filemap_t::last, file_entry_t::link_target, lstat, MAXPGPATH, filemap_t::narray, file_entry_t::newsize, file_entry_t::next, filemap_t::nlist, file_entry_t::oldsize, file_entry_t::pagemap, file_entry_t::path, path_cmp(), pg_fatal, pg_malloc(), pg_strdup(), qsort, snprintf, stat, file_entry_t::type, and generate_unaccent_rules::type.

Referenced by main().

328 {
329  bool exists;
330  char localpath[MAXPGPATH];
331  struct stat statbuf;
333  file_entry_t *key_ptr;
334  filemap_t *map = filemap;
335  file_entry_t *entry;
336 
337  /*
338  * Do not apply any exclusion filters here. This has advantage to remove
339  * from the target data folder all paths which have been filtered out from
340  * the source data folder when processing the source files.
341  */
342 
343  snprintf(localpath, sizeof(localpath), "%s/%s", datadir_target, path);
344  if (lstat(localpath, &statbuf) < 0)
345  {
346  if (errno != ENOENT)
347  pg_fatal("could not stat file \"%s\": %m",
348  localpath);
349 
350  exists = false;
351  }
352 
353  if (map->array == NULL)
354  {
355  /* on first call, initialize lookup array */
356  if (map->nlist == 0)
357  {
358  /* should not happen */
359  pg_fatal("source file list is empty");
360  }
361 
363 
364  Assert(map->array != NULL);
365 
366  qsort(map->array, map->narray, sizeof(file_entry_t *), path_cmp);
367  }
368 
369  /*
370  * Like in process_source_file, pretend that xlog is always a directory.
371  */
372  if (strcmp(path, "pg_wal") == 0 && type == FILE_TYPE_SYMLINK)
374 
375  key.path = (char *) path;
376  key_ptr = &key;
377  exists = (bsearch(&key_ptr, map->array, map->narray, sizeof(file_entry_t *),
378  path_cmp) != NULL);
379 
380  /* Remove any file or folder that doesn't exist in the source system. */
381  if (!exists)
382  {
383  entry = pg_malloc(sizeof(file_entry_t));
384  entry->path = pg_strdup(path);
385  entry->type = type;
386  entry->action = FILE_ACTION_REMOVE;
387  entry->oldsize = oldsize;
388  entry->newsize = 0;
389  entry->link_target = link_target ? pg_strdup(link_target) : NULL;
390  entry->next = NULL;
391  entry->pagemap.bitmap = NULL;
392  entry->pagemap.bitmapsize = 0;
393  entry->isrelfile = isRelDataFile(path);
394 
395  if (map->last == NULL)
396  map->first = entry;
397  else
398  map->last->next = entry;
399  map->last = entry;
400  map->nlist++;
401  }
402  else
403  {
404  /*
405  * We already handled all files that exist in the source system in
406  * process_source_file().
407  */
408  }
409 }
char * datadir_target
Definition: pg_rewind.c:53
file_entry_t * first
Definition: filemap.h:67
file_entry_t ** array
Definition: filemap.h:78
void * pg_malloc(size_t size)
Definition: fe_memutils.c:47
size_t newsize
Definition: filemap.h:50
#define pg_fatal(...)
Definition: pg_rewind.h:41
char * bitmap
Definition: datapagemap.h:17
datapagemap_t pagemap
Definition: filemap.h:53
int narray
Definition: filemap.h:79
file_type_t type
Definition: filemap.h:44
bool isrelfile
Definition: filemap.h:51
int nlist
Definition: filemap.h:69
#define MAXPGPATH
file_action_t action
Definition: filemap.h:46
char * link_target
Definition: filemap.h:56
struct file_entry_t * next
Definition: filemap.h:58
filemap_t * filemap
Definition: filemap.c:23
size_t oldsize
Definition: filemap.h:49
char * pg_strdup(const char *in)
Definition: fe_memutils.c:85
#define stat(a, b)
Definition: win32_port.h:255
int bitmapsize
Definition: datapagemap.h:18
#define Assert(condition)
Definition: c.h:739
static bool isRelDataFile(const char *path)
Definition: filemap.c:679
char * path
Definition: filemap.h:43
static void filemap_list_to_array(filemap_t *map)
Definition: filemap.c:546
#define lstat(path, sb)
Definition: win32_port.h:244
file_entry_t * last
Definition: filemap.h:68
Definition: filemap.h:41
static int path_cmp(const void *a, const void *b)
Definition: filemap.c:779
#define qsort(a, b, c, d)
Definition: port.h:488
#define snprintf
Definition: port.h:192

Variable Documentation

◆ filemap