Preparations for ISO/HFS+ hybrid images by Vladimir Serbinenko

This commit is contained in:
2012-05-24 07:13:20 +00:00
parent b6857855f5
commit 4f90dad64b
18 changed files with 218 additions and 67 deletions

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2011 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2012 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -573,7 +573,10 @@ ex:;
/* @param flag bit1= add '+' to perms
bit2-3: hidden_state : 0=off, 1=iso_rr, 2=joliet= 3=on
bit2-7: hidden_state :
bit2= hide in ISO/RR
bit3= hide in Joliet
bit4= hide in HFS+
*/
int Xorriso__mode_to_perms(mode_t st_mode, char perms[11], int flag)
{
@ -607,12 +610,15 @@ int Xorriso__mode_to_perms(mode_t st_mode, char perms[11], int flag)
else
perms[8]= 'T';
}
hidden_state= (flag >> 2) & 3;
hidden_state= (flag >> 2) & 63;
if(hidden_state == 1)
perms[9]= 'I';
else if(hidden_state == 2)
perms[9]= 'J';
else if(hidden_state == 3)
else if(hidden_state == 4)
perms[9]= 'A';
else if(hidden_state)
perms[9]= 'H';
if(flag & 2) {
if(hidden_state)
@ -626,7 +632,10 @@ int Xorriso__mode_to_perms(mode_t st_mode, char perms[11], int flag)
/* @param flag bit0= recognize Xorriso_IFBOOT as file type
bit1= add '+' to perms
bit2-3: hidden_state : 0=off, 1=iso_rr, 2=joliet= 3=on
bit2-7: hidden_state :
bit2= hide in ISO/RR
bit3= hide in Joliet
bit4= hide in HFS+
*/
int Xorriso_format_ls_l(struct XorrisO *xorriso, struct stat *stbuf, int flag)
{
@ -660,7 +669,7 @@ int Xorriso_format_ls_l(struct XorrisO *xorriso, struct stat *stbuf, int flag)
else
strcat(rpt, "?");
Xorriso__mode_to_perms(st_mode, perms, flag & (2 | 12));
Xorriso__mode_to_perms(st_mode, perms, flag & (2 | 252));
strcat(rpt, perms);
sprintf(rpt+strlen(rpt)," %3u ",(unsigned int) stbuf->st_nlink);