Changeset 145 for trunk/include/regfi.h


Ignore:
Timestamp:
02/15/09 18:36:20 (15 years ago)
Author:
tim
Message:

decoupled value parsing from key parsing

moved linking of value records and data records up to the load layer

rewrote key/value/data linking algorithm in reglookup-recover which improved recovery results

fixed a NULL pointer dereference in range_list.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/regfi.h

    r143 r145  
    191191
    192192
    193 typedef struct
     193typedef struct _regfi_subkey_list
    194194{
    195195  /* Real offset of this record's cell in the file */
     
    210210  bool recursive_type; 
    211211} REGFI_SUBKEY_LIST;
     212
     213
     214typedef uint32 REGFI_VALUE_LIST_ELEM;
     215typedef struct _regfi_value_list
     216{
     217  /* Actual number of values referenced by this list. 
     218   * May differ from parent key's num_values if there were parsing errors.
     219   */
     220  uint32 num_values;
     221
     222  REGFI_VALUE_LIST_ELEM* elements;
     223} REGFI_VALUE_LIST;
    212224
    213225
     
    269281
    270282  /* link in the other records here */
    271   REGFI_VK_REC** values;
     283  REGFI_VALUE_LIST* values;
    272284  REGFI_SUBKEY_LIST* subkeys;
    273285 
     
    427439/* Middle-layer structure caching, loading, and linking */
    428440/********************************************************/
    429 REGFI_HBIN*           regfi_lookup_hbin(REGFI_FILE* file, uint32 offset);
     441REGFI_HBIN*           regfi_lookup_hbin(REGFI_FILE* file, uint32 voffset);
    430442REGFI_NK_REC*         regfi_load_key(REGFI_FILE* file, uint32 offset,
    431443                                     bool strict);
     
    433445                                            uint32 num_keys, uint32 max_size,
    434446                                            bool strict);
    435 REGFI_VK_REC**        regfi_load_valuelist(REGFI_FILE* file, uint32 offset,
     447REGFI_VK_REC*         regfi_load_value(REGFI_FILE* file, uint32 offset,
     448                                       bool strict);
     449REGFI_VALUE_LIST*     regfi_load_valuelist(REGFI_FILE* file, uint32 offset,
    436450                                           uint32 num_values, uint32 max_size,
    437451                                           bool strict);
     
    465479                                     uint32 max_size, bool strict);
    466480
    467 uint8*                regfi_parse_data(REGFI_FILE* file, uint32 offset,
     481uint8*                regfi_parse_data(REGFI_FILE* file,
     482                                       uint32 data_type, uint32 offset,
    468483                                       uint32 length, uint32 max_size,
    469                                        bool strict);
     484                                       bool data_in_offset, bool strict);
    470485
    471486REGFI_SK_REC*         regfi_parse_sk(REGFI_FILE* file, uint32 offset,
Note: See TracChangeset for help on using the changeset viewer.