filehash/ffdb_hash.c
static int
_ffdb_read_user_info (ffdb_htab_t *hashp)
{
  unsigned short i;
  void *mem;
  pgno_t tpage = INVALID_PGNO;
  int   dirty = 0;
  unsigned int flags = 0;
  pgno_t start = hashp->hdr.uinfo_page;
  unsigned short npages = hashp->hdr.uinfo_npages;

  if (hashp->new_file) {
    for (i = 0; i < npages; i++)
      ffdb_new_page (hashp, start + i, HASH_UINFO_PAGE);
  }

  if (hashp->save_file) {
    flags = FFDB_PAGE_DIRTY | FFDB_PAGE_LOCKED;
    dirty = 1;
  }

  for (i = 0; i < npages; i++) {
    mem = ffdb_get_page (hashp, start + i, HASH_UINFO_PAGE,
			 flags, &tpage);
    ffdb_put_page (hashp, mem, HASH_UINFO_PAGE, dirty);
  }
  return 0;
}
/**
 * Read in pages containing user information and configuration information
 */
Read in pages containing user information and configuration information
Read in pages containing user information and configuration information
static int
_ffdb_read_user_info (ffdb_htab_t *hashp)
{
  unsigned short i;
  void *mem;
  pgno_t tpage = INVALID_PGNO;
  int   dirty = 0;
  unsigned int flags = 0;
  pgno_t start = hashp->hdr.uinfo_page;
  unsigned short npages = hashp->hdr.uinfo_npages;
  if (hashp->new_file) {
    for (i = 0; i < npages; i++)
      ffdb_new_page (hashp, start + i, HASH_UINFO_PAGE);
  }
  if (hashp->save_file) {
    flags = FFDB_PAGE_DIRTY | FFDB_PAGE_LOCKED;
    dirty = 1;
  }
  for (i = 0; i < npages; i++) {
    mem = ffdb_get_page (hashp, start + i, HASH_UINFO_PAGE,
			 flags, &tpage);
    ffdb_put_page (hashp, mem, HASH_UINFO_PAGE, dirty);
  }
  return 0;
}
static int _ffdb_read_user_info ( ffdb_htab_t * hashp ) { unsigned short i ; void * mem ; pgno_t tpage = INVALID_PGNO ; int dirty = 0 ; unsigned int flags = 0 ; pgno_t start = hashp -> hdr . uinfo_page ; unsigned short npages = hashp -> hdr . uinfo_npages ; if ( hashp -> new_file ) { for ( i = 0 ; i < npages ; i ++ ) ffdb_new_page ( hashp , start + i , HASH_UINFO_PAGE ) ; } if ( hashp -> save_file ) { flags = FFDB_PAGE_DIRTY | FFDB_PAGE_LOCKED ; dirty = 1 ; } for ( i = 0 ; i < npages ; i ++ ) { mem = ffdb_get_page ( hashp , start + i , HASH_UINFO_PAGE , flags , & tpage ) ; ffdb_put_page ( hashp , mem , HASH_UINFO_PAGE , dirty ) ; } return 0 ; }
Read in pages containing user information and configuration information
Read in pages containing user information and configuration information