New -find action sort_weight, new -as mkisofs --sort-weight

This commit is contained in:
Thomas Schmitt 2010-04-18 09:59:08 +00:00
parent 1a18491b03
commit f4b46cf499
7 changed files with 237 additions and 98 deletions

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH XORRISO 1 "Apr 13, 2010"
.TH XORRISO 1 "Apr 18, 2010"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -62,7 +62,7 @@ Updates ISO subtrees incrementally to match given disk subtrees.
Writes result either as completely new image or as add-on session
to optical media or filesystem objects.
.br
Can activate ISOLINUX and GRUB boot images via El Torito.
Can activate ISOLINUX and GRUB boot images via El Torito and MBR.
.br
Can perform multi-session tasks as emulation of mkisofs and cdrecord.
.br
@ -1639,6 +1639,16 @@ user id and group id become 0, all r-permissions get granted, all w denied.
If there is any x-permission, then all three x get granted.
s- and t-bits get removed.
.br
\fBsort_weight\fR
attributes a LBA weight number to regular files.
.br
The number may range from -2147483648 to 2147483647. The higher it is, the
lower will be the block address of the file data in the emerging ISO image.
(Currently the boot catalog has a hardcoded weight of 1000. Better keep
own weights lower than that.)
.br
E.g.: -exec sort_weight 3 --
.br
\fBshow_stream\fR
shows the content stream chain of a data file.
.br
@ -2010,8 +2020,7 @@ Available types are:
.br
"f" time since when the volume is effectively valid.
.br
"uuid" sets a timestring that overrides "m" time literally.
.br
"uuid" sets a timestring that overrides "c" and "m" times literally.
It must consist of 16 decimal digits which form YYYYMMDDhhmmsscc, with
YYYY between 1970 and 2999. Time zone is GMT.
It is supposed to match this GRUB line:
@ -2236,6 +2245,9 @@ the very start of the ISO image.
This System Area is reserved for system dependent boot software, e.g. an MBR
which can be used to boot from USB stick or hard disk.
.br
Special disk_path "/dev/zero" causes 32k of NUL-bytes.
Use this to discard an MBR which eventually was loaded with the ISO image.
.br
Other than a El Torito boot image, the file disk_path needs not to be added
to the ISO image.
.br
@ -3119,6 +3131,11 @@ same name and hardcoded argument "on", e.g. -acl "on".
Explicit arguments are expected by --stdio_sync
and --scdbackup_tag.
.br
--sort-weight gets as argument a number and an iso_rr_path.
The number becomes the LBA sorting weight of regular file iso_rr_path or
of all regular files underneath directory iso_rr_path.
(See -find -exec sort_weight).
.br
Adopted from grub-mkisofs are --protective-msdos-label
(see -boot_image grub partition_table=on) and
--modification-date=YYYYMMDDhhmmsscc

View File

@ -3543,6 +3543,15 @@ int Findjob_set_action_target(struct FindjoB *o, int action, char *target,
}
int Findjob_set_action_type(struct FindjoB *o, int action, int type,
int flag)
{
o->action= action;
o->type= type;
return(1);
}
int Findjob_set_action_text_2(struct FindjoB *o, int action, char *target,
char* text_2, int flag)
{
@ -11226,15 +11235,23 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
int argc, char **argv, int flag)
{
int ret, i, was_path= 0, was_other_option= 0, mem_graft_points, mem;
int ret, i, j, was_path= 0, was_other_option= 0, mem_graft_points, mem;
int do_print_size= 0, fd, idx, iso_level= 0, no_emul_boot= 0;
int option_b= 0, was_failure= 0, fret, lower_r= 0, zero= 0;
int *weight_list= NULL, weight_count= 0;
char sfe[5*SfileadrL], adr[SfileadrL+8], ra_text[80], pathspec[2*SfileadrL];
char *ept, *add_pt, eff_path[SfileadrL], indev[SfileadrL+8], msc[80], *cpt;
static char *lower_r_args[3] = {"/", "-exec", "mkisofs_r"};
static char *lower_r_args[3]= {"/", "-exec", "mkisofs_r"};
static char *sort_weight_args[4]= {"", "-exec", "sort_weight", ""};
strcpy(ra_text, xorriso->report_about_text);
weight_list= TSOB_FELD(int, (argc / 3) + 1);
if(weight_list == NULL) {
Xorriso_no_malloc_memory(xorriso, NULL, 0);
return(-1);
}
adr[0]= indev[0]= msc[0]= 0;
for(i= 0; i<argc; i++) {
ret= Xorriso_genisofs_ignore(xorriso, whom, argv, &i, 1);
@ -11436,7 +11453,7 @@ problem_handler_1:;
if(was_other_option && xorriso->out_drive_handle==NULL) {
ret= Xorriso_option_dev(xorriso, "-", 2|4); /* set outdev to stdout */
if(ret<=0)
return(ret);
goto ex;
}
if(msc[0]) {
@ -11456,17 +11473,17 @@ illegal_c:;
/* give up indev before setting the load address */
ret= Xorriso_option_dev(xorriso, "", 1);
if(ret<=0)
return(ret);
goto ex;
}
/* growisofs submits msc1+16 to avoid a theoretical bug in mkisofs.
Therefore this bug has to be emulated here. Sigh.
*/
ret= Xorriso_option_load(xorriso, "sbsector", sfe, 1);
if(ret<=0)
return(ret);
goto ex;
ret= Xorriso_option_grow_blindly(xorriso, cpt+1, 0);
if(ret<=0)
return(ret);
goto ex;
}
if(indev[0]) {
ret= Xorriso_option_dev(xorriso, indev, 1);
@ -11648,6 +11665,12 @@ not_enough_args:;
} else if(strcmp(argv[i], "--scdbackup_tag")==0) {
/* was already handled in first argument scan */;
i+= 2;
} else if(strcmp(argv[i], "--sort-weight")==0) {
if(i + 2 >= argc)
goto not_enough_args;
i+= 2;
/* memorize for find runs after pathspecs have been added */
weight_list[weight_count++]= i - 2;
} else if(strcmp(argv[i], "-z")==0 ||
strcmp(argv[i], "-transparent-compression")==0) {
/* was already handled in first argument scan */;
@ -11705,11 +11728,23 @@ problem_handler_2:;
goto ex;
}
if(lower_r) {
zero= 0;
ret= Xorriso_option_find(xorriso, 3, lower_r_args, &zero, 2);
if(ret<=0)
goto ex;
}
for(j= 0; j < weight_count; j++) {
i= weight_list[j];
/* find argv[i+2] -exec sort_weight argv[i+1] */
zero= 0;
sort_weight_args[0]= argv[i + 2];
sort_weight_args[3]= argv[i + 1];
ret= Xorriso_option_find(xorriso, 4, sort_weight_args, &zero, 2);
if(ret<=0)
goto ex;
}
ret= !was_failure;
ex:;
if(was_path && !do_print_size)
@ -11717,6 +11752,8 @@ ex:;
xorriso->pacifier_total, "", 1);
if(do_print_size && xorriso->volset_change_pending)
Xorriso_option_rollback(xorriso, 0);
if(weight_list != NULL)
free(weight_list);
return(ret);
}
@ -16108,6 +16145,12 @@ not_enough_exec_arguments:;
}
} else if(strcmp(cpt, "mkisofs_r")==0) {
Findjob_set_action_target(job, 37, NULL, 0);
} else if(strcmp(cpt, "sort_weight")==0) {
if(i + 1 >= end_idx)
goto not_enough_exec_arguments;
i+= 1;
sscanf(argv[i], "%d", &type);
Findjob_set_action_type(job, 38, type, 0);
} else {
sprintf(xorriso->info_text, "-find -exec: unknown action %s",
Text_shellsafe(argv[i], sfe, 0));

View File

@ -68,7 +68,7 @@ Changes file properties in the ISO image.
Updates ISO subtrees incrementally to match given disk subtrees.
Writes result either as completely new image or as add-on session to
optical media or filesystem objects.
Can activate ISOLINUX and GRUB boot images via El Torito.
Can activate ISOLINUX and GRUB boot images via El Torito and MBR.
Can perform multi-session tasks as emulation of mkisofs and cdrecord.
Can record and restore hard links and ACL.
Content may get zisofs compressed or filtered by external processes.
@ -1478,6 +1478,14 @@ File: xorriso.info, Node: CmdFind, Next: Filter, Prev: Manip, Up: Options
user id and group id become 0, all r-permissions get granted,
all w denied. If there is any x-permission, then all three x
get granted. s- and t-bits get removed.
sort_weight
attributes a LBA weight number to regular files.
The number may range from -2147483648 to 2147483647. The
higher it is, the lower will be the block address of the file
data in the emerging ISO image. (Currently the boot catalog
has a hardcoded weight of 1000. Better keep own weights lower
than that.)
E.g.: -exec sort_weight 3 --
show_stream
shows the content stream chain of a data file.
find
@ -1803,10 +1811,10 @@ will be written according to the setting of option -acl.
"m" time when volume was last modified.
"x" time when the information in the volume expires.
"f" time since when the volume is effectively valid.
"uuid" sets a timestring that overrides "m" time literally.
It must consist of 16 decimal digits which form YYYYMMDDhhmmsscc,
with YYYY between 1970 and 2999. Time zone is GMT. It is supposed
to match this GRUB line:
"uuid" sets a timestring that overrides "c" and "m" times
literally. It must consist of 16 decimal digits which form
YYYYMMDDhhmmsscc, with YYYY between 1970 and 2999. Time zone is
GMT. It is supposed to match this GRUB line:
search -fs-uuid -set YYYY-MM-DD-hh-mm-ss-cc
E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds).
Timestrings for the other types may be given as with option
@ -1996,6 +2004,8 @@ of the existing sessions, unless one can assume overwriteable media.
disk file to the very start of the ISO image. This System Area is
reserved for system dependent boot software, e.g. an MBR which can
be used to boot from USB stick or hard disk.
Special disk_path "/dev/zero" causes 32k of NUL-bytes. Use this
to discard an MBR which eventually was loaded with the ISO image.
Other than a El Torito boot image, the file disk_path needs not to
be added to the ISO image.
-boot_image isolinux system_area= implies "partition_table=on".
@ -2796,6 +2806,10 @@ programs trigger comparable actions.
xorriso options with the same name and hardcoded argument "on",
e.g. -acl "on". Explicit arguments are expected by --stdio_sync
and --scdbackup_tag.
--sort-weight gets as argument a number and an iso_rr_path. The
number becomes the LBA sorting weight of regular file iso_rr_path
or of all regular files underneath directory iso_rr_path. (See
-find -exec sort_weight).
Adopted from grub-mkisofs are --protective-msdos-label (see
-boot_image grub partition_table=on) and
--modification-date=YYYYMMDDhhmmsscc (see -volume_date uuid).
@ -3701,7 +3715,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -out_charset sets output character set: SetWrite. (line 119)
* -outdev aquires a drive for output: AqDrive. (line 29)
* -overwrite enables overwriting in ISO: SetInsert. (line 127)
* -pacifier controls pacifier text form: Emulation. (line 99)
* -pacifier controls pacifier text form: Emulation. (line 103)
* -padding sets amount of image padding: SetWrite. (line 202)
* -page set terminal geometry: DialogCtl. (line 15)
* -paste_in copies file into disk file: Restore. (line 117)
@ -3728,7 +3742,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -rollback discards pending changes: Writing. (line 9)
* -rollback_end ends program without writing: Scripting. (line 125)
* -rom_toc_scan searches for sessions: Loading. (line 189)
* -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 109)
* -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 113)
* -scsi_log reports SCSI commands: Scripting. (line 113)
* -session_log logs written sessions: Scripting. (line 104)
* -session_string composes session info line: Inquiry. (line 56)
@ -3784,11 +3798,11 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Backslash Interpretation, _definition: Processing. (line 49)
* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 168)
* Backup, enable features, -for_backup: Loading. (line 163)
* Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 109)
* Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 113)
* Blank media, _definition: Media. (line 25)
* Blind growing, _definition: Methods. (line 40)
* Bootability, control, -boot_image: Bootable. (line 20)
* cdrecord, Emulation: Emulation. (line 66)
* cdrecord, Emulation: Emulation. (line 70)
* Character Set, _definition: Charset. (line 6)
* Character Set, for input, -in_charset: Loading. (line 73)
* Character Set, for input/output, -charset: Charset. (line 43)
@ -3823,9 +3837,9 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Drive, write and eject, -commit_eject: Writing. (line 40)
* El Torito, _definiton: Extras. (line 19)
* Emulation, -as: Emulation. (line 13)
* Emulation, cdrecord, -as: Emulation. (line 66)
* Emulation, cdrecord, -as: Emulation. (line 70)
* Emulation, mkisofs, -as: Emulation. (line 16)
* Emulation, pacifier form, -pacifier: Emulation. (line 99)
* Emulation, pacifier form, -pacifier: Emulation. (line 103)
* Examples: Examples. (line 6)
* Filter, _definition: Filter. (line 6)
* Filter, apply to file tree, -set_filter_r: Filter. (line 84)
@ -3996,55 +4010,55 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
Tag Table:
Node: Top420
Node: Overview1324
Node: Model3201
Node: Media6081
Node: Methods8511
Node: Drives11058
Node: Extras14324
Node: Processing17455
Node: Dialog20951
Node: Options22608
Node: AqDrive24176
Node: Loading27082
Node: Insert39517
Node: SetInsert47874
Node: Manip56441
Node: CmdFind64317
Node: Filter73146
Node: Writing77495
Node: SetWrite83784
Node: Bootable93906
Node: Charset99411
Node: Exception102165
Node: DialogCtl106680
Node: Inquiry109025
Node: Navigate113165
Node: Verify120519
Node: Restore128939
Node: Emulation135595
Node: Scripting142040
Node: Frontend147602
Node: Examples148803
Node: ExDevices149972
Node: ExCreate150454
Node: ExDialog151728
Node: ExGrowing152990
Node: ExModifying153792
Node: ExBootable154293
Node: ExCharset154840
Node: ExPseudo155668
Node: ExCdrecord156562
Node: ExMkisofs156877
Node: ExGrowisofs157880
Node: ExException159004
Node: ExTime159458
Node: ExIncBackup159917
Node: ExRestore163389
Node: ExRecovery164358
Node: Files164924
Node: Seealso165962
Node: Legal166486
Node: CommandIdx167408
Node: ConceptIdx180709
Node: Model3209
Node: Media6089
Node: Methods8519
Node: Drives11066
Node: Extras14332
Node: Processing17463
Node: Dialog20959
Node: Options22616
Node: AqDrive24184
Node: Loading27090
Node: Insert39525
Node: SetInsert47882
Node: Manip56449
Node: CmdFind64325
Node: Filter73572
Node: Writing77921
Node: SetWrite84210
Node: Bootable94342
Node: Charset99988
Node: Exception102742
Node: DialogCtl107257
Node: Inquiry109602
Node: Navigate113742
Node: Verify121096
Node: Restore129516
Node: Emulation136172
Node: Scripting142858
Node: Frontend148420
Node: Examples149621
Node: ExDevices150790
Node: ExCreate151272
Node: ExDialog152546
Node: ExGrowing153808
Node: ExModifying154610
Node: ExBootable155111
Node: ExCharset155658
Node: ExPseudo156486
Node: ExCdrecord157380
Node: ExMkisofs157695
Node: ExGrowisofs158698
Node: ExException159822
Node: ExTime160276
Node: ExIncBackup160735
Node: ExRestore164207
Node: ExRecovery165176
Node: Files165742
Node: Seealso166780
Node: Legal167304
Node: CommandIdx168226
Node: ConceptIdx181527

End Tag Table

View File

@ -44,7 +44,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO 1 "Apr 13, 2010"
@c man .TH XORRISO 1 "Apr 18, 2010"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -144,7 +144,7 @@ Updates ISO subtrees incrementally to match given disk subtrees.
Writes result either as completely new image or as add-on session
to optical media or filesystem objects.
@*
Can activate ISOLINUX and GRUB boot images via El Torito.
Can activate ISOLINUX and GRUB boot images via El Torito and MBR.
@*
Can perform multi-session tasks as emulation of mkisofs and cdrecord.
@*
@ -2004,6 +2004,16 @@ user id and group id become 0, all r-permissions get granted, all w denied.
If there is any x-permission, then all three x get granted.
s- and t-bits get removed.
@*
@item sort_weight
attributes a LBA weight number to regular files.
@*
The number may range from -2147483648 to 2147483647. The higher it is, the
lower will be the block address of the file data in the emerging ISO image.
(Currently the boot catalog has a hardcoded weight of 1000. Better keep
own weights lower than that.)
@*
E.g.: -exec sort_weight 3 @minus{}@minus{}
@*
@item show_stream
shows the content stream chain of a data file.
@*
@ -2435,8 +2445,7 @@ Available types are:
@*
"f" time since when the volume is effectively valid.
@*
"uuid" sets a timestring that overrides "m" time literally.
@*
"uuid" sets a timestring that overrides "c" and "m" times literally.
It must consist of 16 decimal digits which form YYYYMMDDhhmmsscc, with
YYYY between 1970 and 2999. Time zone is GMT.
It is supposed to match this GRUB line:
@ -2696,6 +2705,9 @@ the very start of the ISO image.
This System Area is reserved for system dependent boot software, e.g. an MBR
which can be used to boot from USB stick or hard disk.
@*
Special disk_path "/dev/zero" causes 32k of NUL-bytes.
Use this to discard an MBR which eventually was loaded with the ISO image.
@*
Other than a El Torito boot image, the file disk_path needs not to be added
to the ISO image.
@*
@ -3753,6 +3765,11 @@ same name and hardcoded argument "on", e.g. -acl "on".
Explicit arguments are expected by @minus{}@minus{}stdio_sync
and @minus{}@minus{}scdbackup_tag.
@*
@minus{}@minus{}sort-weight gets as argument a number and an iso_rr_path.
The number becomes the LBA sorting weight of regular file iso_rr_path or
of all regular files underneath directory iso_rr_path.
(See -find -exec sort_weight).
@*
Adopted from grub-mkisofs are @minus{}@minus{}protective-msdos-label
(see -boot_image grub partition_table=on) and
@minus{}@minus{}modification-date=YYYYMMDDhhmmsscc

View File

@ -1012,6 +1012,7 @@ struct FindjoB {
35= check_md5
36= make_md5
37= mkisofs_r
38= sort_weight number
*/
int action;
int prune;
@ -1022,7 +1023,7 @@ struct FindjoB {
uid_t user;
gid_t group;
mode_t mode_and, mode_or;
int type; /* see Xorriso_set_time flag */
int type; /* see Xorriso_set_time flag, also used as weight */
time_t date;
char *found_path;
struct FindjoB *subjob;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.04.17.171232"
#define Xorriso_timestamP "2010.04.18.095808"

View File

@ -1696,22 +1696,27 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
int flag)
{
int ret, options, system_area_options, iso_lba= 0;
int num_sessions= 0, num_tracks= 0, start_lba, end_lba, image_blocks;
char volid[33];
FILE *fp= NULL;
char buf[32768], *bufpt= NULL;
off_t hd_lba;
unsigned char *ub;
ElToritoBootImage *bootimg;
IsoFile *bootimg_node;
struct isoburn_toc_disc *isoburn_disc= NULL;
struct isoburn_toc_disc *disc= NULL;
struct isoburn_toc_session **sessions;
struct isoburn_toc_track **tracks;
struct burn_toc_entry toc_entry;
system_area_options= xorriso->system_area_options;
memset(buf, 0, 32768);
if(xorriso->system_area_disk_path[0] == 0) {
if(xorriso->patch_system_area) {
ret= iso_image_get_system_area(img, buf, &options, 0);
if(ret == 0)
if(ret == 0) {
goto do_set;
else if(ret < 0) {
} else if(ret < 0) {
Xorriso_process_msg_queues(xorriso,0);
Xorriso_report_iso_error(xorriso, "", ret,
"Error when inquiring System Area data of ISO 9660 image",
@ -1723,14 +1728,40 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
ub= (unsigned char *) buf;
hd_lba= (ub[454] | (ub[455] << 8) | (ub[456] << 16) | (ub[457] << 24)) +
(ub[458] | (ub[459] << 8) | (ub[460] << 16) | (ub[461] << 24));
isoburn_disc= isoburn_toc_drive_get_disc(drive);
if(isoburn_disc == NULL)
disc= isoburn_toc_drive_get_disc(drive);
if(disc == NULL)
iso_lba= -1;
else {
/* With sequential media this is the track end, not the ISO size */
end_lba= isoburn_toc_disc_get_sectors(disc);
/* >>> wrong: with CD-R this is the track end, not the ISO size */
iso_lba= isoburn_toc_disc_get_sectors(isoburn_disc);
/* So inquire start and ISO size of the last track */
iso_lba= -1;
sessions= isoburn_toc_disc_get_sessions(disc, &num_sessions);
if(num_sessions > 0)
tracks= isoburn_toc_session_get_tracks(sessions[num_sessions - 1],
&num_tracks);
if(tracks != NULL && num_tracks > 0)
isoburn_toc_track_get_entry(tracks[num_tracks - 1], &toc_entry);
if (toc_entry.extensions_valid & 1) {
ret= isoburn_toc_track_get_emul(tracks[num_tracks - 1], &start_lba,
&image_blocks, volid, 0);
if(ret > 0) {
iso_lba= start_lba + image_blocks;
} else {
start_lba= toc_entry.start_lba;
ret= isoburn_read_iso_head(drive, start_lba, &image_blocks,
volid, 1);
if(ret > 0)
iso_lba= start_lba + image_blocks;
}
}
/* <<< provisorily revoke the new size */
iso_lba = end_lba;
if(iso_lba > end_lba)
iso_lba= -1;
}
if(((off_t) iso_lba) * (off_t) 4 > hd_lba) {
@ -1803,8 +1834,8 @@ do_set:;
ex:;
if(fp != NULL && fp != stdin)
fclose(fp);
if(isoburn_disc != NULL)
isoburn_toc_disc_free(isoburn_disc);
if(disc != NULL)
isoburn_toc_disc_free(disc);
return(ret);
}
@ -8054,6 +8085,8 @@ int Xorriso_findi_action(struct XorrisO *xorriso, struct FindjoB *job,
ret= 1;
} else if(action == 37) { /* mkisofs_r */
ret= Xorriso_mkisofs_lower_r(xorriso, node, 0);
} else if(action == 38) { /* sort_weight */
iso_node_set_sort_weight(node, type);
} else { /* includes : 15 in_iso */
sprintf(xorriso->result_line, "%s\n", Text_shellsafe(show_path, sfe, 0));
Xorriso_result(xorriso, 0);
@ -8290,6 +8323,26 @@ int Xorriso_findi_test(struct XorrisO *xorriso, struct FindjoB *job,
}
int Xorriso_findi_headline(struct XorrisO *xorriso, struct FindjoB *job,
int flag)
{
int action;
action= Findjob_get_action(job, 0);
if(action == 21) { /* report_damage */
sprintf(xorriso->result_line, "Report layout: %8s , %8s , %8s , %s\n",
"at byte", "Range", "Filesize", "ISO image path");
Xorriso_result(xorriso, 0);
} else if(action == 22) { /* report_lba */
sprintf(xorriso->result_line,
"Report layout: %2s , %8s , %8s , %8s , %s\n",
"xt", "Startlba", "Blocks", "Filesize", "ISO image path");
Xorriso_result(xorriso, 0);
}
return(1);
}
/* @param flag bit0= recursion
bit1= do not count deleted files with rm and rm_r
bit2= do not dive into split file directories
@ -8326,18 +8379,8 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
action= Findjob_get_action(job, 0);
if(action<0)
action= 0;
if(!(flag & 1)) {
if(action == 21) {
sprintf(xorriso->result_line, "Report layout: %8s , %8s , %8s , %s\n",
"at byte", "Range", "Filesize", "ISO image path");
Xorriso_result(xorriso, 0);
} else if(action == 22) {
sprintf(xorriso->result_line,
"Report layout: %2s , %8s , %8s , %8s , %s\n",
"xt", "Startlba", "Blocks", "Filesize", "ISO image path");
Xorriso_result(xorriso, 0);
}
}
if(!(flag & 1))
Xorriso_findi_headline(xorriso, job, 0);
dir_node= (IsoDir *) dir_node_generic;
if(dir_node==NULL) {
@ -8721,6 +8764,10 @@ int Xorriso_findi_sorted(struct XorrisO *xorriso, struct FindjoB *job,
{ret= 1; goto ex;}
/* Perform job->action on xorriso->node_array */
/* Headlines of actions report_damage , report_lba */;
Xorriso_findi_headline(xorriso, job, 0);
for(i= 0; i < xorriso->node_counter; i++) {
node= xorriso->node_array[i];
ret= Xorriso_path_from_node(xorriso, node, abs_path, 0);