Fix naming scheme for cache and iso

Signed-off-by: Carlos Aguado Sanchez <carlos.aguado@epfl.ch>
This commit is contained in:
Carlos Aguado Sanchez 2014-01-17 18:32:59 +01:00 committed by Rom Walton
parent a57cbb7987
commit acf54750a8
1 changed files with 8 additions and 16 deletions

View File

@ -776,14 +776,6 @@ int main(int argc, char** argv) {
); );
vm.floppy_image_filename = buf; vm.floppy_image_filename = buf;
} }
if (vm.enable_cache_disk) {
sprintf(buf, "%s.%s", CACHE_DISK_FILENAME, CACHE_DISK_FILENAME_EXTENSION);
vm.cache_disk_filename = buf;
}
if (vm.enable_isocontextualization) {
sprintf(buf, "%s.%s", ISO_IMAGE_FILENAME, ISO_IMAGE_FILENAME_EXTENSION);
vm.iso_image_filename = buf;
}
} else { } else {
vm.vm_master_name += md5_string(std::string(aid.result_name)).substr(0, 16); vm.vm_master_name += md5_string(std::string(aid.result_name)).substr(0, 16);
vm.vm_master_description = aid.result_name; vm.vm_master_description = aid.result_name;
@ -800,15 +792,15 @@ int main(int argc, char** argv) {
); );
vm.floppy_image_filename = buf; vm.floppy_image_filename = buf;
} }
}
if (vm.enable_cache_disk) { if (vm.enable_cache_disk) {
sprintf(buf, "%s_%d.%s", CACHE_DISK_FILENAME, aid.slot, CACHE_DISK_FILENAME_EXTENSION); sprintf(buf, "%s.%s", CACHE_DISK_FILENAME, CACHE_DISK_FILENAME_EXTENSION);
vm.cache_disk_filename = buf; vm.cache_disk_filename = buf;
} }
if (vm.enable_isocontextualization) { if (vm.enable_isocontextualization) {
sprintf(buf, "%s_%d.%s", ISO_IMAGE_FILENAME, aid.slot, ISO_IMAGE_FILENAME_EXTENSION); sprintf(buf, "%s.%s", ISO_IMAGE_FILENAME, ISO_IMAGE_FILENAME_EXTENSION);
vm.iso_image_filename = buf; vm.iso_image_filename = buf;
} }
}
if (aid.ncpus > 1.0 || ncpus > 1.0) { if (aid.ncpus > 1.0 || ncpus > 1.0) {
if (ncpus) { if (ncpus) {
sprintf(buf, "%d", (int)ceil(ncpus)); sprintf(buf, "%d", (int)ceil(ncpus));