Bug fix: Partition offset was preserved from -indev rather than from -outdev

This commit is contained in:
Thomas Schmitt 2022-11-05 14:38:03 +01:00
parent 09de0f1743
commit 1ff12c26d9
3 changed files with 18 additions and 12 deletions

View File

@ -2,7 +2,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2021 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -395,8 +395,11 @@ failure:;
}
int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
IsoImage *img, struct isoburn_imgen_opts *sopts,
int Xorriso_set_system_area(struct XorrisO *xorriso,
struct burn_drive *in_drive,
struct burn_drive *out_drive,
IsoImage *img,
struct isoburn_imgen_opts *sopts,
int flag)
{
int ret, options, system_area_options, iso_lba= -1, start_lba, image_blocks;
@ -468,9 +471,9 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
(((unsigned int) ub[461]) << 24));
iso_lba= -1;
ret= isoburn_disc_get_msc1(drive, &start_lba);
ret= isoburn_disc_get_msc1(in_drive, &start_lba);
if(ret > 0) {
ret= isoburn_read_iso_head(drive, start_lba, &image_blocks,
ret= isoburn_read_iso_head(in_drive, start_lba, &image_blocks,
volid, 1);
if(ret > 0)
iso_lba= start_lba + image_blocks;
@ -570,9 +573,9 @@ do_set:;
{ret= 0; goto ex;}
}
offst= xorriso->partition_offset;
state= isoburn_disc_get_status(drive);
state= isoburn_disc_get_status(out_drive);
if(state == BURN_DISC_APPENDABLE) {
ret= isoburn_get_img_partition_offset(drive, &offst);
ret= isoburn_get_img_partition_offset(out_drive, &offst);
if(ret == 1) {
sprintf(xorriso->info_text,
"Preserving in ISO image: -boot_image any partition_offset=%lu",
@ -1316,7 +1319,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
}
iso_image_set_data_preparer_id(image, xorriso_id);
}
ret= Xorriso_set_system_area(xorriso, source_drive, image, sopts, 0);
ret= Xorriso_set_system_area(xorriso, source_drive, drive, image, sopts, 0);
if(ret <= 0)
goto ex;

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2010 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -37,8 +37,11 @@ int Xorriso_sanitize_image_size(struct XorrisO *xorriso,
int Xorriso_auto_format(struct XorrisO *xorriso, int flag);
int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
IsoImage *img, struct isoburn_imgen_opts *sopts,
int Xorriso_set_system_area(struct XorrisO *xorriso,
struct burn_drive *in_drive,
struct burn_drive *out_drive,
IsoImage *img,
struct isoburn_imgen_opts *sopts,
int flag);
int Xorriso_check_burn_abort(struct XorrisO *xorriso, int flag);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2022.10.29.084954"
#define Xorriso_timestamP "2022.11.05.133746"