filehash/ffdb_hash.c
static void
_ffdb_swap_header_copy(ffdb_hashhdr_t* srcp, ffdb_hashhdr_t* destp)
{
  int i;

  P_32_COPY(srcp->magic, destp->magic);
  P_32_COPY(srcp->version, destp->version);
  P_32_COPY(srcp->lorder, destp->lorder);
  P_32_COPY(srcp->bsize, destp->bsize);
  P_32_COPY(srcp->bshift, destp->bshift);
  P_32_COPY(srcp->ovfl_point, destp->ovfl_point);
  P_32_COPY(srcp->max_bucket, destp->max_bucket);
  P_32_COPY(srcp->high_mask, destp->high_mask);
  P_32_COPY(srcp->low_mask, destp->low_mask);
  P_32_COPY(srcp->ffactor, destp->ffactor);
  P_32_COPY(srcp->nkeys, destp->nkeys);
  P_32_COPY(srcp->hdrpages, destp->hdrpages);
  P_32_COPY(srcp->uinfolen, destp->uinfolen);
  P_16_COPY(srcp->uinfo_page, destp->uinfo_page);
  P_16_COPY(srcp->uinfo_npages, destp->uinfo_npages);
  P_16_COPY(srcp->cfig_page, destp->cfig_page);
  P_16_COPY(srcp->cfig_npages, destp->cfig_npages);
  P_32_COPY(srcp->num_cfigs, destp->num_cfigs);
  P_32_COPY(srcp->h_charkey, destp->h_charkey);
  P_32_COPY(srcp->num_moved_pages, destp->num_moved_pages);
  for (i = 0; i < NCACHED; i++) 
    P_32_COPY(srcp->spares[i], destp->spares[i]);
  for (i = 0; i < NCACHED; i++) 
    P_32_COPY(srcp->free_pages[i], destp->free_pages[i]);
  P_32_COPY(srcp->chksum, destp->chksum);
}
/*
 * Hashp->hdr needs to be byteswapped.
 */
Hashp->hdr needs to be byteswapped.
Hashp - > hdr needs to be byteswapped .
static void
_ffdb_swap_header_copy(ffdb_hashhdr_t* srcp, ffdb_hashhdr_t* destp)
{
  int i;
  P_32_COPY(srcp->magic, destp->magic);
  P_32_COPY(srcp->version, destp->version);
  P_32_COPY(srcp->lorder, destp->lorder);
  P_32_COPY(srcp->bsize, destp->bsize);
  P_32_COPY(srcp->bshift, destp->bshift);
  P_32_COPY(srcp->ovfl_point, destp->ovfl_point);
  P_32_COPY(srcp->max_bucket, destp->max_bucket);
  P_32_COPY(srcp->high_mask, destp->high_mask);
  P_32_COPY(srcp->low_mask, destp->low_mask);
  P_32_COPY(srcp->ffactor, destp->ffactor);
  P_32_COPY(srcp->nkeys, destp->nkeys);
  P_32_COPY(srcp->hdrpages, destp->hdrpages);
  P_32_COPY(srcp->uinfolen, destp->uinfolen);
  P_16_COPY(srcp->uinfo_page, destp->uinfo_page);
  P_16_COPY(srcp->uinfo_npages, destp->uinfo_npages);
  P_16_COPY(srcp->cfig_page, destp->cfig_page);
  P_16_COPY(srcp->cfig_npages, destp->cfig_npages);
  P_32_COPY(srcp->num_cfigs, destp->num_cfigs);
  P_32_COPY(srcp->h_charkey, destp->h_charkey);
  P_32_COPY(srcp->num_moved_pages, destp->num_moved_pages);
  for (i = 0; i < NCACHED; i++) 
    P_32_COPY(srcp->spares[i], destp->spares[i]);
  for (i = 0; i < NCACHED; i++) 
    P_32_COPY(srcp->free_pages[i], destp->free_pages[i]);
  P_32_COPY(srcp->chksum, destp->chksum);
}
static void _ffdb_swap_header_copy ( ffdb_hashhdr_t * srcp , ffdb_hashhdr_t * destp ) { int i ; P_32_COPY ( srcp -> magic , destp -> magic ) ; P_32_COPY ( srcp -> version , destp -> version ) ; P_32_COPY ( srcp -> lorder , destp -> lorder ) ; P_32_COPY ( srcp -> bsize , destp -> bsize ) ; P_32_COPY ( srcp -> bshift , destp -> bshift ) ; P_32_COPY ( srcp -> ovfl_point , destp -> ovfl_point ) ; P_32_COPY ( srcp -> max_bucket , destp -> max_bucket ) ; P_32_COPY ( srcp -> high_mask , destp -> high_mask ) ; P_32_COPY ( srcp -> low_mask , destp -> low_mask ) ; P_32_COPY ( srcp -> ffactor , destp -> ffactor ) ; P_32_COPY ( srcp -> nkeys , destp -> nkeys ) ; P_32_COPY ( srcp -> hdrpages , destp -> hdrpages ) ; P_32_COPY ( srcp -> uinfolen , destp -> uinfolen ) ; P_16_COPY ( srcp -> uinfo_page , destp -> uinfo_page ) ; P_16_COPY ( srcp -> uinfo_npages , destp -> uinfo_npages ) ; P_16_COPY ( srcp -> cfig_page , destp -> cfig_page ) ; P_16_COPY ( srcp -> cfig_npages , destp -> cfig_npages ) ; P_32_COPY ( srcp -> num_cfigs , destp -> num_cfigs ) ; P_32_COPY ( srcp -> h_charkey , destp -> h_charkey ) ; P_32_COPY ( srcp -> num_moved_pages , destp -> num_moved_pages ) ; for ( i = 0 ; i < NCACHED ; i ++ ) P_32_COPY ( srcp -> spares [ i ] , destp -> spares [ i ] ) ; for ( i = 0 ; i < NCACHED ; i ++ ) P_32_COPY ( srcp -> free_pages [ i ] , destp -> free_pages [ i ] ) ; P_32_COPY ( srcp -> chksum , destp -> chksum ) ; }
Hashp->hdr needs to be byteswapped.
Hashp - > hdr needs to be byteswapped .