Commit d2985ef3 authored by Thomas Schmitt's avatar Thomas Schmitt

Precautions against patching deleted boot images

parent de9636ec
#define Xorriso_timestamP "2008.10.26.134421"
#define Xorriso_timestamP "2008.10.26.142422"
......@@ -1182,6 +1182,22 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
sprintf(xorriso->info_text, "Patching alleged isolinux boot image");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
ret= Xorriso_path_from_node(xorriso, NULL, xorriso->loaded_boot_bin_lba,
sfe, 1);
if(ret < 0)
goto ex;
if(ret == 0) {
sprintf(xorriso->info_text,
"Cannot patch boot image: no file found for its LBA.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
sprintf(xorriso->info_text,
"Probably the loaded boot image file was deleted in this session.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
sprintf(xorriso->info_text,
"Use -boot_image \"any\" \"discard\" or set new boot image");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
goto ex;
}
#ifdef Xorriso_with_make_isohybrid_mbR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment