Enabled for -findx: tests -has_lfa_flags and -has_some_lfa_flags_of, action lsattrd

This commit is contained in:
2024-08-27 18:08:59 +02:00
parent 416e367d38
commit 51154520d8
7 changed files with 143 additions and 62 deletions

View File

@ -100,7 +100,9 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf,
}
if(xorriso->do_aaip & 2048) {
ret= iso_local_get_lfa_flags(disk_path, &lfa_flags, &max_bit, &os_errno,
(flag & 32));
(flag & 32) | ((!!(xorriso->do_aaip & (1 << 15))) << 7));
if((xorriso->do_aaip & (1 << 15)) && ret >= 0 && lfa_flags == 0)
ret= 4;
if(ret < 0) {
Xorriso_process_msg_queues(xorriso, 0);
Xorriso_report_iso_error(xorriso, disk_path, ret,
@ -3104,7 +3106,7 @@ return:
3 = immediate decision : does match
*/
{
int value=0, ret, bless_idx, size_mode, lba_count, i, mask, max_bit;
int value=0, ret, bless_idx, size_mode, lba_count, i, mask, max_bit, hflag;
off_t range_lba, end_lba, *file_end_lbas= NULL, *file_start_lbas= NULL;
off_t start_lba;
uint64_t lfa_flags, node_flags;
@ -3127,8 +3129,8 @@ return:
if(node == NULL) {
switch(ftest->test_type) {
case 0: case 1: case 2: case 4: case 11: case 12: case 13:
case 22: case 23: case 25: case 26:
/* Tests which need no node parameter */
case 22: case 23: case 25: case 26: case 28: case 29:
/* Tests which need no node parameter or can work without it */
break;
default:
value= 0;
@ -3393,7 +3395,16 @@ return:
break; case 28: /* -has_lfa_flags uint64_t lfa_flags */
case 29: /* -has_some_lfa_flags_of uint64_t *arg */
lfa_flags= *((uint64_t *) ftest->arg1);
ret= Xorriso_get_lfa_flags(xorriso, node, path, &node_flags, &max_bit, 0);
if(node == NULL) {
hflag= 2;
if((xorriso->do_aaip & ((1 << 11) | (1 << 15))) ==
((1 << 11) | (1 << 15)))
hflag|= (1 << 7);
ret= Xorriso_get_lfa_flags(xorriso, NULL, path, &node_flags, &max_bit,
hflag);
} else {
ret= Xorriso_get_lfa_flags(xorriso, node, path, &node_flags, &max_bit, 0);
}
if(ret <= 0) {
if(ret < 0)
Xorriso_process_msg_queues(xorriso, 0);