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 625 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().

626 {
627  file_entry_t *entry;
628  int i;
629  filemap_t *map = filemap;
630 
631  map->total_size = 0;
632  map->fetch_size = 0;
633 
634  for (i = 0; i < map->narray; i++)
635  {
636  entry = map->array[i];
637 
638  if (entry->type != FILE_TYPE_REGULAR)
639  continue;
640 
641  map->total_size += entry->newsize;
642 
643  if (entry->action == FILE_ACTION_COPY)
644  {
645  map->fetch_size += entry->newsize;
646  continue;
647  }
648 
649  if (entry->action == FILE_ACTION_COPY_TAIL)
650  map->fetch_size += (entry->newsize - entry->oldsize);
651 
652  if (entry->pagemap.bitmapsize > 0)
653  {
655  BlockNumber blk;
656 
657  iter = datapagemap_iterate(&entry->pagemap);
658  while (datapagemap_next(iter, &blk))
659  map->fetch_size += BLCKSZ;
660 
661  pg_free(iter);
662  }
663  }
664 }
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 127 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().

128 {
129  filemap_t *map;
130 
131  map = pg_malloc(sizeof(filemap_t));
132  map->first = map->last = NULL;
133  map->nlist = 0;
134  map->array = NULL;
135  map->narray = 0;
136 
137  Assert(filemap == NULL);
138  filemap = map;
139 }
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:738
file_entry_t * last
Definition: filemap.h:68

◆ filemap_finalize()

void filemap_finalize ( void  )

Definition at line 589 of file filemap.c.

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

Referenced by main().

590 {
591  filemap_t *map = filemap;
592 
594  qsort(map->array, map->narray, sizeof(file_entry_t *),
596 }
static int final_filemap_cmp(const void *a, const void *b)
Definition: filemap.c:817
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:565
Definition: filemap.h:41
#define qsort(a, b, c, d)
Definition: port.h:478

◆ print_filemap()

void print_filemap ( void  )

Definition at line 667 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().

668 {
669  filemap_t *map = filemap;
670  file_entry_t *entry;
671  int i;
672 
673  for (i = 0; i < map->narray; i++)
674  {
675  entry = map->array[i];
676  if (entry->action != FILE_ACTION_NONE ||
677  entry->pagemap.bitmapsize > 0)
678  {
679  pg_log_debug("%s (%s)", entry->path,
680  action_to_str(entry->action));
681 
682  if (entry->pagemap.bitmapsize > 0)
683  datapagemap_print(&entry->pagemap);
684  }
685  }
686  fflush(stdout);
687 }
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:599
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 431 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().

432 {
433  char *path;
435  file_entry_t *key_ptr;
436  file_entry_t *entry;
437  BlockNumber blkno_inseg;
438  int segno;
439  filemap_t *map = filemap;
440  file_entry_t **e;
441 
442  Assert(map->array);
443 
444  segno = blkno / RELSEG_SIZE;
445  blkno_inseg = blkno % RELSEG_SIZE;
446 
447  path = datasegpath(rnode, forknum, segno);
448 
449  key.path = (char *) path;
450  key_ptr = &key;
451 
452  e = bsearch(&key_ptr, map->array, map->narray, sizeof(file_entry_t *),
453  path_cmp);
454  if (e)
455  entry = *e;
456  else
457  entry = NULL;
458  pfree(path);
459 
460  if (entry)
461  {
462  Assert(entry->isrelfile);
463 
464  switch (entry->action)
465  {
466  case FILE_ACTION_NONE:
468  /* skip if we're truncating away the modified block anyway */
469  if ((blkno_inseg + 1) * BLCKSZ <= entry->newsize)
470  datapagemap_add(&entry->pagemap, blkno_inseg);
471  break;
472 
474 
475  /*
476  * skip the modified block if it is part of the "tail" that
477  * we're copying anyway.
478  */
479  if ((blkno_inseg + 1) * BLCKSZ <= entry->oldsize)
480  datapagemap_add(&entry->pagemap, blkno_inseg);
481  break;
482 
483  case FILE_ACTION_COPY:
484  case FILE_ACTION_REMOVE:
485  break;
486 
487  case FILE_ACTION_CREATE:
488  pg_fatal("unexpected page modification for directory or symbolic link \"%s\"", entry->path);
489  }
490  }
491  else
492  {
493  /*
494  * If we don't have any record of this file in the file map, it means
495  * that it's a relation that doesn't exist in the source system, and
496  * it was subsequently removed in the target system, too. We can
497  * safely ignore it.
498  */
499  }
500 }
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:781
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:738
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:798

◆ process_source_file()

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

Definition at line 149 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().

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

342 {
343  bool exists;
344  char localpath[MAXPGPATH];
345  struct stat statbuf;
347  file_entry_t *key_ptr;
348  filemap_t *map = filemap;
349  file_entry_t *entry;
350 
351  /*
352  * Do not apply any exclusion filters here. This has advantage to remove
353  * from the target data folder all paths which have been filtered out from
354  * the source data folder when processing the source files.
355  */
356 
357  snprintf(localpath, sizeof(localpath), "%s/%s", datadir_target, path);
358  if (lstat(localpath, &statbuf) < 0)
359  {
360  if (errno != ENOENT)
361  pg_fatal("could not stat file \"%s\": %m",
362  localpath);
363 
364  exists = false;
365  }
366 
367  if (map->array == NULL)
368  {
369  /* on first call, initialize lookup array */
370  if (map->nlist == 0)
371  {
372  /* should not happen */
373  pg_fatal("source file list is empty");
374  }
375 
377 
378  Assert(map->array != NULL);
379 
380  qsort(map->array, map->narray, sizeof(file_entry_t *), path_cmp);
381  }
382 
383  /*
384  * Like in process_source_file, pretend that xlog is always a directory.
385  */
386  if (strcmp(path, "pg_wal") == 0 && type == FILE_TYPE_SYMLINK)
388 
389  key.path = (char *) path;
390  key_ptr = &key;
391  exists = (bsearch(&key_ptr, map->array, map->narray, sizeof(file_entry_t *),
392  path_cmp) != NULL);
393 
394  /* Remove any file or folder that doesn't exist in the source system. */
395  if (!exists)
396  {
397  entry = pg_malloc(sizeof(file_entry_t));
398  entry->path = pg_strdup(path);
399  entry->type = type;
400  entry->action = FILE_ACTION_REMOVE;
401  entry->oldsize = oldsize;
402  entry->newsize = 0;
403  entry->link_target = link_target ? pg_strdup(link_target) : NULL;
404  entry->next = NULL;
405  entry->pagemap.bitmap = NULL;
406  entry->pagemap.bitmapsize = 0;
407  entry->isrelfile = isRelDataFile(path);
408 
409  if (map->last == NULL)
410  map->first = entry;
411  else
412  map->last->next = entry;
413  map->last = entry;
414  map->nlist++;
415  }
416  else
417  {
418  /*
419  * We already handled all files that exist in the source system in
420  * process_source_file().
421  */
422  }
423 }
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:738
static bool isRelDataFile(const char *path)
Definition: filemap.c:698
char * path
Definition: filemap.h:43
static void filemap_list_to_array(filemap_t *map)
Definition: filemap.c:565
#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:798
#define qsort(a, b, c, d)
Definition: port.h:478
#define snprintf
Definition: port.h:192

Variable Documentation

◆ filemap