Made Xorriso_sanitize_image_size() ready for long block adresses
This commit is contained in:
parent
2d3302db51
commit
fb780b59cb
@ -198,19 +198,18 @@ int Xorriso_make_write_options(
|
||||
bit1= do not use isoburn wrappers, do not assume libisofs
|
||||
bit2= no_emul_toc : do not pad random access media to full 64 KB
|
||||
*/
|
||||
int Xorriso_sanitize_image_size(struct XorrisO *xorriso,
|
||||
off_t Xorriso_sanitize_image_size(struct XorrisO *xorriso,
|
||||
struct burn_drive *drive, struct burn_disc *disc,
|
||||
struct burn_write_opts *burn_options, int flag)
|
||||
{
|
||||
int ret, img_sectors, num_sessions= 0, num_tracks= 0, padding= 0, profile;
|
||||
off_t media_space;
|
||||
int lba, nwa, multi_emul_blocks= 0;
|
||||
int num_sessions= 0, num_tracks= 0, padding= 0, profile;
|
||||
off_t media_space, ret, img_sectors, lba, nwa, multi_emul_blocks= 0;
|
||||
char profile_name[80];
|
||||
struct burn_session **sessions;
|
||||
struct burn_track **tracks;
|
||||
enum burn_disc_status s;
|
||||
|
||||
img_sectors= burn_disc_get_sectors(disc);
|
||||
img_sectors= burn_disc_get_sectors_v2(disc);
|
||||
|
||||
sessions= burn_disc_get_sessions(disc, &num_sessions);
|
||||
if(sessions==NULL || num_sessions < 1) {
|
||||
@ -250,7 +249,7 @@ no_track:;
|
||||
s= isoburn_disc_get_status(drive);
|
||||
if(s == BURN_DISC_BLANK) {
|
||||
/* Count blocks before nwa as part of the image */;
|
||||
ret= isoburn_disc_track_lba_nwa(drive, burn_options, 0, &lba, &nwa);
|
||||
ret= isoburn_disc_track_lba_nwa_v2(drive, burn_options, 0, &lba, &nwa);
|
||||
if(ret <= 0)
|
||||
nwa= 0;
|
||||
multi_emul_blocks= nwa;
|
||||
@ -272,7 +271,7 @@ no_track:;
|
||||
|
||||
if(xorriso->alignment > 0) {
|
||||
if(img_sectors > 0) {
|
||||
ret= isoburn_disc_track_lba_nwa(drive, burn_options, 0, &lba, &nwa);
|
||||
ret= isoburn_disc_track_lba_nwa_v2(drive, burn_options, 0, &lba, &nwa);
|
||||
if(ret <= 0)
|
||||
nwa= 0;
|
||||
lba= (nwa + img_sectors + padding) % xorriso->alignment;
|
||||
@ -293,8 +292,8 @@ no_track:;
|
||||
if(media_space < img_sectors + padding) {
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
sprintf(xorriso->info_text,
|
||||
"Image size %ds exceeds free space on media %.fs",
|
||||
img_sectors + padding, (double) media_space);
|
||||
"Image size %.fs exceeds free space on media %.fs",
|
||||
(double) (img_sectors + padding), (double) media_space);
|
||||
if(flag & 1) {
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
|
||||
} else {
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
|
||||
|
||||
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
|
||||
@ -31,7 +31,7 @@ int Xorriso_make_write_options(
|
||||
struct XorrisO *xorriso, struct burn_drive *drive,
|
||||
struct burn_write_opts **burn_options, int flag);
|
||||
|
||||
int Xorriso_sanitize_image_size(struct XorrisO *xorriso,
|
||||
off_t Xorriso_sanitize_image_size(struct XorrisO *xorriso,
|
||||
struct burn_drive *drive, struct burn_disc *disc,
|
||||
struct burn_write_opts *burn_options, int flag);
|
||||
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2024.03.21.182815"
|
||||
#define Xorriso_timestamP "2024.03.21.193959"
|
||||
|
Loading…
Reference in New Issue
Block a user