New commands -projid, -get_projid, -get_projid_r, -set_projid, -set_projid_r, -find test -has_projid, -find actions get_projid, set_projid, get_projid_minmax

This commit is contained in:
2024-11-03 20:04:54 +01:00
parent 923bfa0be9
commit 32bfa95973
25 changed files with 1168 additions and 214 deletions

View File

@ -1162,6 +1162,7 @@ int Xorriso_findx_action(struct XorrisO *xorriso, struct FindjoB *job,
time_t date= 0;
mode_t mode_or= 0, mode_and= ~1;
uint64_t chattr_flags, lfa_flags;
uint32_t projid;
char *target, *text_2, *wdi_mem= NULL, *disk_prefix, *iso_path= NULL;
char *basename, *lfa_text= NULL, *acl_text= NULL, *attrlist= NULL;
char *leafname= NULL;
@ -1323,7 +1324,21 @@ int Xorriso_findx_action(struct XorrisO *xorriso, struct FindjoB *job,
ret= 1;
}
} else {
} else if(action == 63) { /* get_projid */
ret= Xorriso_get_projid(xorriso, NULL, show_path, &projid, 2);
if(ret > 0)
Xorriso_show_projid(xorriso, show_path, projid, 0);
} else if(action == 65) { /* get_projid_minmax */
ret= Xorriso_get_projid(xorriso, NULL, show_path, &projid, 2);
if(ret > 0) {
if((off_t) projid < job->projid_low || job->projid_low == -1)
job->projid_low= projid;
if((off_t) projid > job->projid_high || job->projid_high == -1)
job->projid_high= projid;
}
} else { /* all other actions default to echo */
Xorriso_esc_filepath(xorriso,show_path, xorriso->result_line, 0);
strcat(xorriso->result_line, "\n");
Xorriso_result(xorriso, 0);