- Timestamp:
- 03/27/11 21:46:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/regfi.c
r213 r215 1670 1670 * rest of the file if that fails. 1671 1671 ******************************************************************************/ 1672 REGFI_NK* regfi_rootkey(REGFI_FILE* file)1672 const REGFI_NK* regfi_get_rootkey(REGFI_FILE* file) 1673 1673 { 1674 1674 REGFI_NK* nk = NULL; … … 1695 1695 */ 1696 1696 1697 if(!regfi_read_lock(file, &file->hbins_lock, "regfi_ rootkey"))1697 if(!regfi_read_lock(file, &file->hbins_lock, "regfi_get_rootkey")) 1698 1698 return NULL; 1699 1699 … … 1705 1705 } 1706 1706 1707 if(!regfi_rw_unlock(file, &file->hbins_lock, "regfi_ rootkey"))1707 if(!regfi_rw_unlock(file, &file->hbins_lock, "regfi_get_rootkey")) 1708 1708 return NULL; 1709 1709 … … 1727 1727 { 1728 1728 uint32_t num_in_list = 0; 1729 if(key == NULL) 1730 return 0; 1731 1729 1732 if(key->subkeys != NULL) 1730 1733 num_in_list = key->subkeys->num_keys; … … 1747 1750 { 1748 1751 uint32_t num_in_list = 0; 1752 if(key == NULL) 1753 return 0; 1754 1749 1755 if(key->values != NULL) 1750 1756 num_in_list = key->values->num_values; … … 1773 1779 return NULL; 1774 1780 1775 root = regfi_rootkey(file);1781 root = (REGFI_NK*)regfi_get_rootkey(file); 1776 1782 if(root == NULL) 1777 1783 { … … 1906 1912 1907 1913 if(path[x] == NULL) 1914 { 1908 1915 return true; 1909 1916 } 1917 1910 1918 /* XXX: is this the right number of times? */ 1911 1919 for(; x > 0; x--) … … 2212 2220 2213 2221 2214 2215 2222 /****************************************************************************** 2216 2223 *****************************************************************************/ … … 2227 2234 return NULL; 2228 2235 } 2236 2237 2238 2239 /****************************************************************************** 2240 *****************************************************************************/ 2241 const REGFI_NK* regfi_get_parentkey(REGFI_FILE* file, const REGFI_NK* key) 2242 { 2243 if(key != NULL && key->parent_off != REGFI_OFFSET_NONE) 2244 { 2245 /* fprintf(stderr, "key->parent_off=%.8X\n", key->parent_off);*/ 2246 return regfi_load_key(file, 2247 key->parent_off+REGFI_REGF_SIZE, 2248 file->string_encoding, true); 2249 } 2250 2251 return NULL; 2252 } 2253 2229 2254 2230 2255
Note: See TracChangeset
for help on using the changeset viewer.