Changeset 203 for trunk/lib


Ignore:
Timestamp:
08/21/10 12:53:19 (14 years ago)
Author:
tim
Message:

misc fixes

stripped _REC from some data type names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/regfi.c

    r202 r203  
    833833  }
    834834  else if(buf[0] == 'l' && buf[1] == 'i')
     835  {
    835836    elem_size = sizeof(uint32_t);
     837  }
    836838  else if((buf[0] == 'l') && (buf[1] == 'f' || buf[1] == 'h'))
    837839    elem_size = sizeof(REGFI_SUBKEY_LIST_ELEM);
     
    973975 *
    974976 ******************************************************************************/
    975 REGFI_SK_REC* regfi_parse_sk(REGFI_FILE* file, uint32_t offset, uint32_t max_size,
     977REGFI_SK* regfi_parse_sk(REGFI_FILE* file, uint32_t offset, uint32_t max_size,
    976978                             bool strict)
    977979{
    978   REGFI_SK_REC* ret_val = NULL;
     980  REGFI_SK* ret_val = NULL;
    979981  uint8_t* sec_desc_buf = NULL;
    980982  uint32_t cell_length, length;
     
    10001002  }
    10011003
    1002   ret_val = talloc(NULL, REGFI_SK_REC);
     1004  ret_val = talloc(NULL, REGFI_SK);
    10031005  if(ret_val == NULL)
    10041006    goto fail_locked;
     
    11741176
    11751177
    1176 void regfi_interpret_valuename(REGFI_FILE* file, REGFI_VK_REC* vk,
     1178void regfi_interpret_valuename(REGFI_FILE* file, REGFI_VK* vk,
    11771179                               REGFI_ENCODING output_encoding, bool strict)
    11781180{
     
    12241226/******************************************************************************
    12251227 ******************************************************************************/
    1226 REGFI_VK_REC* regfi_load_value(REGFI_FILE* file, uint32_t offset,
     1228REGFI_VK* regfi_load_value(REGFI_FILE* file, uint32_t offset,
    12271229                               REGFI_ENCODING output_encoding, bool strict)
    12281230{
    1229   REGFI_VK_REC* ret_val = NULL;
     1231  REGFI_VK* ret_val = NULL;
    12301232  int32_t max_size;
    12311233
     
    12701272
    12711273
    1272 void regfi_interpret_keyname(REGFI_FILE* file, REGFI_NK_REC* nk,
     1274void regfi_interpret_keyname(REGFI_FILE* file, REGFI_NK* nk,
    12731275                             REGFI_ENCODING output_encoding, bool strict)
    12741276{
     
    13191321 *
    13201322 ******************************************************************************/
    1321 REGFI_NK_REC* regfi_load_key(REGFI_FILE* file, uint32_t offset,
     1323REGFI_NK* regfi_load_key(REGFI_FILE* file, uint32_t offset,
    13221324                             REGFI_ENCODING output_encoding, bool strict)
    13231325{
    1324   REGFI_NK_REC* nk;
     1326  REGFI_NK* nk;
    13251327  uint32_t off;
    13261328  int32_t max_size;
     
    14101412/******************************************************************************
    14111413 ******************************************************************************/
    1412 const REGFI_SK_REC* regfi_load_sk(REGFI_FILE* file, uint32_t offset, bool strict)
    1413 {
    1414   REGFI_SK_REC* ret_val = NULL;
     1414const REGFI_SK* regfi_load_sk(REGFI_FILE* file, uint32_t offset, bool strict)
     1415{
     1416  REGFI_SK* ret_val = NULL;
    14151417  int32_t max_size;
    14161418  void* failure_ptr = NULL;
     
    14271429
    14281430  /* First look if we have already parsed it */
    1429   ret_val = (REGFI_SK_REC*)lru_cache_find(file->sk_cache, &offset, 4);
     1431  ret_val = (REGFI_SK*)lru_cache_find(file->sk_cache, &offset, 4);
    14301432
    14311433  /* Bail out if we have previously cached a parse failure at this offset. */
     
    14631465/******************************************************************************
    14641466 ******************************************************************************/
    1465 REGFI_NK_REC* regfi_find_root_nk(REGFI_FILE* file, const REGFI_HBIN* hbin,
     1467REGFI_NK* regfi_find_root_nk(REGFI_FILE* file, const REGFI_HBIN* hbin,
    14661468                                 REGFI_ENCODING output_encoding)
    14671469{
    1468   REGFI_NK_REC* nk = NULL;
     1470  REGFI_NK* nk = NULL;
    14691471  uint32_t cell_length;
    14701472  uint32_t cur_offset = hbin->file_off+REGFI_HBIN_HEADER_SIZE;
     
    15761578
    15771579  /* Read file header */
    1578   if ((rb = regfi_parse_regf(file_cb, false)) == NULL) 
     1580  if ((rb = regfi_parse_regf(file_cb, false)) == NULL)
    15791581  {
    15801582    regfi_log_add(REGFI_LOG_ERROR, "Failed to read REGF block.");
    15811583    return NULL;
    15821584  }
    1583   rb->file_length = file_length; 
     1585  rb->file_length = file_length;
    15841586  rb->cb = file_cb;
    15851587
     
    16621664 * rest of the file if that fails.
    16631665 ******************************************************************************/
    1664 REGFI_NK_REC* regfi_rootkey(REGFI_FILE* file, REGFI_ENCODING output_encoding)
    1665 {
    1666   REGFI_NK_REC* nk = NULL;
     1666REGFI_NK* regfi_rootkey(REGFI_FILE* file, REGFI_ENCODING output_encoding)
     1667{
     1668  REGFI_NK* nk = NULL;
    16671669  REGFI_HBIN* hbin;
    16681670  uint32_t root_offset, i, num_hbins;
     
    17181720                                   REGFI_ENCODING output_encoding)
    17191721{
    1720   REGFI_NK_REC* root;
     1722  REGFI_NK* root;
    17211723  REGFI_ITERATOR* ret_val;
    17221724
     
    17731775bool regfi_iterator_down(REGFI_ITERATOR* i)
    17741776{
    1775   REGFI_NK_REC* subkey;
     1777  REGFI_NK* subkey;
    17761778  REGFI_ITER_POSITION* pos;
    17771779
     
    17801782    return false;
    17811783
    1782   subkey = (REGFI_NK_REC*)regfi_iterator_cur_subkey(i);
     1784  subkey = (REGFI_NK*)regfi_iterator_cur_subkey(i);
    17831785  if(subkey == NULL)
    17841786  {
     
    18401842bool regfi_iterator_find_subkey(REGFI_ITERATOR* i, const char* subkey_name)
    18411843{
    1842   REGFI_NK_REC* subkey;
     1844  REGFI_NK* subkey;
    18431845  bool found = false;
    18441846  uint32_t old_subkey = i->cur_subkey;
     
    18991901/******************************************************************************
    19001902 *****************************************************************************/
    1901 const REGFI_NK_REC* regfi_iterator_cur_key(REGFI_ITERATOR* i)
     1903const REGFI_NK* regfi_iterator_cur_key(REGFI_ITERATOR* i)
    19021904{
    19031905  return i->cur_key;
     
    19071909/******************************************************************************
    19081910 *****************************************************************************/
    1909 const REGFI_SK_REC* regfi_iterator_cur_sk(REGFI_ITERATOR* i)
     1911const REGFI_SK* regfi_iterator_cur_sk(REGFI_ITERATOR* i)
    19101912{
    19111913  if(i->cur_key == NULL || i->cur_key->sk_off == REGFI_OFFSET_NONE)
     
    19291931/******************************************************************************
    19301932 *****************************************************************************/
    1931 const REGFI_NK_REC* regfi_iterator_cur_subkey(REGFI_ITERATOR* i)
     1933const REGFI_NK* regfi_iterator_cur_subkey(REGFI_ITERATOR* i)
    19321934{
    19331935  uint32_t nk_offset;
     
    19611963bool regfi_iterator_find_value(REGFI_ITERATOR* i, const char* value_name)
    19621964{
    1963   const REGFI_VK_REC* cur;
     1965  const REGFI_VK* cur;
    19641966  bool found = false;
    19651967  uint32_t old_value = i->cur_value;
     
    20072009/******************************************************************************
    20082010 *****************************************************************************/
    2009 const REGFI_VK_REC* regfi_iterator_cur_value(REGFI_ITERATOR* i)
    2010 {
    2011   REGFI_VK_REC* ret_val = NULL;
     2011const REGFI_VK* regfi_iterator_cur_value(REGFI_ITERATOR* i)
     2012{
     2013  REGFI_VK* ret_val = NULL;
    20122014  uint32_t voffset;
    20132015
     
    20372039 *****************************************************************************/
    20382040const REGFI_CLASSNAME* regfi_iterator_fetch_classname(REGFI_ITERATOR* i,
    2039                                                       const REGFI_NK_REC* key)
     2041                                                      const REGFI_NK* key)
    20402042{
    20412043  REGFI_CLASSNAME* ret_val;
     
    21012103 *****************************************************************************/
    21022104const REGFI_DATA* regfi_iterator_fetch_data(REGFI_ITERATOR* i,
    2103                                             const REGFI_VK_REC* value)
     2105                                            const REGFI_VK* value)
    21042106{
    21052107  REGFI_DATA* ret_val = NULL;
     
    25652567/*******************************************************************
    25662568 *******************************************************************/
    2567 REGFI_NK_REC* regfi_parse_nk(REGFI_FILE* file, uint32_t offset,
    2568                              uint32_t max_size, bool strict)
     2569REGFI_NK* regfi_parse_nk(REGFI_FILE* file, uint32_t offset,
     2570                         uint32_t max_size, bool strict)
    25692571{
    25702572  uint8_t nk_header[REGFI_NK_MIN_LENGTH];
    2571   REGFI_NK_REC* ret_val;
     2573  REGFI_NK* ret_val;
    25722574  uint32_t length,cell_length;
    25732575  bool unalloc = false;
    25742576
    2575   ret_val = talloc(NULL, REGFI_NK_REC);
     2577  ret_val = talloc(NULL, REGFI_NK);
    25762578  if(ret_val == NULL)
    25772579  {
     
    27842786/******************************************************************************
    27852787*******************************************************************************/
    2786 REGFI_VK_REC* regfi_parse_vk(REGFI_FILE* file, uint32_t offset,
     2788REGFI_VK* regfi_parse_vk(REGFI_FILE* file, uint32_t offset,
    27872789                             uint32_t max_size, bool strict)
    27882790{
    2789   REGFI_VK_REC* ret_val;
     2791  REGFI_VK* ret_val;
    27902792  uint8_t vk_header[REGFI_VK_MIN_LENGTH];
    27912793  uint32_t raw_data_size, length, cell_length;
    27922794  bool unalloc = false;
    27932795
    2794   ret_val = talloc(NULL, REGFI_VK_REC);
     2796  ret_val = talloc(NULL, REGFI_VK);
    27952797  if(ret_val == NULL)
    27962798    goto fail;
Note: See TracChangeset for help on using the changeset viewer.