Changeset 172 for trunk/src/reglookup-recover.c
- Timestamp:
- 03/07/10 22:04:34 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/reglookup-recover.c
r168 r172 79 79 strftime(mtime, sizeof(mtime), "%Y-%m-%d %H:%M:%S", tmp_time_s); 80 80 81 quoted_name = quote_string(nk->keyname, key_special_chars); 81 /* XXX: Add command line option to choose output encoding */ 82 regfi_interpret_keyname(f, nk, REGFI_ENCODING_ASCII, true); 83 84 quoted_name = get_quoted_keyname(nk); 82 85 if (quoted_name == NULL) 83 86 { … … 104 107 105 108 106 void printValue(REGFI_FILE* f, constREGFI_VK_REC* vk, const char* prefix)109 void printValue(REGFI_FILE* f, REGFI_VK_REC* vk, const char* prefix) 107 110 { 108 111 char* quoted_value = NULL; … … 112 115 const char* str_type = NULL; 113 116 114 quoted_name = quote_string(vk->valuename, key_special_chars); 117 /* XXX: Add command line option to choose output encoding */ 118 regfi_interpret_valuename(f, vk, REGFI_ENCODING_ASCII, true); 119 120 quoted_name = get_quoted_valuename(vk); 115 121 if (quoted_name == NULL) 116 122 { /* Value names are NULL when we're looking at the "(default)" value. … … 120 126 * this value. 121 127 */ 122 quoted_name = malloc(1*sizeof(char));128 quoted_name = strdup(""); 123 129 if(quoted_name == NULL) 124 130 bailOut(REGLOOKUP_EXIT_OSERR, "ERROR: Could not allocate sufficient memory.\n"); 125 quoted_name[0] = '\0';126 } 131 } 132 127 133 /* XXX: Add command line option to choose output encoding */ 128 134 if(vk->data != NULL … … 278 284 path_element = talloc(path_stack, REGFI_BUFFER); 279 285 if(path_element != NULL) 280 path_element->buf = (uint8_t*)quote_string(cur_ancestor->keyname, 281 key_special_chars); 286 { 287 /* XXX: Add command line option to choose output encoding */ 288 regfi_interpret_keyname(f, cur_ancestor, REGFI_ENCODING_ASCII, true); 282 289 290 path_element->buf = (uint8_t*)get_quoted_keyname(cur_ancestor); 291 } 292 283 293 if(path_element == NULL || path_element->buf == NULL 284 294 || !void_stack_push(path_stack, path_element)) … … 929 939 if(tmp_key->num_values > 0 && tmp_key->values != NULL) 930 940 { 931 tmp_name = quote_string(tmp_key->keyname, key_special_chars); 941 /* XXX: Add command line option to choose output encoding */ 942 regfi_interpret_keyname(f, tmp_key, REGFI_ENCODING_ASCII, true); 943 944 tmp_name = get_quoted_keyname(tmp_key); 932 945 tmp_path = (char*)malloc(strlen(parent_paths[i])+strlen(tmp_name)+2); 933 946 if(tmp_path == NULL)
Note: See TracChangeset
for help on using the changeset viewer.