tchar *product_name;
tchar *edition_id;
tchar *installation_type;
+ tchar *pkeyconfigversion;
tchar *hal;
tchar *product_type;
tchar *product_suite;
tchar *tstr = NULL;
int ret;
+ if (*tstr_ret)
+ return 0;
+
for_node_child(string_node, child) {
if (node_is_text(child) && child->content) {
ret = utf8_to_tstr_simple(child->content, &tstr);
FREE(windows_info->hal);
FREE(windows_info->product_type);
FREE(windows_info->product_suite);
+ FREE(windows_info->pkeyconfigversion);
for (size_t i = 0; i < windows_info->num_languages; i++)
FREE(windows_info->languages[i]);
FREE(windows_info->languages);
ret = node_get_string(child, &windows_info->system_root);
} else if (node_name_is(child, "HAL")) {
ret = node_get_string(child, &windows_info->hal);
+ } else if (node_name_is(child, "SERVICINGDATA")) {
+ xmlNode *grandchild;
+
+ for_node_child(child, grandchild) {
+ if (node_is_element(grandchild) &&
+ node_name_is(grandchild, "PKEYCONFIGVERSION"))
+ {
+ ret = node_get_string(grandchild,
+ &windows_info->pkeyconfigversion);
+ }
+ }
}
+
if (ret != 0)
return ret;
}
i++;
} else if (node_name_is(child, "TOTALBYTES")) {
wim_info->total_bytes = node_get_u64(child);
+ } else if (node_name_is(child, "ESD")) {
+ xmlNode *esdchild;
+ for_node_child(child, esdchild) {
+ if (node_is_element(esdchild) &&
+ node_name_is(esdchild, "ENCRYPTED"))
+ {
+ ret = WIMLIB_ERR_WIM_IS_ENCRYPTED;
+ goto err;
+ }
+ }
}
}
return rc;
}
+ if (windows_info->pkeyconfigversion) {
+ rc = xmlTextWriterStartElement(writer, "SERVICINGDATA");
+ if (rc < 0)
+ return rc;
+
+ rc = xml_write_string(writer, "PKEYCONFIGVERSION",
+ windows_info->pkeyconfigversion);
+ if (rc)
+ return rc;
+
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0)
+ return rc;
+ }
+
if (windows_info->windows_version_exists) {
rc = xml_write_windows_version(writer, &windows_info->windows_version);
if (rc)
if (ret)
return ret;
+ if (old->pkeyconfigversion) {
+ new->pkeyconfigversion = TSTRDUP(old->pkeyconfigversion);
+ if (new->pkeyconfigversion == NULL)
+ return WIMLIB_ERR_NOMEM;
+ }
+
if (old->languages) {
new->languages = CALLOC(old->num_languages, sizeof(new->languages[0]));
if (!new->languages)
return max_len;
}
-#ifdef ENABLE_CUSTOM_MEMORY_ALLOCATOR
void
xml_set_memory_allocator(void *(*malloc_func)(size_t),
void (*free_func)(void *),
{
xmlMemSetup(free_func, malloc_func, realloc_func, STRDUP);
}
-#endif
static int
calculate_dentry_statistics(struct wim_dentry *dentry, void *arg)
0,
out_reshdr,
NULL,
- write_resource_flags,
- &wim->lzx_context);
+ write_resource_flags);
FREE(xml_data);
DEBUG("ret=%d", ret);
return ret;