New -as mkisofs option -dir-mode

master
Thomas Schmitt 12 years ago
parent cfd39f3d96
commit ad1c2fa1b8
  1. 26
      xorriso/emulators.c
  2. 10
      xorriso/xorriso.texi
  3. 2
      xorriso/xorriso_timestamp.h

@ -582,12 +582,14 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" -o FILE, -output FILE Set output file name",
" -m GLOBFILE, -exclude GLOBFILE",
" Exclude file name",
" -x FILE, -old-exclude FILE Exclude file name",
" -exclude-list FILE File with list of file names to exclude",
" -pad Pad output by 300k (default)",
" -no-pad Do not pad output",
" -M FILE, -prev-session FILE Set path to previous session to merge",
" -C PARAMS, -cdrecord-params PARAMS",
" Magic paramters from cdrecord",
" -dir-mode mode Make the mode of all directories this mode.",
" -path-list FILE File with list of pathnames to process",
" --quoted_path_list FILE File with list of quoted pathnames to process",
" -print-size Print estimated filesystem size and exit",
@ -733,14 +735,14 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
{
int ret, i, j, was_path= 0, was_other_option= 0, mem_graft_points, mem;
int do_print_size= 0, fd, idx, iso_level= 0, no_emul_boot= 0;
int option_b= 0, was_failure= 0, fret, lower_r= 0, zero= 0;
int option_b= 0, was_failure= 0, fret, lower_r= 0, zero= 0, dir_mode= -1;
mode_t mode_and, mode_or;
int with_boot_image= 0, with_cat_path= 0;
int *weight_list= NULL, weight_count= 0;
int *delay_opt_list= NULL, delay_opt_count= 0;
char sfe[5*SfileadrL], adr[SfileadrL+8], ra_text[80], pathspec[2*SfileadrL];
char *ept, *add_pt, eff_path[SfileadrL], indev[SfileadrL+8], msc[80], *cpt;
char *boot_path;
static char *lower_r_args[3]= {"/", "-exec", "mkisofs_r"};
static char *sort_weight_args[4]= {"", "-exec", "sort_weight", ""};
strcpy(ra_text, xorriso->report_about_text);
@ -1171,6 +1173,16 @@ not_enough_args:;
goto not_enough_args;
i++;
/* was already handled in first argument scan */;
} else if(strcmp(argv[i], "-dir-mode") == 0) {
if(i+1>=argc)
goto not_enough_args;
i++;
ret= Xorriso_convert_modstring(xorriso, "-as mkisofs -dir-mode",
argv[i], &mode_and, &mode_or, 0);
if(ret<=0)
goto problem_handler_2;
dir_mode= mode_or;
} else if(argv[i][0]=='-' && argv[i][1]!=0) {
sprintf(xorriso->info_text, "-as %s: Unknown option %s",
whom, Text_shellsafe(argv[i], sfe, 0));
@ -1225,11 +1237,21 @@ problem_handler_2:;
goto ex;
}
if(lower_r) {
static char *lower_r_args[3]= {"/", "-exec", "mkisofs_r"};
zero= 0;
ret= Xorriso_option_find(xorriso, 3, lower_r_args, &zero, 2);
if(ret<=0)
goto ex;
}
if(dir_mode >= 0) {
static char *dir_mode_args[6]= {"/", "-type", "d", "-exec", "chmod", ""};
zero= 0;
sprintf(sfe, "0%o", (unsigned int) dir_mode);
dir_mode_args[5]= sfe;
ret= Xorriso_option_find(xorriso, 6, dir_mode_args, &zero, 2);
if(ret<=0)
goto ex;
}
for(j= 0; j < weight_count; j++) {
i= weight_list[j];

@ -44,7 +44,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO 1 "Jun 24, 2010"
@c man .TH XORRISO 1 "Jun 25, 2010"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -518,8 +518,9 @@ An @strong{MBR} contains boot code and a partition table. It does not hamper
CDROM booting. The new MBR of a follow-up session can get in effect
only on overwriteable media.
@*
Emulation -as mkisofs supports the example options out of the ISOLINUX wiki.
It also supports the options used in GRUB script grub-mkrescue.
Emulation -as mkisofs supports the example options out of the ISOLINUX wiki,
the options used in GRUB script grub-mkrescue, and the example in the
FreeBSD AvgLiveCD wiki.
@*
The support for other boot image types is sparse.
@*
@ -3812,7 +3813,8 @@ Personality "@strong{mkisofs}" accepts the options listed with:
@*
-as mkisofs -help @minus{}@minus{}
@*
Among them: -R (always on), -r, -J, -o, -M, -C, -path-list, -m, -exclude-list,
Among them: -R (always on), -r, -J, -o, -M, -C, -dir-mode,
-path-list, -m, -exclude-list,
-f, -print-size, -pad, -no-pad, -V, -v, -version, -graft-points, -z,
-no-emul-boot, -b, -c, -boot-info-table, -boot-load-size, -input-charset, -G,
-output-charset, -U, -hide, -hide-joliet, -hide-list, -hide-joliet-list,

@ -1 +1 @@
#define Xorriso_timestamP "2010.06.24.084800"
#define Xorriso_timestamP "2010.06.25.095836"

Loading…
Cancel
Save