Small adjustments about -boot_image

This commit is contained in:
2008-09-30 17:50:14 +00:00
parent 7e03f24050
commit 1b3480301a
3 changed files with 15 additions and 44 deletions

View File

@ -952,6 +952,13 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
strcpy(cpt, "boot.cat");
}
sprintf(xorriso->info_text, "Activating alleged isolinux boot image %s",
Text_shellsafe(xorriso->boot_image_bin_path, sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
sprintf(xorriso->info_text, "Creating El Torito boot catalog file %s",
Text_shellsafe(xorriso->boot_image_cat_path, sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
ret= Xorriso_node_from_path(xorriso, image, xorriso->boot_image_bin_path,
&node, 1);
if(ret <= 0) {
@ -6766,48 +6773,12 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
ret= 0; goto ex;
}
#ifndef NIX
if(flag & 1) {
ret= Xorriso_update_iso_lba0(xorriso, nwa, isosize, head_buffer, NULL,
flag & 2);
if(ret <= 0)
goto ex;
}
#else
/* Update ISO header at lba 0 */
if((flag&1) && nwa >= 32) {
if(!do_isosize) {
/* head_buffer was not filled yet. Read it from output media. */
ret= isoburn_read_iso_head(drive, nwa, &isosize, head_buffer, 2);
if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text,
"Cannot read freshly written ISO image head");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
}
/* patch ISO header */
full_size= nwa + isosize;
headpt= head_buffer + 32*1024;
for(i=0;i<4;i++)
headpt[87-i]= headpt[80+i]= (full_size >> (8*i)) & 0xff;
ret= burn_random_access_write(drive, (off_t) 0, head_buffer,
(off_t) (64*1024), 1);
if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text,
"Cannot write new ISO image head to LBA 0");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
}
#endif /* NIX */
sprintf(xorriso->info_text, "Writing to %s completed sucessfully.\n\n",
Text_shellsafe(xorriso->outdev,sfe,0));
Xorriso_info(xorriso, 0);