diff --git a/libisoburn/libisoburn.ver b/libisoburn/libisoburn.ver index d5e2d338..eb724979 100644 --- a/libisoburn/libisoburn.ver +++ b/libisoburn/libisoburn.ver @@ -380,6 +380,9 @@ isoburn_toc_track_get_emul_v2; Xorriso_option_chattri; Xorriso_option_for_backup; Xorriso_option_genisoimage_completion; +Xorriso_option_get_projid; Xorriso_option_lfa_flags; +Xorriso_option_projid; +Xorriso_option_set_projid; } LIBISOBURN1; diff --git a/xorriso/base_obj.c b/xorriso/base_obj.c index 912b197c..db3dd9b2 100644 --- a/xorriso/base_obj.c +++ b/xorriso/base_obj.c @@ -159,6 +159,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag) m->do_aaip= 0; if(m->lfa_flags_setting & 1) m->do_aaip|= m->lfa_flags_setting & (15 << 11); + m->projid_mapper= NULL; m->do_md5= 64; m->no_emul_toc= 0; m->do_old_empty= 0; diff --git a/xorriso/cmp_update.c b/xorriso/cmp_update.c index bba317fe..2fa2c9a3 100644 --- a/xorriso/cmp_update.c +++ b/xorriso/cmp_update.c @@ -295,6 +295,7 @@ ex:; bit24= hardlink split bit25= hardlink fusion bit26= Linux file attribute mismatch + bit27= XFS-style project id mismatch @param flag bit0= compare atime bit1= compare ctime bit2= check only existence of both file objects @@ -323,6 +324,7 @@ int Xorriso_compare_2_files(struct XorrisO *xorriso, char *disk_adr, int split_count= 0; time_t stamp; uint64_t lfa_flags1, lfa_flags2; + uint32_t projid1= 0, projid2= 0; char *part_path= NULL, *part_name; int partno, total_parts= 0; @@ -520,6 +522,25 @@ int Xorriso_compare_2_files(struct XorrisO *xorriso, char *disk_adr, } } + /* XFS-style project id */ + if(xorriso->do_aaip & (1 << 17)) { + ret= Xorriso_get_projid(xorriso, NULL, disk_adr, &projid1, + 2 | ((flag & (1 << 28)) >> 23)); + if(ret < 0) + goto ex; + ret= Xorriso_get_projid(xorriso, NULL, iso_adr, &projid2, 0); + if(ret < 0) + goto ex; + if(projid1 != projid2) { + (*result)|= (1 << 27); + sprintf(respt, "%s projid : %lu <> %lu", + a, (unsigned long int) projid1, (unsigned long int) projid2); + strcat(respt, "\n"); + if(!(flag & (1u << 31))) + Xorriso_result(xorriso, 0); + } + } + if(s1.st_uid != s2.st_uid) { sprintf(respt, "%s st_uid : %lu <> %lu\n", a, (unsigned long) s1.st_uid, (unsigned long) s2.st_uid); diff --git a/xorriso/configure_ac.txt b/xorriso/configure_ac.txt index f730cfdf..574be64c 100644 --- a/xorriso/configure_ac.txt +++ b/xorriso/configure_ac.txt @@ -372,6 +372,24 @@ else echo "disabled Linux chattr(1) flags" fi +dnl ts C41009 +AH_TEMPLATE([Libisofs_with_aaip_projiD], + [Define to use XFS-style project id capabilities]) +PROJID_DEF= +AC_ARG_ENABLE(projid, +[ --enable-projid Enable processing of XFS-style project id, default=yes], + , enable_projid=yes) +if test x"$enable_projid" = xyes; then + AC_CHECK_HEADER(linux/fs.h, PROJID_DEF="-DLibisofs_with_aaip_projiD", + PROJID_DEF=) +fi +if test x"$PROJID_DEF" = x; then + echo "disabled XFS-style project id" +else + AC_DEFINE([Libisofs_with_aaip_projiD], []) + echo "enabled XFS-style project id" +fi + AH_TEMPLATE([Libisofs_with_zliB], [Define to use compression via zlib]) AH_TEMPLATE([LIBJTE_WITH_ZLIB], [Allow libjte to use zlib]) AC_ARG_ENABLE(zlib, diff --git a/xorriso/disk_ops.c b/xorriso/disk_ops.c index af5eb9fc..ac5f75ca 100644 --- a/xorriso/disk_ops.c +++ b/xorriso/disk_ops.c @@ -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); diff --git a/xorriso/drive_mgt.c b/xorriso/drive_mgt.c index 60b009a5..c00bb17d 100644 --- a/xorriso/drive_mgt.c +++ b/xorriso/drive_mgt.c @@ -182,7 +182,14 @@ static int Xorriso_grasp_loaded_aaip(struct XorrisO *xorriso, IsoImage *volset, if(!(xorriso->do_aaip & (1 << 11))) { /* lfa_flags not enabled for "read" */ - ret= Xorriso_remove_all_lfa_flags(xorriso, 0); + ret= Xorriso_tree_remove_isofs_var(xorriso, "isofs.fa", 0); + if(ret <= 0) + goto ex; + } + + if(!(xorriso->do_aaip & (1 << 17))) { + /* projid not enabled */ + ret= Xorriso_tree_remove_isofs_var(xorriso, "isofs.pi", 0); if(ret <= 0) goto ex; } @@ -276,7 +283,7 @@ int Xorriso_make_read_options(struct XorrisO *xorriso, if(xorriso->read_fs & 2) ext|= isoburn_ropt_nojoliet; if((xorriso->ino_behavior & (1 | 2)) && - !(xorriso->do_aaip & (1 | 4 | 32 | (1 << 11))) + !(xorriso->do_aaip & (1 | 4 | 32 | (1 << 11) | (1 << 17))) && !(xorriso->do_md5 & 1) && !(xorriso->do_hfsplus)) ext|= isoburn_ropt_noaaip; if(!(xorriso->do_aaip & 1)) @@ -285,6 +292,8 @@ int Xorriso_make_read_options(struct XorrisO *xorriso, ext|= isoburn_ropt_noea; if(xorriso->do_aaip & (1 << 11)) ext|= isoburn_ropt_lfa_flags; + if(xorriso->do_aaip & (1 << 17)) + ext|= isoburn_ropt_projid; if(xorriso->do_aaip & (1 << 15)) ext|= isoburn_ropt_lfa_only_settable; if(xorriso->ino_behavior & 1) @@ -479,6 +488,8 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr, } if(xorriso->do_aaip & (1 << 11)) aquire_flag|= 1 << 11; + if(xorriso->do_aaip & (1 << 17)) + aquire_flag|= 1 << 12; if(xorriso->do_aaip & (1 << 15)) aquire_flag|= 1 << 15; if(flag & 128) diff --git a/xorriso/findjob.c b/xorriso/findjob.c index 974b1dda..96f9a4e3 100644 --- a/xorriso/findjob.c +++ b/xorriso/findjob.c @@ -372,20 +372,26 @@ int Findjob_new(struct FindjoB **o, char *start_path, int flag) m->text_2= NULL; /* a mere pointer, not managed memory */ m->user= 0; m->group= 0; + m->mode_and= ~0; + m->mode_or= 0; m->type= 0; m->date= 0; - m->start_path= strdup(start_path); - if(m->start_path==NULL) - goto failed; m->found_path= NULL; m->estim_upper_size= 0; m->estim_lower_size= 0; m->subjob= NULL; + m->last_data_file_block= 0; + m->lfa_flags= 0; + m->projid_low= -1; + m->projid_high= -1; m->errmsg[0]= 0; m->errn= 0; m->match_count= 0; m->depth= 0; + m->start_path= strdup(start_path); + if(m->start_path==NULL) + goto failed; ret= Exprnode_new(&(m->test_tree), m, NULL, "-find", (m->use_shortcuts)<<1); if(ret<=0) goto failed; diff --git a/xorriso/findjob.h b/xorriso/findjob.h index fe13172c..4b94fa96 100644 --- a/xorriso/findjob.h +++ b/xorriso/findjob.h @@ -59,6 +59,7 @@ struct ExprtesT { -2=smaller_or_equal , 2=larger_or_equal) 28= -has_lfa_flags uint64_t *arg1 (Linux file attribute flag bits) 29= -has_some_lfa_flags_of uint64_t *arg1 + 30= -has_projid uint64_t *arg1 */ int test_type; @@ -193,6 +194,9 @@ struct FindjoB { 61= chattr mode 62= internal: like 27 "setfattr name value" but with permission for all name spaces including "isofs." + 63= get_projid + 64= set_projid projid + 65= get_projid_minmax */ int action; int prune; @@ -213,6 +217,8 @@ struct FindjoB { struct FindjoB *subjob; uint32_t last_data_file_block; uint64_t lfa_flags; + off_t projid_low; + off_t projid_high; /* Errors */ char errmsg[4096]; diff --git a/xorriso/iso_img.c b/xorriso/iso_img.c index d9a7afb5..8368901f 100644 --- a/xorriso/iso_img.c +++ b/xorriso/iso_img.c @@ -51,6 +51,8 @@ int Xorriso_set_ignore_aclea(struct XorrisO *xorriso, int flag) hflag|= 8; if(xorriso->do_aaip & 2048) hflag|= 4; + if(xorriso->do_aaip & (1 << 17)) + hflag|= 64; if(xorriso->do_aaip & (1 << 15)) hflag|= 32; iso_image_set_ignore_aclea(volume, hflag); diff --git a/xorriso/iso_manip.c b/xorriso/iso_manip.c index 8f77c532..e1475b8a 100644 --- a/xorriso/iso_manip.c +++ b/xorriso/iso_manip.c @@ -40,7 +40,7 @@ /* @param flag bit0= give directory x-permission where is r-permission - bit1= do not transfer ACL, xattr, file attribute flags + bit1= do not transfer ACL, xattr, lfa_flags, projid bit2= record dev,inode (only if enabled by xorriso) bit3= with bit0: pretend to have indeed a directory bit5= transfer ACL or xattr from eventual link target @@ -50,7 +50,8 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf, { mode_t mode; int ret= 1, max_bit, os_errno; - uint64_t lfa_flags; + uint64_t lfa_flags= 0; + uint32_t projid= 0; size_t num_attrs= 0, *value_lengths= NULL; char **names= NULL, **values= NULL; @@ -75,7 +76,7 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf, iso_node_set_mtime(node, stbuf->st_mtime); iso_node_set_ctime(node, stbuf->st_ctime); - if((xorriso->do_aaip & (1 | 4 | 2048)) && !(flag & 2)) { + if((xorriso->do_aaip & (1 | 4 | 2048 | (1 << 17))) && !(flag & 2)) { ret= iso_local_get_attrs(disk_path, &num_attrs, &names, &value_lengths, &values, ((xorriso->do_aaip & 1) && !(flag & 2)) | ((!(xorriso->do_aaip & 4)) << 2) @@ -104,11 +105,13 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf, 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, - "Error when obtaining file attribute flags", - os_errno, "FAILURE", 1 | 2); - ret= 0; goto ex; + if(ret != (int) ISO_LFA_NOT_ENABLED) { + Xorriso_process_msg_queues(xorriso, 0); + Xorriso_report_iso_error(xorriso, disk_path, ret, + "Error when obtaining file attribute flags", + os_errno, "FAILURE", 1 | 2); + ret= 0; goto ex; + } } else if(ret == 1 || ret == 2) { ret= iso_node_set_lfa_flags(node, lfa_flags, 0); if(ret < 0) { @@ -120,6 +123,15 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf, } } } + if(xorriso->do_aaip & (1 << 17)) { + ret= Xorriso_get_projid(xorriso, NULL, disk_path, &projid, + (flag & 32) | 2); + if(ret <= 0) + goto ex; + ret= Xorriso_set_projid(xorriso, node, NULL, projid, 0); + if(ret <= 0) + goto ex; + } } if((flag & 4) && ((xorriso->do_aaip & 16) || !(xorriso->ino_behavior & 2))) { @@ -2712,6 +2724,7 @@ int Xorriso_findi_action(struct XorrisO *xorriso, struct FindjoB *job, uint64_t lfa_flags, chattr_flags; int max_bit; char *lfa_text= NULL; + uint32_t projid; action= Findjob_get_action_parms(job, &target, &text_2, &user, &group, &mode_and, &mode_or, &type, &date, &subjob, @@ -3044,6 +3057,23 @@ int Xorriso_findi_action(struct XorrisO *xorriso, struct FindjoB *job, ret= Xorriso_set_lfa_flags(xorriso, node, show_path, "", chattr_flags, type, 1 | 4); + } else if(action == 63) { /* get_projid */ + ret= Xorriso_get_projid(xorriso, node, NULL, &projid, 0); + if(ret > 0) + Xorriso_show_projid(xorriso, show_path, projid, 0); + + } else if(action == 64) { /* set_projid */ + ret= Xorriso_set_projid(xorriso, node, NULL, (uint32_t) chattr_flags, 0); + + } else if(action == 65) { /* get_projid_minmax */ + ret= Xorriso_get_projid(xorriso, node, NULL, &projid, 0); + 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 { /* includes : 15 in_iso */ Xorriso_esc_filepath(xorriso, show_path, xorriso->result_line, 0); strcat(xorriso->result_line, "\n"); @@ -3117,6 +3147,7 @@ return: off_t range_lba, end_lba, *file_end_lbas= NULL, *file_start_lbas= NULL; off_t start_lba; uint64_t lfa_flags, node_flags; + uint32_t projid; void *arg1, *arg2; char ft, *decision, md5[16], bless_code[17], *acl_text= NULL; regmatch_t name_match; @@ -3456,6 +3487,21 @@ test_name:; value= !!(node_flags & lfa_flags); } + break; case 30: /* -has_projid uint64_t projid (in ->lfa_flags) */ + lfa_flags= *((uint64_t *) ftest->arg1); + if(node == NULL) { + hflag= 2; + ret= Xorriso_get_projid(xorriso, NULL, path, &projid, hflag); + } else { + ret= Xorriso_get_projid(xorriso, node, path, &projid, 0); + } + if(ret <= 0) { + Xorriso_process_msg_queues(xorriso, 0); + value= 0; + goto ex; + } + value= (lfa_flags == (uint64_t) projid); + break; default: /* >>> complain about unknown test type */; @@ -4846,18 +4892,29 @@ int Xorriso_set_lfa_flags(struct XorrisO *xorriso, void *in_node, char *path, } -int Xorriso_remove_all_lfa_flags(struct XorrisO *xorriso, int flag) +int Xorriso_tree_remove_isofs_var(struct XorrisO *xorriso, char *isofs_name, + int flag) { int ret; struct FindjoB *job= NULL; struct stat dir_stbuf; + char name[40]; + + if(strlen(isofs_name) > 38 || strncmp(isofs_name, "isofs.", 6) != 0) { + Xorriso_msgs_submit(xorriso, 0, + "Program error: Bad name for Xorriso_tree_remove_isofs_var", + 0, "FATAL", 0); + Xorriso_msgs_submit(xorriso, 0, isofs_name, 0, "FATAL", 0); + return(-1); + } + sprintf(name, "-%s", isofs_name); ret= Findjob_new(&job, "/", 0); if(ret<=0) { Xorriso_no_findjob(xorriso, "xorriso", 0); return(-1); } - Findjob_set_action_text_2(job, 62, "-isofs.fa", "", 0); + Findjob_set_action_text_2(job, 62, name, "", 0); ret= Xorriso_findi(xorriso, job, NULL, (off_t) 0, NULL, "/", &dir_stbuf, 0, 0); @@ -4867,3 +4924,34 @@ int Xorriso_remove_all_lfa_flags(struct XorrisO *xorriso, int flag) return(1); } + +/* @param in_node if not NULL: the node to manipulate + @path if in_node is NULL: path to node + in any case: path to report with errors +*/ +int Xorriso_set_projid(struct XorrisO *xorriso, void *in_node, char *path, + uint32_t projid, int flag) +{ + int ret; + IsoNode *node; + + if(in_node != NULL) { + node= (IsoNode *) in_node; + } else { + ret= Xorriso_get_node_by_path(xorriso, path, NULL, &node, 0); + if(ret <= 0) + return(ret); + } + ret= iso_node_set_projid(node, projid, 0); + if(ret < 0) { + Xorriso_process_msg_queues(xorriso, 0); + Xorriso_report_iso_error(xorriso, path, ret, + "Error when setting XFS-style project id of ISO node", + 0, "SORRY", 1); + return(-1); + } + Xorriso_set_change_pending(xorriso, 0); + return(1); +} + + diff --git a/xorriso/iso_tree.c b/xorriso/iso_tree.c index de423c4d..2b2536d6 100644 --- a/xorriso/iso_tree.c +++ b/xorriso/iso_tree.c @@ -2973,14 +2973,66 @@ from_disk:; ret= iso_local_get_lfa_flags(path, lfa_flags, max_bit, &os_errno, flag & ((1 << 5) | (1 << 7))); if(ret < 0) { - Xorriso_process_msg_queues(xorriso, 0); - Xorriso_report_iso_error(xorriso, path, ret, - "Error when obtaining lsattr flags of disk file", - os_errno, "WARNING", 1); - return(-1); + if(ret != (int) ISO_LFA_NOT_ENABLED) { + Xorriso_process_msg_queues(xorriso, 0); + Xorriso_report_iso_error(xorriso, path, ret, + "Error when obtaining lsattr flags of disk file", + os_errno, "WARNING", 1); + return(-1); + } } if(ret == 1 || ret == 2) return(1); return(0); } + +/* + @param in_node if not NULL and not flag bit1: omit path resolution + @param flag bit1= path is disk_path + bit5= in case of symbolic link on disk: inquire link target + @return >0 = ok , *projid is valid + <0 = libisofs error +*/ +int Xorriso_get_projid(struct XorrisO *xorriso, void *in_node, char *path, + uint32_t *projid, int flag) +{ + int ret, os_errno; + IsoNode *node; + + *projid= 0; + + if(flag & 2) + goto from_disk; + + node= (IsoNode *) in_node; + if(node == NULL) { + ret= Xorriso_get_node_by_path(xorriso, path, NULL, &node, 0); + if(ret <= 0) + return(ret); + } + ret= iso_node_get_projid(node, projid, 0); + if(ret < 0) { + Xorriso_process_msg_queues(xorriso, 0); + Xorriso_report_iso_error(xorriso, path, ret, + "Error when obtaining XFS-style project id of ISO node", + 0, "WARNING", 1); + return(-1); + } + return(1); + +from_disk:; + ret= iso_local_get_projid(path, projid, &os_errno, flag & (1 << 5)); + if(ret < 0) { + if(ret != (int) ISO_PROJID_NOT_ENABLED) { + Xorriso_process_msg_queues(xorriso, 0); + Xorriso_report_iso_error(xorriso, path, ret, + "Error when obtaining XFS-style project id of disk file", + os_errno, "WARNING", 1); + return(-1); + } + } + return(1); +} + + diff --git a/xorriso/lib_mgt.c b/xorriso/lib_mgt.c index 58f9a091..91a05a2b 100644 --- a/xorriso/lib_mgt.c +++ b/xorriso/lib_mgt.c @@ -930,6 +930,8 @@ int Xorriso_list_extras(struct XorrisO *xorriso, char *mode, int flag) Xorriso_result(xorriso, 0); sprintf(xorriso->result_line, "Local chattr : -lfa_flags\n"); Xorriso_result(xorriso, 0); + sprintf(xorriso->result_line, "Local projid : -projid\n"); + Xorriso_result(xorriso, 0); sprintf(xorriso->result_line, "Jigdo files : -jigdo\n"); Xorriso_result(xorriso, 0); sprintf(xorriso->result_line, "zisofs : -zisofs\n"); @@ -946,13 +948,15 @@ int Xorriso_list_extras(struct XorrisO *xorriso, char *mode, int flag) "List of xorriso extra features. yes = enabled , no = disabled\n"); Xorriso_list_extras_result(xorriso, mode, "list_extras", 0); - ret= iso_local_attr_support(7); + ret= iso_local_attr_support(15); sprintf(xorriso->result_line, "Local ACL : %s\n", ret & 1 ? "yes" : "no"); Xorriso_list_extras_result(xorriso, mode, "acl", 0); sprintf(xorriso->result_line, "Local xattr : %s\n", ret & 2 ? "yes" : "no"); Xorriso_list_extras_result(xorriso, mode, "xattr", 0); sprintf(xorriso->result_line, "Local chattr : %s\n", ret & 4 ? "yes" : "no"); Xorriso_list_extras_result(xorriso, mode, "lfa_flags", 0); + sprintf(xorriso->result_line, "Local projid : %s\n", ret & 8 ? "yes" : "no"); + Xorriso_list_extras_result(xorriso, mode, "lfa_flags", 0); sprintf(xorriso->result_line, "Jigdo files : %s\n", #ifdef Xorriso_with_libjtE diff --git a/xorriso/opts_d_h.c b/xorriso/opts_d_h.c index d4e66d3b..f05abb34 100644 --- a/xorriso/opts_d_h.c +++ b/xorriso/opts_d_h.c @@ -958,6 +958,22 @@ off_t_overflow:; Findjob_set_uint64_filter(job, 28 + (strcmp(argv[i - 1], "-has_some_lfa_flags_of") == 0), lfa_flags, 0); + + } else if(strcmp(argv[i], "-has_projid") == 0) { + if(i + 1 >= end_idx) + goto not_enough_arguments; + i++; + ret= Sfile_text_to_off_t(argv[i - 1], &start_lba, 0); + if(ret <= 0) { +bad_projid:; + sprintf(xorriso->info_text, + "-has_projid: project id number too large or too small"); + goto sorry_ex; + } + if(start_lba < 0 || start_lba > (off_t) 0xffffffff) + goto bad_projid; + Findjob_set_uint64_filter(job, 30, (uint64_t) start_lba, 0); + } else if(strcmp(argv[i], "-has_filter")==0) { Findjob_set_filter_filter(job, 1, 0); } else if(strcmp(argv[i], "-has_no_filter")==0) { @@ -1494,6 +1510,25 @@ not_enough_exec_arguments:; if(ret <= 0) goto sorry_ex; Findjob_set_action_chattr(job, 61, lfa_flags, operator, 0); + } else if(strcmp(cpt, "get_projid") == 0) { + Findjob_set_action_target(job, 63, NULL, 0); + } else if(strcmp(cpt, "set_projid") == 0) { + if(i + 1 >= end_idx) + goto not_enough_exec_arguments; + i++; + ret= Sfile_text_to_off_t(argv[i], &start_lba, 0); + if(ret <= 0) { +bad_set_projid:; + sprintf(xorriso->info_text, + "set_projid: project id number too large or too small"); + goto sorry_ex; + } + if(start_lba < 0 || start_lba > (off_t) 0xffffffff) + goto bad_set_projid; + operator= 0; + Findjob_set_action_chattr(job, 64, start_lba, operator, 0); + } else if(strcmp(cpt, "get_projid_minmax") == 0) { + Findjob_set_action_target(job, 65, NULL, 0); } else { sprintf(xorriso->info_text, "-find -exec: unknown action "); Text_shellsafe(argv[i], xorriso->info_text, 1); @@ -1564,6 +1599,17 @@ ex:; !!(first_job->estim_upper_size % 2048))); Xorriso_result(xorriso,0); } + if(first_job != NULL && first_job->action == 65) { + if(first_job->projid_low >= 0 && first_job->projid_high >= 0) { + sprintf(xorriso->result_line, "projid minmax: %lu %lu\n", + (unsigned long) first_job->projid_low, + (unsigned long) first_job->projid_high); + } else { + sprintf(xorriso->result_line, "projid minmax: -1 -1\n"); + } + Xorriso_result(xorriso,0); + } + if(access_acl_text != NULL) free(access_acl_text); if(default_acl_text != NULL) @@ -1671,6 +1717,7 @@ int Xorriso_option_for_backup(struct XorrisO *xorriso, int flag) if(xorriso->lfa_flags_default & 8) Xorriso_option_lfa_flags(xorriso, "default:on:import_only_settable:restore_mask=aAcdDijmPsStTux", 0); + Xorriso_option_projid(xorriso, "on", 0); return(1); } @@ -1713,6 +1760,61 @@ int Xorriso_option_genisoimage_completion(struct XorrisO *xorriso, } +/* Commands -get_projid alias get_projidi + -get_projid_r alias -get_projid_ri */ +/* @param flag bit0=recursive -get_projid_r +*/ +int Xorriso_option_get_projid(struct XorrisO *xorriso, + int argc, char **argv, int *idx, int flag) +{ + int i, ret, was_failure= 0, end_idx, fret; + int optc= 0; + uint32_t projid= 0; + char **optv= NULL; + struct FindjoB *job= NULL; + struct stat dir_stbuf; + + ret= Xorriso_opt_args(xorriso, "-get_projid", argc, argv, *idx, + &end_idx, &optc, &optv, 0); + if(ret <= 0) + goto ex; + + for(i= 0; i < optc; i++) { + if(flag & 1) { + ret= Findjob_new(&job, optv[i], 0); + if(ret <= 0) { + Xorriso_no_findjob(xorriso, "-get_projid_r", 0); + {ret= -1; goto ex;} + } + Findjob_set_action_target(job, 63, NULL, 0); + ret= Xorriso_findi(xorriso, job, NULL, (off_t) 0, + NULL, optv[i], &dir_stbuf, 0, 0); + Findjob_destroy(&job, 0); + } else { + ret= Xorriso_get_projid(xorriso, NULL, optv[i], &projid, 0); + if(ret > 0) + Xorriso_show_projid(xorriso, optv[i], projid, 0); + } + if(ret > 0 && !xorriso->request_to_abort) + continue; /* regular bottom of loop */ + was_failure= 1; + fret= Xorriso_eval_problem_status(xorriso, ret, 1 | 2); + if(fret>=0) + continue; + ret= 0; goto ex; + } + ret= 1; +ex:; + (*idx)= end_idx; + Xorriso_opt_args(xorriso, "-get_projid", argc, argv, *idx, &end_idx, + &optc, &optv, 256); + Findjob_destroy(&job, 0); + if(ret<=0) + return(ret); + return(!was_failure); +} + + /* Commands -getfacl alias -getfacli, -getfacl_r alias -getfacl_ri -getfattr alias getfattri */ @@ -1978,10 +2080,14 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag) " -lfa_flags mode[:mode ...]", " Enable or disable reading and restoring of Linux chattr", " flags.", +" -projid \"on\"|\"off\"|\"restore_0\"|\"map+\"low,high=low,high", +" Enable or disable reading and restoring of XFS-style", +" project ids. Define mapping of ids at restore time.", " -md5 \"on\"|\"all\"|\"off\"", " Enable or disable processing of MD5 checksums.", " -for_backup", " Shortcut for: -hardlinks on -acl on -xattr any -md5 on", +" -projid on", " possibly: -lfa_flags default:on:restore_mask=aAcCdDijmPsStTux", " -ecma119_map \"unmapped\"|\"stripped\"|\"uppercase\"|\"lowercase\"", " Choose conversion of file names if neither Rock Ridge", @@ -2254,6 +2360,12 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag) " xattr of the iso_rr_path given by line \"# file:\".", " -chattr \"+\"|\"-\"|\"=\"|\".\"mode iso_rr_path [***]", " Set or unset Linux chattr flags of the given files.", +" -chattr_r \"+\"|\"-\"|\"=\"|\".\"mode iso_rr_path [***]", +" Like -chattr but affecting all files below directories.", +" -set_projid number iso_rr_path [***]", +" Set XFS-style project id number of the given files.", +" -set_projid_r number iso_rr_path [***]", +" Like -set_projid but affecting all files below directories.", " -alter_date type timestring iso_rr_path [***]", " Alter the date entries of a file in the ISO image. type is", " one of \"a\", \"m\", \"b\" for:", @@ -2273,6 +2385,7 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag) " -lba_range start count, -damaged, -has_acl, -has_xattr,", " -has_aaip, -has_filter, -has_md5, -has_any_xattr,", " -has_lfa_flags letters, -has_some_lfa_flags_of letters,", +" -has_projid number,", " -has_hfs_crtp, -has_hfs_bless, -bad_outname,", " -name_limit_blocker, -maxdepth, -mindepth, -size,", " -prune, -decision yes|no, -true, -false", @@ -2286,9 +2399,10 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag) " list_extattr, get_md5, check_md5, make_md5,", " set_hfs_crtp, get_hfs_crtp, set_hfs_bless, get_hfs_bless,", " set_filter, show_stream, show_stream_id, mkisofs_r,", -" hide, print_outname, estimate_size, in_iso, not_in_iso", -" add_missing, empty_iso_dir, is_full_in_iso, sort_weight", -" update_merge, rm_merge, clear_merge, lsattrd, chattr, find", +" hide, print_outname, estimate_size, in_iso, not_in_iso,", +" add_missing, empty_iso_dir, is_full_in_iso, sort_weight,", +" update_merge, rm_merge, clear_merge, lsattrd, chattr,", +" get_projid, set_projid, get_projid_minmax, find", " params are their parameters except iso_rr_path.", " -mkdir iso_rr_path [...]", " Create empty directories if they do not exist yet.", @@ -2442,12 +2556,14 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag) " -lsdx pattern [***] like -lsx but listing directories as single items.", " -lslx pattern [***] like -lsx but also telling some file attributes.", " -lsdlx pattern [***] like -lsdx but also telling some file attributes.", -" -lsattr pattern [***] lists Linux chattr flags of the given files.", -" -lsattrd pattern [***] like -lsattr but listing directories as single items.", " -getfacl pattern [***] list eventual ACLs of the given files.", " -getfacl_r pattern [***] like -getfacl but listing whole file trees.", " -getfattr pattern [***] list eventual xattr of the given files.", -" -getfxattr_r pattern [***] like -getfxattr but listing whole file trees.", +" -getfattr_r pattern [***] like -getfattr but listing whole file trees.", +" -lsattr pattern [***] lists Linux chattr flags of the given files.", +" -lsattrd pattern [***] like -lsattr but listing directories as single items.", +" -get_projid pattern [***] lists XFS-style project ids of the given files.", +" -get_projid_r pattern [***] like -get_projid but listing whole file trees.", "", " -du pattern [***] recursively lists sizes of files or directories in the", " ISO image which match one of the shell parser patterns.", diff --git a/xorriso/opts_p_z.c b/xorriso/opts_p_z.c index c7f714c5..755d73e0 100644 --- a/xorriso/opts_p_z.c +++ b/xorriso/opts_p_z.c @@ -401,6 +401,95 @@ int Xorriso_option_prog_help(struct XorrisO *xorriso, char *name, int flag) } +/* Command -projid */ +int Xorriso_option_projid(struct XorrisO *xorriso, char *mode, int flag) +{ + int ret, l; + off_t from_low= 0, from_high= 0, to_low= 0, to_high= 0; + char *npt, *cpt, errmsg[80]; + + npt= cpt= mode; + for(; npt != NULL; cpt= npt + 1) { + npt= strchr(cpt, ':'); + if(npt==NULL) + l= strlen(cpt); + else + l= npt-cpt; + if(l == 0) + continue; + if(l == 2 && strncmp(cpt, "on", l) == 0) { + xorriso->do_aaip|= (1 << 17); + } else if(l == 3 && strncmp(cpt, "off", l) == 0) { + xorriso->do_aaip&= ~(1 << 17); + } else if(l == 9 && strncmp(cpt, "restore_0", l) == 0) { + xorriso->do_aaip|= (1 << 18); + } else if(l == 9 && strncmp(cpt, "no_restore_0", l) == 0) { + xorriso->do_aaip&= ~(1 << 18); + } else if(l >= 4 && strncmp(cpt, "map+", 4) == 0) { + if(xorriso->projid_mapper == NULL) { + ret= Numbermapper_new(&(xorriso->projid_mapper), + (off_t) 0, (off_t) 0xffffffff, 0); + if(ret <= 0) { + sprintf(xorriso->info_text, "-projid: Cannot create mapper object"); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); + {ret= 0; goto ex;} + } + } + ret= Numbermapper_decode(xorriso->projid_mapper, cpt + 4, + &from_low, &from_high, &to_low, &to_high, + errmsg, 0); + if(ret <= 0) { + sprintf(xorriso->info_text, "-projid: map+ text unusable: %s", errmsg); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); + {ret= 0; goto ex;} + } + ret= Numbermapper_add(xorriso->projid_mapper, from_low, from_high, + to_low, to_high, 0); + if(ret <= 0) { + sprintf(xorriso->info_text, "-projid: Cannot create mapper entry"); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); + {ret= 0; goto ex;} + } + } else if(l > 9 && strncmp(cpt, "map_test=", 9) == 0) { + strncpy(errmsg, cpt + 9, l - 9); + errmsg[l - 9]= 0; + ret= Sfile_text_to_off_t(errmsg, &from_low, 0); + if(ret <= 0) { + sprintf(xorriso->info_text, + "-projid: map= text cannot be converted to a number: %s", + errmsg); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); + {ret= 0; goto ex;} + } + ret= Numbermapper_map(xorriso->projid_mapper, from_low, &to_low, 0); + if(ret < 0) { + sprintf(xorriso->info_text, + "-projid: map=%s yields unexpected error", errmsg); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); + {ret= 0; goto ex;} + } + sprintf(xorriso->result_line, "projid mapped: %lu -> %lu\n", + from_low, to_low); + Xorriso_result(xorriso, 0); + } else if(l == 7 && strncmp(cpt, "default", l) == 0) { + xorriso->do_aaip&= ~(3 << 17); + Numbermapper_destroy(&(xorriso->projid_mapper), 0); + } else { + sprintf(xorriso->info_text, + "-projid: unknown or mistyped mode in '%s'", mode); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); + {ret= 0; goto ex;} + } + } + ret= Xorriso_set_ignore_aclea(xorriso, 0); + if(ret <= 0) + goto ex; + ret= 1; +ex: + return(ret); +} + + /* Option -prompt */ int Xorriso_option_prompt(struct XorrisO *xorriso, char *text, int flag) { @@ -831,6 +920,71 @@ int Xorriso_option_session_log(struct XorrisO *xorriso, char *path, int flag) } +/* Commands -set_projid alias -set_projidi + -set_projid_r alias -set_projid_ri */ +/* @param flag bit0=recursive -set_projid_r +*/ +int Xorriso_option_set_projid(struct XorrisO *xorriso, char *projid_text, + int argc, char **argv, int *idx, int flag) +{ + int i, ret, was_failure= 0, end_idx, fret; + int optc= 0; + uint32_t projid= 0; + off_t num; + char **optv= NULL; + struct FindjoB *job= NULL; + struct stat dir_stbuf; + + ret= Xorriso_opt_args(xorriso, "-set_projid", argc, argv, *idx, + &end_idx, &optc, &optv, 0); + if(ret <= 0) + goto ex; + ret= Sfile_text_to_off_t(projid_text, &num, 0); + if(ret <= 0) { +bad_set_projid:; + sprintf(xorriso->info_text, + "-set_projid: project id number too large or too small"); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); + ret= 0; goto ex; + } + if(num < 0 || num > (off_t) 0xffffffff) + goto bad_set_projid; + projid= num; + + for(i= 0; i < optc; i++) { + if(flag & 1) { + ret= Findjob_new(&job, optv[i], 0); + if(ret <= 0) { + Xorriso_no_findjob(xorriso, "-set_projid_r", 0); + {ret= -1; goto ex;} + } + Findjob_set_action_chattr(job, 64, (uint64_t) projid, 0, 0); + ret= Xorriso_findi(xorriso, job, NULL, (off_t) 0, + NULL, optv[i], &dir_stbuf, 0, 0); + Findjob_destroy(&job, 0); + } else { + ret= Xorriso_set_projid(xorriso, NULL, optv[i], projid, 0); + } + if(ret>0 && !xorriso->request_to_abort) + continue; /* regular bottom of loop */ + was_failure= 1; + fret= Xorriso_eval_problem_status(xorriso, ret, 1|2); + if(fret>=0) + continue; + ret= 0; goto ex; + } + ret= 1; +ex:; + (*idx)= end_idx; + Xorriso_opt_args(xorriso, "-set_projid", argc, argv, *idx, &end_idx, + &optc, &optv, 256); + Findjob_destroy(&job, 0); + if(ret<=0) + return(ret); + return(!was_failure); +} + + /* Option -setfacl_list alias -setfacl_listi */ int Xorriso_option_setfacl_listi(struct XorrisO *xorriso, char *path, int flag) { diff --git a/xorriso/parse_exec.c b/xorriso/parse_exec.c index e2e4fee8..78e3f97e 100644 --- a/xorriso/parse_exec.c +++ b/xorriso/parse_exec.c @@ -599,7 +599,8 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv, "options_from_file","osirrox","outdev","out_charset","overwrite", "pacifier","padding","path_list","pathspecs","pkt_output", "preparer_id","print","print_info","print_mark","prompt", - "prog","prog_help","publisher","quoted_not_list","quoted_path_list", + "prog","prog_help","projid","publisher", + "quoted_not_list","quoted_path_list", "read_fs","read_speed","reassure","report_about", "report_el_torito","report_system_area","rockridge", "rom_toc_scan","rr_reloc_dir","scsi_dev_family","scsi_log", @@ -640,6 +641,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv, "compare_l","concat","cp_clone","cp_rax","cp_rx","cpr","cpri","cpax","cpx", "du","dui","dus","dusi","dux","dusx","external_filter","extract_l", "file_size_limit","find","findi","finds","findx", + "get_projid","get_projidi","get_projid_r","get_projid_ri", "getfacl","getfacli","getfacl_r","getfacl_ri", "getfattr","getfattri","getfattr_r","getfattr_ri","hide", "launch_frontend","lsattr","lsattri","lsattrd","lsaddrdi", @@ -647,6 +649,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv, "lsx","lslx","lsdx","lsdlx","map_l","mv","mvi","mkdir","mkdiri", "not_paths","rm","rmi","rm_r","rm_ri","rmdir","rmdiri", "update_l","update_li","update_lx","update_lxi", + "set_projid","set_projidi","set_projid_r","set_projid_ri", "setfacl","setfacli","setfacl_list","setfacl_listi", "setfacl_r","setfacl_ri","setfattr","setfattri", "setfattr_r","setfattr_ri", @@ -746,7 +749,7 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso, "* Influencing the behavior of image loading:", "read_speed", "load", "displacement", "read_fs", "assert_volid", "in_charset", "auto_charset", - "for_backup", "hardlinks", "acl", "xattr", "md5", "lfa_flags", + "for_backup", "hardlinks", "acl", "xattr", "md5", "lfa_flags", "projid", "ecma119_map", "joliet_map", "disk_dev_ino", "rom_toc_scan", "calm_drive", "ban_stdio_write", "data_cache_size", @@ -781,8 +784,8 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso, "* Navigation in ISO image and disk filesystem (2):", "ls", "lsd", "lsl", "lsdl", "lsx", "lsdx", "lslx", "lsdlx", - "lsattr", "lsattri", "lsattrd", "lsaddrdi", "getfacl", "getfacl_r", "getfattr", "getfattr_r", "du", "dus", + "lsattr", "lsattrd", "get_projid", "get_projid_r", "dux", "dusx", "findx", "compare", "compare_r", "compare_l", "show_stream", "show_stream_r", @@ -791,7 +794,8 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso, "rm", "rm_r", "rmdir", "move", "mv", "chown", "chown_r", "chgrp", "chgrp_r", "chmod", "chmod_r", "setfacl", "setfacl_r", "setfacl_list", "setfattr", "setfattr_r", "setfattr_list", - "chattr", "chattr_r", "alter_date", "alter_date_r", "hide", + "chattr", "chattr_r", "set_projid", "set_projid_r", + "alter_date", "alter_date_r", "hide", "* Filters for data file content:", "external_filter", "unregister_filter", "close_filter_list", @@ -1446,6 +1450,13 @@ next_command:; (*idx)++; ret= Xorriso_option_genisoimage_completion(xorriso, arg1, 0); + } else if(strcmp(cmd, "get_projid") == 0 || strcmp(cmd, "get_projidi") == 0) { + ret= Xorriso_option_get_projid(xorriso, argc, argv, idx, 0); + + } else if(strcmp(cmd, "get_projid_r") == 0 || + strcmp(cmd, "get_projid_ri") == 0) { + ret= Xorriso_option_get_projid(xorriso, argc, argv, idx, 1); + } else if(strcmp(cmd,"getfacl")==0 || strcmp(cmd,"getfacli")==0) { ret= Xorriso_option_getfacli(xorriso, argc, argv, idx, 0); @@ -1752,6 +1763,10 @@ next_command:; (*idx)++; ret= Xorriso_option_prog(xorriso, arg1, 0); + } else if(strcmp(cmd,"projid") == 0) { + (*idx)++; + ret= Xorriso_option_projid(xorriso, arg1, 0); + } else if(strcmp(cmd,"publisher")==0) { (*idx)++; Xorriso_option_publisher(xorriso, arg1, 0); @@ -1866,6 +1881,15 @@ next_command:; ret= Xorriso_option_mount(xorriso, arg1, arg2, argv[(*idx)-2], argv[(*idx)-1], 2); + } else if(strcmp(cmd, "set_projid") == 0 || strcmp(cmd, "set_projidi") == 0) { + (*idx)++; + ret= Xorriso_option_set_projid(xorriso, arg1, argc, argv, idx, 0); + + } else if(strcmp(cmd, "set_projid_r") == 0 || + strcmp(cmd, "set_projid_ri") == 0) { + (*idx)++; + ret= Xorriso_option_set_projid(xorriso, arg1, argc, argv, idx, 1); + } else if(strcmp(cmd,"setfacl")==0 || strcmp(cmd,"setfacli")==0) { (*idx)+= 1; ret= Xorriso_option_setfacli(xorriso, arg1, argc, argv, idx, 0); diff --git a/xorriso/read_run.c b/xorriso/read_run.c index e5aa8889..c4bab8c3 100644 --- a/xorriso/read_run.c +++ b/xorriso/read_run.c @@ -584,6 +584,8 @@ int Xorriso_restore_properties(struct XorrisO *xorriso, char *disk_path, int *errnos= NULL; uint64_t lfa_flags= 0, mask= 0, push_mask= 0; int max_bit, os_errno; + uint32_t projid; + off_t off_t_projid; static uint64_t lfa_C= 0xffffffff, lfa_i= 0, lfa_a= 0, lfa_F= 0; if(lfa_C == 0xffffffff) { @@ -770,6 +772,28 @@ cannot_set_perm:; } } + if(xorriso->do_aaip & (1 << 17)) { + ret= Xorriso_get_projid(xorriso, node, NULL, &projid, 0); + if(ret < 0) + goto ex; + ret= Numbermapper_map(xorriso->projid_mapper, (off_t) projid, &off_t_projid, + 0); + if(ret < 0) + goto ex; + projid= off_t_projid; + if(projid != 0 || (xorriso->do_aaip & (1 << 18))) { + ret= iso_local_set_projid(disk_path, projid, &os_errno, 0); + if(ret < 0) { + Xorriso_process_msg_queues(xorriso, 0); + strcpy(xorriso->info_text, + "Error with setting XFS-style project id for "); + Text_shellsafe(disk_path, xorriso->info_text, 1); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); + {ret= 0; goto ex;} + } + } + } + ret= 1 + !!lfa_ia_pushed; ex:; iso_node_get_attrs(node, &num_attrs, &names, &value_lengths, &values,1 << 15); diff --git a/xorriso/text_io.c b/xorriso/text_io.c index 4412dbf7..9d76c0eb 100644 --- a/xorriso/text_io.c +++ b/xorriso/text_io.c @@ -2775,7 +2775,7 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag) -options_from_file:${resume_state_file}_pos */ { - int is_default, no_defaults, i, ret, adr_mode, do_single, behavior; + int is_default, no_defaults, i, ret, adr_mode, do_single, behavior, count; int show_indev= 1, show_outdev= 1, show_dev= 0; int do_drive_access, did_drive_access; int part_table_implicit= 0; @@ -3862,6 +3862,31 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag) if(!(is_default && no_defaults)) Xorriso_status_result(xorriso, filter, fp, flag & 2); + count= Numbermapper_get_count(xorriso->projid_mapper, 0); + is_default= (count == 0 && !(xorriso->do_aaip & (1 << 17))); + strcpy(line, "-projid "); + if(xorriso->do_aaip & (1 << 17)) + strcat(line, "on"); + else + strcat(line, "off"); + if(xorriso->do_aaip & (1 << 18)) + strcat(line, ":restore_0"); + else + strcat(line, ":no_restore_0"); + strcat(line, "\n"); + if(!(is_default && no_defaults)) + Xorriso_status_result(xorriso, filter, fp, flag & 2); + + for(i= count - 1; i >= 0; i--) { + strcpy(line, "-projid map+"); + ret= Numbermapper_encode(xorriso->projid_mapper, i, line + strlen(line), + 1024, 0); + if(ret <= 0) + continue; + strcat(line, "\n"); + Xorriso_status_result(xorriso, filter, fp, flag & 2); + } + is_default= ((xorriso->do_aaip & (16 | 32 | 64)) == 0); sprintf(line,"-disk_dev_ino %s\n", (xorriso->do_aaip & 16 ? (xorriso->do_aaip & 128 ? "ino_only" : "on" ) @@ -4910,4 +4935,15 @@ int Xorriso_set_info_text(struct XorrisO *xorriso, char *text, } return(1); } - + + +int Xorriso_show_projid(struct XorrisO *xorriso, char *path, uint32_t projid, + int flag) +{ + sprintf(xorriso->result_line, "%10lu ", (unsigned long int) projid); + Xorriso_esc_filepath(xorriso, path, xorriso->result_line, 1); + strcat(xorriso->result_line, "\n"); + Xorriso_result(xorriso, 0); + return(1); +} + diff --git a/xorriso/write_run.c b/xorriso/write_run.c index 8de33e03..9495d9f6 100644 --- a/xorriso/write_run.c +++ b/xorriso/write_run.c @@ -912,7 +912,7 @@ int Xorriso_make_iso_write_opts(struct XorrisO *xorriso, IsoImage *image, ((!!xorriso->do_iso1999) * isoburn_igopt_iso1999) | (( !(xorriso->ino_behavior & 2)) * isoburn_igopt_hardlinks) | (( (!(xorriso->ino_behavior & 2)) || - (xorriso->do_aaip & (2 | 8 | 16 | 256 | (1 << 11))) || + (xorriso->do_aaip & (2 | 8 | 16 | 256 | (1 << 11) | (1 << 17))) || (xorriso->do_md5 & (2 | 4)) || xorriso->do_hfsplus ) * isoburn_igopt_aaip) | diff --git a/xorriso/xorriso.1 b/xorriso/xorriso.1 index ede22a05..5ad02e1b 100644 --- a/xorriso/xorriso.1 +++ b/xorriso/xorriso.1 @@ -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 "Version 1.5.7, Oct 10, 2024" +.TH XORRISO 1 "Version 1.5.7, Nov 01, 2024" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -502,6 +502,19 @@ number grew over the years. \fB\-lfa_flags\fR. Its command \-lsattr lists 22 flags the same way as the program lsattr does. They can be set by xorriso command \-chattr and can be enabled by \-lfa_flags for restoring when their files get restored to disk. +.PP +\fBXFS\-style project ids\fR are numbers which define the members of file +object groups, called projects. They can be set by programs chattr(1) and +xfs_quota(8) and reported by programs lsattr(1) and xfs_quota(8). +The files of a project can share quotas which limit their usage of filesystem +resources. This is possible in XFS and in specially prepared and mounted ext4 +filesystems. Project id 0 means that the file is not member of any project. +.br +\fBxorriso\fR records non\-zero project ids of disk files if enabled by +command \fB\-projid\fR. Command \-get_projid lists the project ids of files. +They can be set by command \-set_projid and get restored to disk if enabled +by \-projid. Usually project id 0 is not set to restored disk files, so that +they may get the project id of their parent disk directory. .SS .B Command processing: .br @@ -1145,6 +1158,51 @@ Mode "default" reinstates the default settings: .br Use "default:on" to get default settings with enabled processing. .TP +\fB\-projid\fR mode[:mode...] +Enable, disable, or influence processing of XFS\-style project ids. +.br +Mode "on" enables recording and restoring of project ids. +.br +Mode "off" disables it. +.br +Mode "restore_0" enables restoring of project id 0 when files get extracted +to disk. Default is "no_restore_0" which leaves the decision about the project +id to the local filesystem, if the file has project id 0 in the ISO filesystem. +.br +Mode "map+" defines mappings of project id intervals in the ISO to project id +intervals on disk when files get restored. The form is: +.br + map+low_in_iso,high_in_iso=low_on_disk[,[high_on_disk]] +.br +"low_in_iso" and "high_in_iso" define the number interval from which the +mapping happens at restore time. "low_on_disk" is the mapping result of +"low_in_iso". Project id numbers up to "high_in_iso" get mapped to +.br + low_on_disk + (project_id \- low_in_iso) +.br +If the resulting number is higher than "high_on_disk", then it gets mapped to +"high_on_disk". "low_on_disk" without following comma means +"low_on_disk,low_on_disk" which maps the whole "_in_iso" interval to the single +number "low_on_disk". "low_on_disk," with no following number means +"low_on_disk,4294967295". +.br +Multiple "map+" modes may be given with one or more \-projid commands. +E.g.: +.br + \-projid on:map+1,1=11,11:map+1000,1999=2000, +.br +The first match in the list of mappings defines the mapping of a given +project id in the ISO. +.br +Pseudo\-mode "map_test=" can be used to learn the current mapping +of the given project number. It immediately reports the mapping result on +result channel and does not change the current \-projid settings. E.g.: +.br + \-projid map_test=1001 +.br +Mode "default" discards all defined mappings and sets \-projid to +"off:no_restore_0". +.TP \fB\-md5\fR "on"|"all"|"off"|"load_check_off" Enable or disable processing of MD5 checksums for the overall session and for each single data file. If enabled then images with checksum tags get loaded @@ -1185,7 +1243,7 @@ actions get_md5, check_md5, and via \-check_media. Enable all extra features which help to produce or to restore backups with highest fidelity of file properties. Currently this is a shortcut for: .br - \-hardlinks on \-acl on \-xattr any \-md5 on + \-hardlinks on \-acl on \-xattr any \-md5 on \-projid on .br and possibly: .br @@ -2092,6 +2150,14 @@ to be directories or regular data files or else a SORRY event will happen. Files below the given directories will be skipped silently if their type is not suitable for \-chattr. .TP +\fB\-set_projid\fR number iso_rr_path [***] +Set the XFS\-style project ids like programs xfs_quota(8) or chattr(1) +would do to disk files. The permissible number range is 0 to 4294967295. +0 means that the file does not belong to any project. +.TP +\fB\-set_projid_r\fR number iso_rr_path [***] +Like \-projid but affecting also all files below the given directories. +.TP \fB\-alter_date\fR type timestring iso_rr_path [***] Alter the date entries of files in the ISO image. type may be one of the following: @@ -2279,6 +2345,9 @@ Matches files which have a non\-trivial ACL. \fB\-has_xattr\fR : Matches files which have xattr name\-value pairs from user namespace. .br +\fB\-has_any_xattr\fR : +Matches files which have any xattr other than ACL. +.br \fB\-has_aaip\fR : Matches files which have ACL or any xattr. .br @@ -2301,8 +2370,8 @@ E.g. look for files which have 'i' or 'a' or both of them set: .br \-has_some_lfa_flags_of ia .br -\fB\-has_any_xattr\fR : -Matches files which have any xattr other than ACL. +\fB\-has_projid\fR number : +Matches files which bear the given XFS\-style project id number. .br \fB\-has_md5\fR : Matches data files which have MD5 checksums. @@ -2536,12 +2605,24 @@ Command \-backslash_codes does not affect the output. \fBlsattrd\fR shows the Linux file attribute flags like command \-lsattrd does. .br -\fBchattr\fR +\fBchattr\fR mode applies \-chattr with the given mode. Other than command \-chattr this silently skips any file which are not \-type "dir" or "file". .br E.g.: \-exec chattr +sDu \-\- .br +\fBget_projid\fR +shows the XFS\-style project id number. +.br +\fBget_projid_minmax\fR +shows at the end of the \-find run the minimal and the maximal XFS\-style +project id numbers among the files which were matched by the find tests. +.br +\fBset_projid\fR number +applies \-set_projid with the given number. Number range is 0 to 4294967295. +.br +E.g.: \-exec set_projid 1001 \-\- +.br \fBget_md5\fR prints the MD5 sum, if recorded, together with file path. .br @@ -5119,6 +5200,14 @@ attributes attached. In this case all flags will be shown as '\-'. Like \-lsattr but listing the directory attributes if the iso_rr_path leads to a directory, rather than the attributes of the files in the directory. .TP +\fB\-get_projid\fR iso_rr_pattern [***] +Print the XFS\-style project ids of the given file objects. On disk this +information can be inspected by programs lsattr(1) or xfs_quota(8). +.TP +\fB\-get_projid_r\fR iso_rr_pattern [***] +Like \-get_projid but listing recursively the whole file trees underneath of +directories. +.TP \fB\-du\fR iso_rr_pattern [***] Recursively list size of directories and files in the ISO image which match one of the patterns. @@ -5147,8 +5236,8 @@ like described with \-find: .br \-bad_outname, \-decision, \-disk_name, \-disk_path, \-has_acl, \-has_any_xattr, \-has_lfa_flags, \-has_some_lfa_flags_of, - \-has_xattr, \-lba_range, \-maxdepth, \-mindepth, \-name, - \-or_use_pattern, \-prune, \-size, \-true, \-type, + \-has_projid, \-has_xattr, \-lba_range, \-maxdepth, \-mindepth, + \-name, \-or_use_pattern, \-prune, \-size, \-true, \-type, \-use_pattern, \-wholename .br The others get defaulted to \-false, because they are not applicable to disk @@ -5230,9 +5319,17 @@ See \-find for a description of parameter mode. E.g. \-exec list_extattr e \-\- .br \fBlsattrd\fR -prints the Linux file attribute flags like command \-lsattrd does. +prints to the result channel the Linux file attribute flags like +command \-lsattrd does. This shows non\-settable flags, too, even if they are to be ignored by the setting of command \-lfa_flags. +.br +\fBget_projid\fR +prints the XFS\-style project id number to the result channel. +.br +\fBget_projid_minmax\fR +prints at the end of the \-findx run the minimal and the maximal XFS\-style +project id numbers among the files which were matched by the find tests. .TP \fB\-compare\fR disk_path iso_rr_path Compare attributes and eventual data file content of a fileobject in the @@ -6041,7 +6138,12 @@ Print helptext. Print program name and version, component versions, license. .TP \fB\-list_extras\fR code -Tell whether certain extra features were enabled at compile time. +Tell whether certain extra features were enabled at compile time and the +environment provided the necessary system interfaces. +Application of the enabled features might fail at run time because the system +does not provide the necessary interfaces or the involved local filesystem +does not provide the desired feature. +.br Code "all" lists all features and a headline. Other codes pick a single feature. Code "codes" lists them. They share names with related commands @@ -6054,6 +6156,8 @@ Code "codes" lists them. They share names with related commands "lfa_flags" tells whether xorriso has an adapter for local Linux file attributes (see man 1 chattr). .br +"projid" tells whether xorriso has an adapter for local XFS\-style project ids. +.br "jigdo" tells whether production of Jigdo files is possible. .br "zisofs" tells whether zisofs and built\-in gzip filters are enabled. @@ -7063,13 +7167,15 @@ Other programs which burn sessions to optical media .BR wodim(1), .BR cdrskin(1) .TP -ACL, xattr, Linux file attributes +ACL, xattr, Linux file attributes, project ids .BR getfacl(1), .BR setfacl(1), .BR getfattr(1), .BR setfattr(1), .BR lsattr(1), -.BR chattr(1) +.BR chattr(1), +.BR ext4(5), +.BR xfs_quota(8) .TP MD5 checksums .BR md5sum(1) diff --git a/xorriso/xorriso.h b/xorriso/xorriso.h index 2b2b9dcf..32207e06 100644 --- a/xorriso/xorriso.h +++ b/xorriso/xorriso.h @@ -1631,12 +1631,15 @@ int Xorriso_option_follow(struct XorrisO *xorriso, char *mode, int flag); Xorriso_option_md5(xorriso, "on", 0); Xorriso_option_lfa_flags(xorriso, "default:on:restore_mask=aAcCdDijmPsStTux", 0); + Xorriso_option_projid(xorriso, "on", 0); */ /* @since 0.4.0 */ /* xattr "any" @since 1.5.0 lfa_flags "default:on:restore_mask=aAcCdDijmPsStTux" @since 1.5.8 + projid on + @since 1.5.8 */ /* Command -for_backup */ @@ -1653,6 +1656,14 @@ int Xorriso_option_fs(struct XorrisO *xorriso, char *size, int flag); int Xorriso_option_genisoimage_completion(struct XorrisO *xorriso, char *mode, int flag); +/* Commands -get_projid alias get_projidi + -get_projid_r alias -get_projid_ri */ +/* @param flag bit0=recursive -get_projid_r +*/ +/* @since 1.5.8 */ +int Xorriso_option_get_projid(struct XorrisO *xorriso, + int argc, char **argv, int *idx, int flag); + /* Commands -getfacl alias -getfacli, -getfacl_r alias -getfacl_ri -getfattr alias getfattri */ @@ -1986,6 +1997,10 @@ int Xorriso_option_prompt(struct XorrisO *xorriso, char *text, int flag); /* @since 0.1.0 */ int Xorriso_option_prog_help(struct XorrisO *xorriso, char *name, int flag); +/* Command -projid */ +/* @since 1.5.8 */ +int Xorriso_option_projid(struct XorrisO *xorriso, char *mode, int flag); + /* Command -publisher */ /* @since 0.1.2 */ int Xorriso_option_publisher(struct XorrisO *xorriso, char *name, int flag); @@ -2079,6 +2094,13 @@ int Xorriso_option_scsi_log(struct XorrisO *xorriso, char *mode, int flag); /* @since 0.1.4 */ int Xorriso_option_session_log(struct XorrisO *xorriso, char *path, int flag); +/* Commands -set_projid alias -set_projidi + -set_projid_r alias -set_projid_ri */ +/* @param flag bit0=recursive -set_projid_r */ +/* @since 1.5.8 */ +int Xorriso_option_set_projid(struct XorrisO *xorriso, char *projid_text, + int argc, char **argv, int *idx, int flag); + /* Command -setfacl_list alias -setfacl_listi */ /* @since 0.3.4 */ int Xorriso_option_setfacl_listi(struct XorrisO *xorriso, char *disk_path, diff --git a/xorriso/xorriso.info b/xorriso/xorriso.info index 010155c6..5e09367c 100644 --- a/xorriso/xorriso.info +++ b/xorriso/xorriso.info @@ -435,7 +435,19 @@ grew over the years. *-lfa_flags*. Its command -lsattr lists 22 flags the same way as the program lsattr does. They can be set by xorriso command -chattr and can be enabled by -lfa_flags for restoring when their files get restored to -disk. +disk. *XFS-style project ids* are numbers which define the members of +file object groups, called projects. They can be set by programs +chattr(1) and xfs_quota(8) and reported by programs lsattr(1) and +xfs_quota(8). The files of a project can share quotas which limit their +usage of filesystem resources. This is possible in XFS and in specially +prepared and mounted ext4 filesystems. Project id 0 means that the file +is not member of any project. +'xorriso' records non-zero project ids of disk files if enabled by +command *-projid*. Command -get_projid lists the project ids of files. +They can be set by command -set_projid and get restored to disk if +enabled by -projid. Usually project id 0 is not set to restored disk +files, so that they may get the project id of their parent disk +directory.  File: xorriso.info, Node: Processing, Next: Dialog, Prev: Extras, Up: Top @@ -1022,6 +1034,40 @@ activate them only after image loading. -lfa_flags off:read:restore:restore_su_auto:restore_only_known -lfa_flags restore_mask=:restore_error=sorry:restore_single Use "default:on" to get default settings with enabled processing. +-projid mode[:mode...] + Enable, disable, or influence processing of XFS-style project ids. + Mode "on" enables recording and restoring of project ids. + Mode "off" disables it. + Mode "restore_0" enables restoring of project id 0 when files get + extracted to disk. Default is "no_restore_0" which leaves the + decision about the project id to the local filesystem, if the file + has project id 0 in the ISO filesystem. + Mode "map+" defines mappings of project id intervals in the ISO to + project id intervals on disk when files get restored. The form is: + + map+low_in_iso,high_in_iso=low_on_disk[,[high_on_disk]] + "low_in_iso" and "high_in_iso" define the number interval from + which the mapping happens at restore time. "low_on_disk" is the + mapping result of "low_in_iso". Project id numbers up to + "high_in_iso" get mapped to + low_on_disk + (project_id - low_in_iso) + If the resulting number is higher than "high_on_disk", then it gets + mapped to "high_on_disk". "low_on_disk" without following comma + means "low_on_disk,low_on_disk" which maps the whole "_in_iso" + interval to the single number "low_on_disk". "low_on_disk," with + no following number means "low_on_disk,4294967295". + Multiple "map+" modes may be given with one or more -projid + commands. E.g.: + -projid on:map+1,1=11,11:map+1000,1999=2000, + The first match in the list of mappings defines the mapping of a + given project id in the ISO. + Pseudo-mode "map_test=" can be used to learn the current mapping of + the given project number. It immediately reports the mapping + result on result channel and does not change the current -projid + settings. E.g.: + -projid map_test=1001 + Mode "default" discards all defined mappings and sets -projid to + "off:no_restore_0". -md5 "on"|"all"|"off"|"load_check_off" Enable or disable processing of MD5 checksums for the overall session and for each single data file. If enabled then images with @@ -1057,7 +1103,7 @@ activate them only after image loading. Enable all extra features which help to produce or to restore backups with highest fidelity of file properties. Currently this is a shortcut for: - -hardlinks on -acl on -xattr any -md5 on + -hardlinks on -acl on -xattr any -md5 on -projid on and possibly: -lfa_flags default:on:import_only_settable -lfa_flags restore_mask=aAcdDijmPsStTux @@ -1807,6 +1853,14 @@ whether they stem from the loaded image or were newly inserted. or else a SORRY event will happen. Files below the given directories will be skipped silently if their type is not suitable for -chattr. +-set_projid number iso_rr_path [***] + Set the XFS-style project ids like programs xfs_quota(8) or + chattr(1) would do to disk files. The permissible number range is + 0 to 4294967295. 0 means that the file does not belong to any + project. +-set_projid_r number iso_rr_path [***] + Like -projid but affecting also all files below the given + directories. -alter_date type timestring iso_rr_path [***] Alter the date entries of files in the ISO image. type may be one of the following: @@ -1953,6 +2007,8 @@ File: xorriso.info, Node: CmdFind, Next: Filter, Prev: Manip, Up: Commands -has_xattr : Matches files which have xattr name-value pairs from user namespace. + -has_any_xattr : + Matches files which have any xattr other than ACL. -has_aaip : Matches files which have ACL or any xattr. -has_lfa_flags flag_letters : @@ -1973,8 +2029,9 @@ File: xorriso.info, Node: CmdFind, Next: Filter, Prev: Manip, Up: Commands matches any file. E.g. look for files which have 'i' or 'a' or both of them set: -has_some_lfa_flags_of ia - -has_any_xattr : - Matches files which have any xattr other than ACL. + -has_projid number : + Matches files which bear the given XFS-style project id + number. -has_md5 : Matches data files which have MD5 checksums. -has_hfs_crtp creator type : @@ -2172,11 +2229,21 @@ File: xorriso.info, Node: CmdFind, Next: Filter, Prev: Manip, Up: Commands lsattrd shows the Linux file attribute flags like command -lsattrd does. - chattr + chattr mode applies -chattr with the given mode. Other than command -chattr this silently skips any file which are not -type "dir" or "file". E.g.: -exec chattr +sDu - + get_projid + shows the XFS-style project id number. + get_projid_minmax + shows at the end of the -find run the minimal and the maximal + XFS-style project id numbers among the files which were + matched by the find tests. + set_projid number + applies -set_projid with the given number. Number range is 0 + to 4294967295. + E.g.: -exec set_projid 1001 - get_md5 prints the MD5 sum, if recorded, together with file path. check_md5 @@ -4303,6 +4370,13 @@ File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Command Like -lsattr but listing the directory attributes if the iso_rr_path leads to a directory, rather than the attributes of the files in the directory. +-get_projid iso_rr_pattern [***] + Print the XFS-style project ids of the given file objects. On disk + this information can be inspected by programs lsattr(1) or + xfs_quota(8). +-get_projid_r iso_rr_pattern [***] + Like -get_projid but listing recursively the whole file trees + underneath of directories. -du iso_rr_pattern [***] Recursively list size of directories and files in the ISO image which match one of the patterns. similar to shell command du -k. @@ -4322,9 +4396,10 @@ File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Command -findx accepts the same tests as -find, but only the following ones work like described with -find: -bad_outname, -decision, -disk_name, -disk_path, -has_acl, - -has_any_xattr, -has_lfa_flags, -has_some_lfa_flags_of, -has_xattr, - -lba_range, -maxdepth, -mindepth, -name, -or_use_pattern, -prune, - -size, -true, -type, -use_pattern, -wholename + -has_any_xattr, -has_lfa_flags, -has_some_lfa_flags_of, + -has_projid, -has_xattr, -lba_range, -maxdepth, -mindepth, -name, + -or_use_pattern, -prune, -size, -true, -type, -use_pattern, + -wholename The others get defaulted to -false, because they are not applicable to disk files. Test -type accepts the same parameters as with -find. Additionally @@ -4392,9 +4467,17 @@ File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Command mode. E.g. -exec list_extattr e - lsattrd - prints the Linux file attribute flags like command -lsattrd - does. This shows non-settable flags, too, even if they are to - be ignored by the setting of command -lfa_flags. + prints to the result channel the Linux file attribute flags + like command -lsattrd does. This shows non-settable flags, + too, even if they are to be ignored by the setting of command + -lfa_flags. + get_projid + prints the XFS-style project id number to the result channel. + +get_projid_minmax + prints at the end of the -findx run the minimal and the maximal + XFS-style project id numbers among the files which were matched by + the find tests. -compare disk_path iso_rr_path Compare attributes and eventual data file content of a fileobject in the local filesystem with a file object in the ISO image. The @@ -5080,7 +5163,11 @@ File: xorriso.info, Node: Scripting, Next: Frontend, Prev: Emulation, Up: Co -version Print program name and version, component versions, license. -list_extras code - Tell whether certain extra features were enabled at compile time. + Tell whether certain extra features were enabled at compile time + and the environment provided the necessary system interfaces. + Application of the enabled features might fail at run time because + the system does not provide the necessary interfaces or the + involved local filesystem does not provide the desired feature. Code "all" lists all features and a headline. Other codes pick a single feature. Code "codes" lists them. They share names with related commands (see also there): @@ -5090,6 +5177,8 @@ File: xorriso.info, Node: Scripting, Next: Frontend, Prev: Emulation, Up: Co EA. "lfa_flags" tells whether xorriso has an adapter for local Linux file attributes (see man 1 chattr). + "projid" tells whether xorriso has an adapter for local XFS-style + project ids. "jigdo" tells whether production of Jigdo files is possible. "zisofs" tells whether zisofs and built-in gzip filters are enabled. @@ -5965,9 +6054,9 @@ Other programs which produce ISO 9660 images mkisofs(8), genisoimage(1) Other programs which burn sessions to optical media growisofs(1), cdrecord(1), wodim(1), cdrskin(1) -ACL, xattr, Linux file attributes +ACL, xattr, Linux file attributes, project ids getfacl(1), setfacl(1), getfattr(1), setfattr(1), lsattr(1), - chattr(1) + chattr(1), ext4(5), xfs_quota(8) MD5 checksums md5sum(1) On FreeBSD some commands differ: @@ -6030,14 +6119,14 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top [index] * Menu: -* # starts a comment line: Scripting. (line 158) +* # starts a comment line: Scripting. (line 164) * -abort_on controls abort on error: Exception. (line 28) * -abstract_file sets abstract file name: SetWrite. (line 273) * -acl controls handling of ACLs: Loading. (line 189) * -add inserts one or more paths: Insert. (line 44) * -add_plainly inserts one or more paths: Insert. (line 68) -* -alter_date sets timestamps in ISO image: Manip. (line 173) -* -alter_date_r sets timestamps in ISO image: Manip. (line 208) +* -alter_date sets timestamps in ISO image: Manip. (line 181) +* -alter_date_r sets timestamps in ISO image: Manip. (line 216) * -append_partition adds arbitrary file after image end: Bootable. (line 470) * -application_id sets application id: SetWrite. (line 220) @@ -6046,12 +6135,12 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -assert_volid rejects undesired images: Loading. (line 129) * -assess_indev_features shows filesystem features: Inquiry. (line 61) * -auto_charset learns character set from image: Loading. (line 141) -* -backslash_codes enables backslash conversion: Scripting. (line 73) -* -ban_stdio_write demands real drive: Loading. (line 460) +* -backslash_codes enables backslash conversion: Scripting. (line 79) +* -ban_stdio_write demands real drive: Loading. (line 494) * -biblio_file sets biblio file name: SetWrite. (line 279) * -blank erases media: Writing. (line 57) * -boot_image controls bootability: Bootable. (line 75) -* -calm_drive reduces drive activity: Loading. (line 444) +* -calm_drive reduces drive activity: Loading. (line 478) * -cd sets working directory in ISO: Navigate. (line 7) * -cdx sets working directory on disk: Navigate. (line 15) * -changes_pending overrides change status: Writing. (line 12) @@ -6074,9 +6163,9 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -close_filter_list bans filter registration: Filter. (line 50) * -commit writes pending ISO image: Writing. (line 27) * -commit_eject writes and ejects: Writing. (line 53) -* -compare reports ISO/disk differences: Navigate. (line 182) -* -compare_l reports ISO/disk differences: Navigate. (line 198) -* -compare_r reports ISO/disk differences: Navigate. (line 194) +* -compare reports ISO/disk differences: Navigate. (line 198) +* -compare_l reports ISO/disk differences: Navigate. (line 214) +* -compare_r reports ISO/disk differences: Navigate. (line 210) * -compliance controls standard compliance: SetWrite. (line 62) * -concat copies ISO file content: Restore. (line 148) * -copyright_file sets copyright file name: SetWrite. (line 268) @@ -6087,28 +6176,28 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -cp_rx copies file trees to disk: Restore. (line 131) * -cp_rx copies file trees to disk <1>: Restore. (line 139) * -cut_out inserts piece of data file or device: Insert. (line 139) -* -data_cache_size adjusts read cache size: Loading. (line 476) +* -data_cache_size adjusts read cache size: Loading. (line 510) * -dev acquires one drive for input and output: AqDrive. (line 12) * -devices gets list of drives: Inquiry. (line 7) * -device_links gets list of drives: Inquiry. (line 17) * -dialog enables dialog mode: DialogCtl. (line 7) -* -disk_dev_ino fast incremental backup: Loading. (line 364) +* -disk_dev_ino fast incremental backup: Loading. (line 398) * -disk_pattern controls pattern expansion: Insert. (line 34) * -displacement compensate altered image start address: Loading. (line 102) * -drive_access control device file locking: AqDrive. (line 72) * -drive_class controls drive accessability: AqDrive. (line 43) -* -du show directory size in ISO image: Navigate. (line 90) +* -du show directory size in ISO image: Navigate. (line 97) * -dummy controls write simulation: SetWrite. (line 499) -* -dus show directory size in ISO image: Navigate. (line 93) -* -dusx show directory size on disk: Navigate. (line 100) -* -dux show directory size on disk: Navigate. (line 96) +* -dus show directory size in ISO image: Navigate. (line 100) +* -dusx show directory size on disk: Navigate. (line 107) +* -dux show directory size on disk: Navigate. (line 103) * -dvd_obs set write block size and end alignment: SetWrite. (line 423) -* -early_stdio_test classifies stdio drives: Loading. (line 464) -* -ecma119_map names w/o Rock Ridge, Joliet: Loading. (line 337) +* -early_stdio_test classifies stdio drives: Loading. (line 498) +* -ecma119_map names w/o Rock Ridge, Joliet: Loading. (line 371) * -eject ejects drive tray: Writing. (line 50) -* -end writes pending session and ends program: Scripting. (line 153) -* -errfile_log logs problematic disk files: Scripting. (line 118) +* -end writes pending session and ends program: Scripting. (line 159) +* -errfile_log logs problematic disk files: Scripting. (line 124) * -error_behavior controls error workarounds: Exception. (line 93) * -external_filter registers data filter: Filter. (line 20) * -external_filter unregisters data filter: Filter. (line 47) @@ -6118,13 +6207,14 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -extract_cut copies file piece to disk: Restore. (line 108) * -extract_l copies files to disk: Restore. (line 104) * -extract_single copies file to disk: Restore. (line 101) -* -file_name_limit curbs length of file names: Loading. (line 384) +* -file_name_limit curbs length of file names: Loading. (line 418) * -file_size_limit limits data file size: SetInsert. (line 7) * -find traverses and alters ISO tree: CmdFind. (line 7) -* -findx traverses disk tree: Navigate. (line 103) +* -findx traverses disk tree: Navigate. (line 110) * -follow softlinks and mount points: SetInsert. (line 77) * -format formats media: Writing. (line 87) -* -for_backup acl,xattr,hardlinks,md5,lfa_flags: Loading. (line 312) +* -for_backup acl,xattr,hardlinks,md5,lfa_flags,projid: Loading. + (line 346) * -fs sets size of fifo: SetWrite. (line 502) * -genisoimage_completion completion of genisoimage options: Emulation. (line 166) @@ -6132,27 +6222,31 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -getfacl_r shows ACL in ISO image: Navigate. (line 66) * -getfattr shows xattr in ISO image: Navigate. (line 69) * -getfattr_r shows xattr in ISO image: Navigate. (line 75) +* -get_projid shows XFS-style project ids in ISO image: Navigate. + (line 90) +* -get_projid_r shows XFS-style project ids in ISO image: Navigate. + (line 94) * -gid sets global ownership: SetWrite. (line 316) * -grow_blindly overrides next writeable address: AqDrive. (line 112) * -hardlinks controls handling of hard links: Loading. (line 152) * -help prints help text: Scripting. (line 19) * -hfsplus enables production of HFS+ partition: SetWrite. (line 14) -* -hide excludes file names from directory trees: Manip. (line 211) -* -history brings text into readline history: Scripting. (line 44) +* -hide excludes file names from directory trees: Manip. (line 219) +* -history brings text into readline history: Scripting. (line 50) * -indev acquires a drive for input: AqDrive. (line 23) * -in_charset sets input character set: Loading. (line 136) * -iso_nowtime fixed "now" time for ISO 9660 objects: Loading. - (line 358) + (line 392) * -iso_rr_pattern controls pattern expansion: Manip. (line 10) * -jigdo clears JTE or or adds parameter to JTE: Jigdo. (line 37) * -joliet enables production of Joliet tree: SetWrite. (line 10) -* -joliet_map Joliet names: Loading. (line 350) +* -joliet_map Joliet names: Loading. (line 384) * -launch_frontend starts frontend program at pipes: Frontend. (line 141) * -lfa_flags controls handling of Linux file attributes: Loading. (line 207) * -list_arg_sorting prints sorting order of -x: ArgSort. (line 26) -* -list_delimiter replaces '--': Scripting. (line 57) +* -list_delimiter replaces '--': Scripting. (line 63) * -list_extras lists compile time extra features: Scripting. (line 24) * -list_formats lists available formats: Writing. (line 128) * -list_profiles lists supported media: Writing. (line 163) @@ -6176,7 +6270,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -map_l inserts paths from disk file: Insert. (line 96) * -map_single inserts path: Insert. (line 93) * -mark sets synchronizing message: Frontend. (line 23) -* -md5 controls handling of MD5 sums: Loading. (line 281) +* -md5 controls handling of MD5 sums: Loading. (line 315) * -mkdir creates ISO directory: Insert. (line 188) * -modesty_on_drive keep drive buffer hungry: SetWrite. (line 442) * -mount issues mount command for ISO session: Restore. (line 204) @@ -6204,13 +6298,15 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -path_list inserts paths from disk file: Insert. (line 81) * -pkt_output consolidates text output: Frontend. (line 7) * -preparer_id sets preparer id: SetWrite. (line 284) -* -print prints result text line: Scripting. (line 104) -* -print_info prints message text line: Scripting. (line 106) -* -print_mark prints synchronizing text line: Scripting. (line 108) +* -print prints result text line: Scripting. (line 110) +* -print_info prints message text line: Scripting. (line 112) +* -print_mark prints synchronizing text line: Scripting. (line 114) * -print_size predicts image size: Inquiry. (line 136) * -prog sets program name: Frontend. (line 176) * -prog_help prints help text: Frontend. (line 178) -* -prompt prompts for enter key: Scripting. (line 112) +* -projid controls handling of XFS-style project ids: Loading. + (line 281) +* -prompt prompts for enter key: Scripting. (line 118) * -publisher sets publisher id: SetWrite. (line 215) * -pvd_info shows image id strings: Inquiry. (line 158) * -pwd tells working directory in ISO: Navigate. (line 19) @@ -6232,13 +6328,13 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -rockridge disables production of Rock Ridge info: SetWrite. (line 57) * -rollback discards pending changes: Writing. (line 9) -* -rollback_end ends program without writing: Scripting. (line 156) -* -rom_toc_scan searches for sessions: Loading. (line 416) +* -rollback_end ends program without writing: Scripting. (line 162) +* -rom_toc_scan searches for sessions: Loading. (line 450) * -rr_reloc_dir sets name of relocation directory: SetWrite. (line 173) * -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 197) * -scsi_dev_family choose Linux device file type: AqDrive. (line 95) -* -scsi_log reports SCSI commands: Scripting. (line 145) -* -session_log logs written sessions: Scripting. (line 136) +* -scsi_log reports SCSI commands: Scripting. (line 151) +* -session_log logs written sessions: Scripting. (line 142) * -session_string composes session info line: Inquiry. (line 124) * -setfacl sets ACL in ISO image: Manip. (line 68) * -setfacl_list sets ACL in ISO image: Manip. (line 94) @@ -6248,22 +6344,25 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -setfattr_r sets xattr in ISO image: Manip. (line 118) * -set_filter applies filter to file: Filter. (line 58) * -set_filter_r applies filter to file tree: Filter. (line 84) -* -show_stream shows data source and filters: Navigate. (line 202) -* -show_stream_r shows data source and filters: Navigate. (line 220) +* -set_projid sets XFS-style project ids in ISO image: Manip. (line 173) +* -set_projid_r sets XFS-style project ids in ISO image: Manip. + (line 178) +* -show_stream shows data source and filters: Navigate. (line 218) +* -show_stream_r shows data source and filters: Navigate. (line 236) * -sh_style_result makes results look more like shell: Scripting. - (line 63) + (line 69) * -signal_handling controls handling of system signals: Exception. (line 67) -* -sleep waits for a given time span: Scripting. (line 115) +* -sleep waits for a given time span: Scripting. (line 121) * -speed set write speed: SetWrite. (line 394) * -split_size enables large file splitting: SetInsert. (line 154) -* -status shows current settings: Scripting. (line 46) -* -status_history_max curbs -status history: Scripting. (line 54) +* -status shows current settings: Scripting. (line 52) +* -status_history_max curbs -status history: Scripting. (line 60) * -stdio_sync controls stdio buffer: SetWrite. (line 492) * -stream_recording controls defect management: SetWrite. (line 412) * -system_id sets system id: SetWrite. (line 228) * -tell_media_space reports free space: Inquiry. (line 148) -* -temp_mem_limit curbs memory consumption: Scripting. (line 98) +* -temp_mem_limit curbs memory consumption: Scripting. (line 104) * -toc shows list of sessions: Inquiry. (line 27) * -toc_info_type shows list of sessions: Inquiry. (line 49) * -toc_of shows list of sessions: Inquiry. (line 41) @@ -6311,8 +6410,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Appended partitions, MBR: Bootable. (line 480) * Automatic execution order, of arguments, -x: ArgSort. (line 16) * Backslash Interpretation, _definition: Processing. (line 57) -* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 364) -* Backup, enable features, -for_backup: Loading. (line 312) +* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 398) +* Backup, enable features, -for_backup: Loading. (line 346) * Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 197) * Blank media, _definition: Media. (line 34) * Blank, format, Immed bit, -use_immed_bit: SetWrite. (line 480) @@ -6328,7 +6427,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Character Set, _definition: Charset. (line 6) * CHRP partition, _definition: Bootable. (line 333) * Closed media, _definition: Media. (line 49) -* Comment, #: Scripting. (line 158) +* Comment, #: Scripting. (line 164) * Control, signal handling, -signal_handling: Exception. (line 67) * Create, new ISO image, _definition: Methods. (line 7) * Cylinder alignment, _definition: Bootable. (line 377) @@ -6339,7 +6438,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Delete, from ISO image, -rm_r: Manip. (line 26) * Delete, ISO directory, -rmdir: Manip. (line 29) * Device file locking, -drive_access: AqDrive. (line 72) -* Dialog, bring text into history, -history: Scripting. (line 44) +* Dialog, bring text into history, -history: Scripting. (line 50) * Dialog, confirmation question, -reassure: DialogCtl. (line 29) * Dialog, enable dialog mode, -dialog: DialogCtl. (line 7) * Dialog, EOF resistant, -named_pipe_loop: Frontend. (line 119) @@ -6351,8 +6450,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Directory, delete, -rmdir: Manip. (line 29) * disk_path, _definition: Insert. (line 6) * Drive, accessability, -drive_class: AqDrive. (line 43) -* Drive, classify stdio, -early_stdio_test: Loading. (line 464) -* Drive, demand real MMC, -ban_stdio_write: Loading. (line 460) +* Drive, classify stdio, -early_stdio_test: Loading. (line 498) +* Drive, demand real MMC, -ban_stdio_write: Loading. (line 494) * Drive, eject tray, -eject: Writing. (line 50) * Drive, for input and output, -dev: AqDrive. (line 12) * Drive, for input, -indev: AqDrive. (line 23) @@ -6360,8 +6459,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Drive, get drive list, -devices: Inquiry. (line 7) * Drive, get drive list, -device_links: Inquiry. (line 17) * Drive, list supported media, -list_profiles: Writing. (line 163) -* Drive, reduce activity, -calm_drive: Loading. (line 444) -* Drive, report SCSI commands, -scsi_log: Scripting. (line 145) +* Drive, reduce activity, -calm_drive: Loading. (line 478) +* Drive, report SCSI commands, -scsi_log: Scripting. (line 151) * Drive, write and eject, -commit_eject: Writing. (line 53) * Drive, _definition: Drives. (line 6) * EA, _definition: Extras. (line 66) @@ -6378,16 +6477,16 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Examples: Examples. (line 6) * extattr, _definition: Extras. (line 66) * File content, copy, -concat: Restore. (line 148) -* File names, curb length, -file_name_limit: Loading. (line 384) -* File names, if Joliet is loaded: Loading. (line 350) -* File names, if neither Rock Ridge nor Joliet: Loading. (line 337) +* File names, curb length, -file_name_limit: Loading. (line 418) +* File names, if Joliet is loaded: Loading. (line 384) +* File names, if neither Rock Ridge nor Joliet: Loading. (line 371) * Filesytem features, show, -assess_indev_features: Inquiry. (line 61) * Filter, apply to file tree, -set_filter_r: Filter. (line 84) * Filter, apply to file, -set_filter: Filter. (line 58) * Filter, ban registration, -close_filter_list: Filter. (line 50) * Filter, register, -external_filter: Filter. (line 20) -* Filter, show chain, -show_stream: Navigate. (line 202) -* Filter, show chains of tree, -show_stream_r: Navigate. (line 220) +* Filter, show chain, -show_stream: Navigate. (line 218) +* Filter, show chains of tree, -show_stream_r: Navigate. (line 236) * Filter, unregister, -unregister_filter: Filter. (line 47) * Filter, zisofs parameters, -zisofs: SetWrite. (line 319) * Filter, _definition: Filter. (line 6) @@ -6404,9 +6503,9 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Hard links, control handling, -hardlinks: Loading. (line 152) * HFS+ allocation block size: Bootable. (line 458) * HFS+ serial number: Bootable. (line 455) -* hidden, set in ISO image, -hide: Manip. (line 211) +* hidden, set in ISO image, -hide: Manip. (line 219) * HP-PA boot sector, production: Bootable. (line 430) -* Image reading, cache size, -data_cache_size: Loading. (line 476) +* Image reading, cache size, -data_cache_size: Loading. (line 510) * Image, demand volume ID, -assert_volid: Loading. (line 129) * Image, discard pending changes, -rollback: Writing. (line 9) * Image, filesystem to load, -read_fs: Loading. (line 120) @@ -6458,7 +6557,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Jigdo Template Extraction, -jigdo: Jigdo. (line 37) * Jigdo Template Extraction, _definition: Jigdo. (line 6) * LBA, _definition: Drives. (line 17) -* libisofs, fixed "now" time: Loading. (line 358) +* libisofs, fixed "now" time: Loading. (line 392) * Linux device type, -scsi_dev_family: AqDrive. (line 95) * Linux directory attributes, show in ISO image, -lsattrd: Navigate. (line 86) @@ -6474,7 +6573,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * MBR bootable/active flag, enforce: Bootable. (line 388) * MBR, set, -boot_image system_area=: Bootable. (line 227) * MBR, _definition: Extras. (line 27) -* MD5, control handling, -md5: Loading. (line 281) +* MD5, control handling, -md5: Loading. (line 315) * Media, erase, -blank: Writing. (line 57) * Media, format, -format: Writing. (line 87) * Media, list formats, -list_formats: Writing. (line 128) @@ -6484,10 +6583,10 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Modifying, _definition: Methods. (line 28) * Multi-session media, _definition: Media. (line 7) * Multi-session, _definition: Model. (line 18) -* Navigate, directory size in ISO image, -du: Navigate. (line 90) -* Navigate, directory size in ISO image, -dus: Navigate. (line 93) -* Navigate, directory size in on disk, -dusx: Navigate. (line 100) -* Navigate, directory size in on disk, -dux: Navigate. (line 96) +* Navigate, directory size in ISO image, -du: Navigate. (line 97) +* Navigate, directory size in ISO image, -dus: Navigate. (line 100) +* Navigate, directory size in on disk, -dusx: Navigate. (line 107) +* Navigate, directory size in on disk, -dux: Navigate. (line 103) * Navigate, list disk files, -lsdlx: Navigate. (line 57) * Navigate, list disk files, -lsdx: Navigate. (line 51) * Navigate, list disk files, -lslx: Navigate. (line 54) @@ -6522,31 +6621,31 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Process, control exit value, -return_with: Exception. (line 39) * Process, control verbosity, -report_about: Exception. (line 54) * Process, disable startup files, -no_rc: Scripting. (line 7) -* Process, end program and write, -end: Scripting. (line 153) -* Process, end program, no writing, -rollback_end: Scripting. (line 156) +* Process, end program and write, -end: Scripting. (line 159) +* Process, end program, no writing, -rollback_end: Scripting. (line 162) * Process, error workarounds, -error_behavior: Exception. (line 93) * Process, log output channels to file, -logfile: Frontend. (line 19) * Process, read command file, -options_from_file: Scripting. (line 12) * Process, set synchronizing message, -mark: Frontend. (line 23) * Program messages, perform operations, -msg_op: Frontend. (line 27) -* Program, backslash conversion, -backslash_codes: Scripting. (line 73) -* Program, curb memory, -temp_mem_limit: Scripting. (line 98) -* Program, end and write, -end: Scripting. (line 153) -* Program, end without writing, -rollback_end: Scripting. (line 156) +* Program, backslash conversion, -backslash_codes: Scripting. (line 79) +* Program, curb memory, -temp_mem_limit: Scripting. (line 104) +* Program, end and write, -end: Scripting. (line 159) +* Program, end without writing, -rollback_end: Scripting. (line 162) * Program, list extra features, -list_extras: Scripting. (line 24) * Program, print help text, -help: Scripting. (line 19) * Program, print help text, -prog_help: Frontend. (line 178) -* Program, print message text line, -print_info: Scripting. (line 106) -* Program, print result text line, -print: Scripting. (line 104) +* Program, print message text line, -print_info: Scripting. (line 112) +* Program, print result text line, -print: Scripting. (line 110) * Program, print synchronizing text line, -print_mark: Scripting. - (line 108) + (line 114) * Program, print version, -version: Scripting. (line 22) -* Program, prompt for enter key, -prompt: Scripting. (line 112) -* Program, replace --, -list_delimiter: Scripting. (line 57) +* Program, prompt for enter key, -prompt: Scripting. (line 118) +* Program, replace --, -list_delimiter: Scripting. (line 63) * Program, set name, -prog: Frontend. (line 176) -* Program, show current settings, -status: Scripting. (line 46) -* Program, status history, -status_history_max: Scripting. (line 54) -* Program, wait a time span, -sleep: Scripting. (line 115) +* Program, show current settings, -status: Scripting. (line 52) +* Program, status history, -status_history_max: Scripting. (line 60) +* Program, wait a time span, -sleep: Scripting. (line 121) * Quoted input, _definition: Processing. (line 51) * Read, set speed, -read_speed: Loading. (line 11) * Recovery, retrieve blocks, -check_media: Verify. (line 21) @@ -6566,12 +6665,12 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Restore, copy files to disk, -extract_l: Restore. (line 104) * Restore, enable ISO-to-disk, -osirrox: Restore. (line 25) * Result layout, more shell-like, -sh_style_result: Scripting. - (line 63) + (line 69) * Rock Ridge, _definition: Extras. (line 6) * Session, altered start address, -displacement: Loading. (line 102) * Session, info string, -session_string: Inquiry. (line 124) * Session, issue mount command, -mount: Restore. (line 204) -* Session, log when written, -session_log: Scripting. (line 136) +* Session, log when written, -session_log: Scripting. (line 142) * Session, mount command line, -mount_cmd: Inquiry. (line 97) * Session, mount parameters, -mount_opts: Inquiry. (line 115) * Session, select as input, -load: Loading. (line 54) @@ -6583,19 +6682,19 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * System area, _definition: Bootable. (line 227) * Table-of-content, choose info to show, -toc_info_type: Inquiry. (line 49) -* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 416) +* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 450) * Table-of-content, show parts of, -toc_of: Inquiry. (line 41) * Table-of-content, show, -toc: Inquiry. (line 27) -* Timestamps, set in ISO image, -alter_date: Manip. (line 173) -* Timestamps, set in ISO image, -alter_date_r: Manip. (line 208) -* Tree, disk, traverse, -findx: Navigate. (line 103) +* Timestamps, set in ISO image, -alter_date: Manip. (line 181) +* Timestamps, set in ISO image, -alter_date_r: Manip. (line 216) +* Tree, disk, traverse, -findx: Navigate. (line 110) * Tree, ISO, traverse and alter, -find: CmdFind. (line 7) * Unsuitable media states, _definition: Media. (line 25) * UTF-16, for Joliet paths, -compliance: SetWrite. (line 114) * Verify, check blocks, -check_media: Verify. (line 21) -* Verify, compare ISO and disk file, -compare: Navigate. (line 182) -* Verify, compare ISO and disk tree, -compare_r: Navigate. (line 194) -* Verify, compare ISO and disk, -compare_l: Navigate. (line 198) +* Verify, compare ISO and disk file, -compare: Navigate. (line 198) +* Verify, compare ISO and disk tree, -compare_r: Navigate. (line 210) +* Verify, compare ISO and disk, -compare_l: Navigate. (line 214) * Verify, file checksum, -check_md5: Verify. (line 184) * Verify, file tree checksums, -check_md5_r: Verify. (line 198) * Verify, preset -check_media, -check_media_defaults: Verify. (line 40) @@ -6611,8 +6710,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Write, enable Joliet, -joliet: SetWrite. (line 10) * Write, fifo size, -fs: SetWrite. (line 502) * Write, free space, -tell_media_space: Inquiry. (line 148) -* Write, log problematic disk files, -errfile_log: Scripting. (line 118) -* Write, log written sessions, -session_log: Scripting. (line 136) +* Write, log problematic disk files, -errfile_log: Scripting. (line 124) +* Write, log written sessions, -session_log: Scripting. (line 142) * Write, padding image, -padding: SetWrite. (line 530) * Write, pending ISO image, -commit: Writing. (line 27) * Write, predict image size, -print_size: Inquiry. (line 136) @@ -6626,6 +6725,16 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * xattr, show in ISO image, -getfattr: Navigate. (line 69) * xattr, show in ISO image, -getfattr_r: Navigate. (line 75) * xattr, _definition: Extras. (line 66) +* XFS-style project ids, control handling, -projid: Loading. (line 281) +* XFS-style project ids, set in ISO image, -set_projid: Manip. + (line 173) +* XFS-style project ids, set in ISO image, -set_projid_r: Manip. + (line 178) +* XFS-style project ids, show in ISO image, -get_projid: Navigate. + (line 90) +* XFS-style project ids, show in ISO image, -get_projid_r: Navigate. + (line 94) +* XFS-style project ids, _definition: Extras. (line 93)  @@ -6637,54 +6746,54 @@ Node: Media6344 Node: Methods9265 Node: Drives11851 Node: Extras15803 -Node: Processing21108 -Node: Dialog24945 -Node: Commands26634 -Node: ArgSort28311 -Node: AqDrive29805 -Node: Loading36962 -Node: Insert65841 -Node: SetInsert78036 -Node: Manip88272 -Node: CmdFind100392 -Node: Filter121714 -Node: Writing126336 -Node: SetWrite138830 -Node: Bootable170262 -Node: Jigdo201544 -Node: Charset206547 -Node: Exception209876 -Node: DialogCtl216065 -Node: Inquiry218667 -Node: Navigate231362 -Node: Verify242773 -Node: Restore253922 -Node: Emulation266129 -Node: Scripting277705 -Node: Frontend285599 -Node: Examples295225 -Node: ExDevices296403 -Node: ExCreate297064 -Node: ExDialog298364 -Node: ExGrowing299635 -Node: ExModifying300444 -Node: ExBootable300954 -Node: ExCharset301509 -Node: ExPseudo302405 -Node: ExCdrecord303332 -Node: ExMkisofs303652 -Node: ExGrowisofs305549 -Node: ExException306702 -Node: ExTime307160 -Node: ExIncBackup307618 -Node: ExRestore311644 -Node: ExRecovery312590 -Node: Files313162 -Node: Environ314496 -Node: Seealso315244 -Node: Bugreport316008 -Node: Legal316599 -Node: CommandIdx317611 -Node: ConceptIdx336226 +Node: Processing21905 +Node: Dialog25742 +Node: Commands27431 +Node: ArgSort29108 +Node: AqDrive30602 +Node: Loading37759 +Node: Insert68512 +Node: SetInsert80707 +Node: Manip90943 +Node: CmdFind103439 +Node: Filter125299 +Node: Writing129921 +Node: SetWrite142415 +Node: Bootable173847 +Node: Jigdo205129 +Node: Charset210132 +Node: Exception213461 +Node: DialogCtl219650 +Node: Inquiry222252 +Node: Navigate234947 +Node: Verify247000 +Node: Restore258149 +Node: Emulation270356 +Node: Scripting281932 +Node: Frontend290187 +Node: Examples299813 +Node: ExDevices300991 +Node: ExCreate301652 +Node: ExDialog302952 +Node: ExGrowing304223 +Node: ExModifying305032 +Node: ExBootable305542 +Node: ExCharset306097 +Node: ExPseudo306993 +Node: ExCdrecord307920 +Node: ExMkisofs308240 +Node: ExGrowisofs310137 +Node: ExException311290 +Node: ExTime311748 +Node: ExIncBackup312206 +Node: ExRestore316232 +Node: ExRecovery317178 +Node: Files317750 +Node: Environ319084 +Node: Seealso319832 +Node: Bugreport320632 +Node: Legal321223 +Node: CommandIdx322235 +Node: ConceptIdx341541  End Tag Table diff --git a/xorriso/xorriso.texi b/xorriso/xorriso.texi index 0444d8ae..d27f0a98 100644 --- a/xorriso/xorriso.texi +++ b/xorriso/xorriso.texi @@ -50,7 +50,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 "Version 1.5.7, Oct 10, 2024" +@c man .TH XORRISO 1 "Version 1.5.7, Nov 01, 2024" @c man .\" Please adjust this date whenever revising the manpage. @c man .\" @c man .\" Some roff macros, for reference: @@ -654,6 +654,21 @@ number grew over the years. @strong{-lfa_flags}. Its command -lsattr lists 22 flags the same way as the program lsattr does. They can be set by xorriso command -chattr and can be enabled by -lfa_flags for restoring when their files get restored to disk. +@c man .PP +@cindex XFS-style project ids, _definition +@strong{XFS-style project ids} are numbers which define the members of file +object groups, called projects. They can be set by programs chattr(1) and +xfs_quota(8) and reported by programs lsattr(1) and xfs_quota(8). +The files of a project can share quotas which limit their usage of filesystem +resources. This is possible in XFS and in specially prepared and mounted ext4 +filesystems. Project id 0 means that the file is not member of any project. +@* +@command{xorriso} records non-zero project ids of disk files if enabled by +command @strong{-projid}. Command -get_projid lists the project ids of files. +They can be set by command -set_projid and get restored to disk if enabled +by -projid. Usually project id 0 is not set to restored disk files, so that +they may get the project id of their parent disk directory. +@sp 1 @c man .SS @node Processing, Dialog, Extras, Top @chapter Command processing @@ -1397,6 +1412,53 @@ Mode "default" reinstates the default settings: @* Use "default:on" to get default settings with enabled processing. @c man .TP +@item -projid mode[:mode...] +@kindex -projid controls handling of XFS-style project ids +@cindex XFS-style project ids, control handling, -projid +Enable, disable, or influence processing of XFS-style project ids. +@* +Mode "on" enables recording and restoring of project ids. +@* +Mode "off" disables it. +@* +Mode "restore_0" enables restoring of project id 0 when files get extracted +to disk. Default is "no_restore_0" which leaves the decision about the project +id to the local filesystem, if the file has project id 0 in the ISO filesystem. +@* +Mode "map+" defines mappings of project id intervals in the ISO to project id +intervals on disk when files get restored. The form is: +@* + map+low_in_iso,high_in_iso=low_on_disk[,[high_on_disk]] +@* +"low_in_iso" and "high_in_iso" define the number interval from which the +mapping happens at restore time. "low_on_disk" is the mapping result of +"low_in_iso". Project id numbers up to "high_in_iso" get mapped to +@* + low_on_disk + (project_id - low_in_iso) +@* +If the resulting number is higher than "high_on_disk", then it gets mapped to +"high_on_disk". "low_on_disk" without following comma means +"low_on_disk,low_on_disk" which maps the whole "_in_iso" interval to the single +number "low_on_disk". "low_on_disk," with no following number means +"low_on_disk,4294967295". +@* +Multiple "map+" modes may be given with one or more -projid commands. +E.g.: +@* + -projid on:map+1,1=11,11:map+1000,1999=2000, +@* +The first match in the list of mappings defines the mapping of a given +project id in the ISO. +@* +Pseudo-mode "map_test=" can be used to learn the current mapping +of the given project number. It immediately reports the mapping result on +result channel and does not change the current -projid settings. E.g.: +@* + -projid map_test=1001 +@* +Mode "default" discards all defined mappings and sets -projid to +"off:no_restore_0". +@c man .TP @item -md5 "on"|"all"|"off"|"load_check_off" @kindex -md5 controls handling of MD5 sums @cindex MD5, control handling, -md5 @@ -1436,12 +1498,12 @@ Checksums can be exploited via commands -check_md5, -check_md5_r, via find actions get_md5, check_md5, and via -check_media. @c man .TP @item -for_backup -@kindex -for_backup acl,xattr,hardlinks,md5,lfa_flags +@kindex -for_backup acl,xattr,hardlinks,md5,lfa_flags,projid @cindex Backup, enable features, -for_backup Enable all extra features which help to produce or to restore backups with highest fidelity of file properties. Currently this is a shortcut for: @* - -hardlinks on -acl on -xattr any -md5 on + -hardlinks on -acl on -xattr any -md5 on -projid on @* and possibly: @* @@ -2488,6 +2550,18 @@ to be directories or regular data files or else a SORRY event will happen. Files below the given directories will be skipped silently if their type is not suitable for -chattr. @c man .TP +@item -set_projid number iso_rr_path [***] +@kindex -set_projid sets XFS-style project ids in ISO image +@cindex XFS-style project ids, set in ISO image, -set_projid +Set the XFS-style project ids like programs xfs_quota(8) or chattr(1) +would do to disk files. The permissible number range is 0 to 4294967295. +0 means that the file does not belong to any project. +@c man .TP +@item -set_projid_r number iso_rr_path [***] +@kindex -set_projid_r sets XFS-style project ids in ISO image +@cindex XFS-style project ids, set in ISO image, -set_projid_r +Like -projid but affecting also all files below the given directories. +@c man .TP @item -alter_date type timestring iso_rr_path [***] @kindex -alter_date sets timestamps in ISO image @cindex Timestamps, set in ISO image, -alter_date @@ -2689,6 +2763,9 @@ Matches files which have a non-trivial ACL. @item -has_xattr : Matches files which have xattr name-value pairs from user namespace. @* +@item -has_any_xattr : +Matches files which have any xattr other than ACL. +@* @item -has_aaip : Matches files which have ACL or any xattr. @* @@ -2711,8 +2788,8 @@ E.g. look for files which have 'i' or 'a' or both of them set: @* -has_some_lfa_flags_of ia @* -@item -has_any_xattr : -Matches files which have any xattr other than ACL. +@item -has_projid number : +Matches files which bear the given XFS-style project id number. @* @item -has_md5 : Matches data files which have MD5 checksums. @@ -2966,12 +3043,24 @@ Command -backslash_codes does not affect the output. @item lsattrd shows the Linux file attribute flags like command -lsattrd does. @* -@item chattr +@item chattr mode applies -chattr with the given mode. Other than command -chattr this silently skips any file which are not -type "dir" or "file". @* E.g.: -exec chattr +sDu -- @* +@item get_projid +shows the XFS-style project id number. +@* +@item get_projid_minmax +shows at the end of the -find run the minimal and the maximal XFS-style +project id numbers among the files which were matched by the find tests. +@* +@item set_projid number +applies -set_projid with the given number. Number range is 0 to 4294967295. +@* +E.g.: -exec set_projid 1001 -- +@* @item get_md5 prints the MD5 sum, if recorded, together with file path. @* @@ -5832,6 +5921,18 @@ attributes attached. In this case all flags will be shown as '-'. Like -lsattr but listing the directory attributes if the iso_rr_path leads to a directory, rather than the attributes of the files in the directory. @c man .TP +@item -get_projid iso_rr_pattern [***] +@kindex -get_projid shows XFS-style project ids in ISO image +@cindex XFS-style project ids, show in ISO image, -get_projid +Print the XFS-style project ids of the given file objects. On disk this +information can be inspected by programs lsattr(1) or xfs_quota(8). +@c man .TP +@item -get_projid_r iso_rr_pattern [***] +@kindex -get_projid_r shows XFS-style project ids in ISO image +@cindex XFS-style project ids, show in ISO image, -get_projid_r +Like -get_projid but listing recursively the whole file trees underneath of +directories. +@c man .TP @item -du iso_rr_pattern [***] @kindex -du show directory size in ISO image @cindex Navigate, directory size in ISO image, -du @@ -5870,8 +5971,8 @@ like described with -find: @* -bad_outname, -decision, -disk_name, -disk_path, -has_acl, -has_any_xattr, -has_lfa_flags, -has_some_lfa_flags_of, - -has_xattr, -lba_range, -maxdepth, -mindepth, -name, - -or_use_pattern, -prune, -size, -true, -type, + -has_projid, -has_xattr, -lba_range, -maxdepth, -mindepth, + -name, -or_use_pattern, -prune, -size, -true, -type, -use_pattern, -wholename @* The others get defaulted to -false, because they are not applicable to disk @@ -5955,10 +6056,18 @@ See -find for a description of parameter mode. E.g. -exec list_extattr e -- @* @item lsattrd -prints the Linux file attribute flags like command -lsattrd does. +prints to the result channel the Linux file attribute flags like +command -lsattrd does. This shows non-settable flags, too, even if they are to be ignored by the setting of command -lfa_flags. +@* +@item get_projid +prints the XFS-style project id number to the result channel. @end table +@* +@item get_projid_minmax +prints at the end of the -findx run the minimal and the maximal XFS-style +project id numbers among the files which were matched by the find tests. @c man .TP @item -compare disk_path iso_rr_path @kindex -compare reports ISO/disk differences @@ -6865,7 +6974,12 @@ Print program name and version, component versions, license. @item -list_extras code @kindex -list_extras lists compile time extra features @cindex Program, list extra features, -list_extras -Tell whether certain extra features were enabled at compile time. +Tell whether certain extra features were enabled at compile time and the +environment provided the necessary system interfaces. +Application of the enabled features might fail at run time because the system +does not provide the necessary interfaces or the involved local filesystem +does not provide the desired feature. +@* Code "all" lists all features and a headline. Other codes pick a single feature. Code "codes" lists them. They share names with related commands @@ -6878,6 +6992,8 @@ Code "codes" lists them. They share names with related commands "lfa_flags" tells whether xorriso has an adapter for local Linux file attributes (see man 1 chattr). @* +"projid" tells whether xorriso has an adapter for local XFS-style project ids. +@* "jigdo" tells whether production of Jigdo files is possible. @* "zisofs" tells whether zisofs and built-in gzip filters are enabled. @@ -8110,13 +8226,15 @@ Startup files and program options can override the effect of SOURCE_DATE_EPOCH. @c man .BR wodim(1), @c man .BR cdrskin(1) @c man .TP -@c man ACL, xattr, Linux file attributes +@c man ACL, xattr, Linux file attributes, project ids @c man .BR getfacl(1), @c man .BR setfacl(1), @c man .BR getfattr(1), @c man .BR setfattr(1), @c man .BR lsattr(1), -@c man .BR chattr(1) +@c man .BR chattr(1), +@c man .BR ext4(5), +@c man .BR xfs_quota(8) @c man .TP @c man MD5 checksums @c man .BR md5sum(1) @@ -8145,13 +8263,15 @@ growisofs(1), cdrecord(1), wodim(1), cdrskin(1) -@item ACL, xattr, Linux file attributes +@item ACL, xattr, Linux file attributes, project ids getfacl(1), setfacl(1), getfattr(1), setfattr(1), lsattr(1), -chattr(1) +chattr(1), +ext4(5), +xfs_quota(8) @item MD5 checksums md5sum(1) @item On FreeBSD some commands differ: diff --git a/xorriso/xorriso_private.h b/xorriso/xorriso_private.h index e8a9593e..21240356 100644 --- a/xorriso/xorriso_private.h +++ b/xorriso/xorriso_private.h @@ -192,6 +192,10 @@ struct XorrisO { /* the global context of xorriso */ are all zero bit16= try to restore lfa_flags one-by-one if the whole set fails possibly because of inappropriate attributes + bit17= read XFS-style project ids from local file objects and + when loading ISO image, write them into the + ISO filesystem, restore them when restoring file to disk + bit18= restore project id 0, too */ int lfa_flags_setting; /* Current settings of command -lfa_flags @@ -216,6 +220,8 @@ struct XorrisO { /* the global context of xorriso */ suppress error messages. */ + struct NumbermappeR *projid_mapper; /* For -projid map+N,M=R[,[S]] */ + int do_md5; /* bit0= read MD5 array bit1= write session MD5 bit2= write MD5 for each data file diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 22f92a26..1c872203 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2024.11.03.182329" +#define Xorriso_timestamP "2024.11.03.190355" diff --git a/xorriso/xorrisoburn.h b/xorriso/xorrisoburn.h index 3d0ec083..e8be810e 100644 --- a/xorriso/xorrisoburn.h +++ b/xorriso/xorrisoburn.h @@ -712,7 +712,17 @@ int Xorriso_set_lfa_flags(struct XorrisO *xorriso, void *in_node, char *path, char *lfa_text, uint64_t lfa_flags, int operator, int flag); -int Xorriso_remove_all_lfa_flags(struct XorrisO *xorriso, int flag); +int Xorriso_get_projid(struct XorrisO *xorriso, void *in_node, char *path, + uint32_t *projid, int flag); + +int Xorriso_set_projid(struct XorrisO *xorriso, void *in_node, char *path, + uint32_t projid, int flag); + +int Xorriso_show_projid(struct XorrisO *xorriso, char *path, uint32_t projid, + int flag); + +int Xorriso_tree_remove_isofs_var(struct XorrisO *xorriso, char *isofs_name, + int flag); int Xorriso_set_local_chattr_ia(struct XorrisO *xorriso, char *disk_path, int flag);