Bug fix: -boot_image system_area=/dev/zero preserved system area of loaded ISO

This commit is contained in:
2024-05-13 12:22:04 +02:00
parent c8fab513c6
commit 4dc5edc565
5 changed files with 121 additions and 104 deletions

View File

@ -447,7 +447,8 @@ int Xorriso_set_system_area(struct XorrisO *xorriso,
Xorriso_alloc_meM(buf, char, 32768);
memset(buf, 0, 32768);
system_area_options= xorriso->system_area_options;
if(xorriso->system_area_clear_loaded)
if(xorriso->system_area_clear_loaded ||
(in_drive != out_drive && in_drive != NULL))
sa_loaded= 0;
else
sa_loaded= iso_image_get_system_area(img, buf, &options, 0);
@ -457,8 +458,8 @@ int Xorriso_set_system_area(struct XorrisO *xorriso,
"Error when inquiring System Area data of ISO 9660 image",
0, "FAILURE", 1);
{ret= 0; goto ex;}
} if(sa_loaded > 0)
bufpt= buf;
}
bufpt= buf;
if(xorriso->system_area_disk_path[0] == 0) {
if(xorriso->patch_system_area && xorriso->system_area_options == 0 &&
sa_loaded > 0) {