X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_config.c;h=26943c8441f493c824490f1bb98ffe4004077537;hb=0adb91252edd4b093f12f57eea76687ced1aec0c;hp=c2c8c57e37211faf5a5bf0fdced30717351f20a3;hpb=e0c113197cc4f189d1e2d34ede358b7733d73e4d;p=palacios.git diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index c2c8c57..26943c8 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -72,9 +72,16 @@ char * v3_cfg_val(v3_cfg_tree_t * tree, char * tag) { return NULL; } - val = (attrib == NULL) ? v3_xml_txt(child_entry): attrib; - - return val; + if (attrib == NULL) { + val = v3_xml_txt(child_entry); + + if ( val[0] == 0 ) + val = NULL; + } else { + val = attrib; + } + + return val; } v3_cfg_tree_t * v3_cfg_subtree(v3_cfg_tree_t * tree, char * tag) { @@ -382,11 +389,12 @@ static int post_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { return -1; } - if (v3_inject_mptable(vm)==-1) { + if (v3_inject_mptable(vm) == -1) { PrintError("Failed to inject mptable during configuration\n"); return -1; } + return 0; } @@ -488,6 +496,7 @@ struct v3_vm_info * v3_config_guest(void * cfg_blob) { info->cpu_id = i; info->vm_info = vm; + info->core_cfg_data = per_core_cfg; if (pre_config_core(info, per_core_cfg) == -1) { PrintError("Error in core %d preconfiguration\n", i);