Made HFS creator, type, blessing persistent in AAIP isofs.hx isofs.hb

This commit is contained in:
2012-06-08 07:09:30 +00:00
parent 396fe7db8a
commit f8f39c322f
9 changed files with 384 additions and 208 deletions

View File

@ -154,6 +154,52 @@ ex:;
}
static int Xorriso_grasp_loaded_aaip(struct XorrisO *xorriso, IsoImage *volset,
int flag)
{
int ret;
IsoNode *root_node;
size_t value_length;
char *value= NULL;
double num;
struct FindjoB *job= NULL;
struct stat dir_stbuf;
/* Look for isofs.st and put it into xorriso->isofs_st_in */
root_node= (IsoNode *) iso_image_get_root(volset);
ret= iso_node_lookup_attr(root_node, "isofs.st", &value_length, &value, 0);
if(ret > 0) {
if(value_length > 0) {
sscanf(value, "%lf", &num);
if(num > 0)
xorriso->isofs_st_in= num;
}
free(value);
}
if(xorriso->do_hfsplus) {
/* Bring isofs.hx to iso_hfsplus_xinfo_func,
isofs.hb to IsoImage blessings
*/
ret= Findjob_new(&job, "/", 0);
if(ret<=0) {
Xorriso_no_findjob(xorriso, "xorriso", 0);
{ret= -1; goto ex;}
}
Findjob_set_action_target(job, 49, NULL, 0);
ret= Xorriso_findi(xorriso, job, NULL, (off_t) 0, NULL, "/",
&dir_stbuf, 0, 0);
if(ret <= 0)
goto ex;
}
ret= 1;
ex:;
Findjob_destroy(&job, 0);
return(ret);
}
/* @param flag bit0= aquire as isoburn input drive
bit1= aquire as libburn output drive (as isoburn drive if bit0)
bit2= regard overwriteable media as blank
@ -178,12 +224,8 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
struct burn_drive *drive= NULL, *out_drive= NULL, *in_drive= NULL;
enum burn_disc_status state;
IsoImage *volset = NULL;
IsoNode *root_node;
struct isoburn_read_opts *ropts= NULL;
char *libburn_adr= NULL, *off_adr= NULL, *boot_fate, *sev;
size_t value_length;
char *value= NULL;
double num;
char volid[33], *adr_data= NULL, *adr_pt;
Xorriso_alloc_meM(libburn_adr, char, SfileadrL);
@ -438,8 +480,8 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
ext= isoburn_ropt_noiso1999;
if((xorriso->ino_behavior & (1 | 2)) && !(xorriso->do_aaip & (1 | 4 | 32))
&& !(xorriso->do_md5 & 1))
ext|= isoburn_ropt_noaaip;
&& !(xorriso->do_md5 & 1) && !(xorriso->do_hfsplus))
ext|= isoburn_ropt_noaaip;
if(!(xorriso->do_aaip & 1))
ext|= isoburn_ropt_noacl;
if(!(xorriso->do_aaip & 4))
@ -572,17 +614,9 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
}
if(flag & 1) {
/* Look for isofs.st and put it into xorriso->isofs_st_in */;
root_node= (IsoNode *) iso_image_get_root(volset);
ret= iso_node_lookup_attr(root_node, "isofs.st", &value_length, &value, 0);
if(ret > 0) {
if(value_length > 0) {
sscanf(value, "%lf", &num);
if(num > 0)
xorriso->isofs_st_in= num;
}
free(value);
}
ret= Xorriso_grasp_loaded_aaip(xorriso, volset, 0);
if(ret <= 0)
goto ex;
}
if(!(flag&32)) {