Enabled extraction of the boot catalog file to disk filesystem
This commit is contained in:
@ -221,6 +221,10 @@ int Xorriso_fake_stbuf(struct XorrisO *xorriso, char *path, struct stat *stbuf,
|
||||
{
|
||||
int ret, min_hl, max_hl, node_idx, i;
|
||||
IsoImage *volume;
|
||||
IsoBoot *bootcat;
|
||||
uint32_t lba;
|
||||
char *catcontent = NULL;
|
||||
off_t catsize;
|
||||
|
||||
memset((char *) stbuf, 0, sizeof(struct stat));
|
||||
if(!(flag&1)) {
|
||||
@ -270,7 +274,19 @@ int Xorriso_fake_stbuf(struct XorrisO *xorriso, char *path, struct stat *stbuf,
|
||||
|
||||
if(LIBISO_ISREG(*node))
|
||||
stbuf->st_size= iso_file_get_size((IsoFile *) *node)+ (2048 * !!(flag&2));
|
||||
else
|
||||
else if(LIBISO_ISBOOT(*node)) {
|
||||
ret= Xorriso_get_volume(xorriso, &volume, 0);
|
||||
if(ret <= 0)
|
||||
return(-1);
|
||||
ret= iso_image_get_bootcat(volume, &bootcat, &lba, &catcontent, &catsize);
|
||||
if(catcontent != NULL)
|
||||
free(catcontent);
|
||||
if(ret < 0) {
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
return(-1);
|
||||
}
|
||||
stbuf->st_size= catsize;
|
||||
} else
|
||||
stbuf->st_size= 0;
|
||||
|
||||
stbuf->st_blksize= 2048;
|
||||
|
Reference in New Issue
Block a user