Implemented use of stdio-pseudo-drives

This commit is contained in:
2007-09-04 23:03:21 +00:00
parent af4e451600
commit 9737650fae
3 changed files with 137 additions and 42 deletions

View File

@ -17,7 +17,10 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include "../libisofs/libisofs.h"
#include "../libburn/libburn.h"
#include "isoburn.h"
@ -46,6 +49,12 @@ int isoburn_new(struct isoburn **objpt, int flag)
o->emulation_mode= 0;
o->min_start_byte= 0;
o->nwa= 0;
#ifdef NIX
o->stdio_path= NULL;
o->stdio_fd= -1;
#endif /* NIX */
o->target_ropts= NULL;
o->new_wopts= NULL;
for(i=0;i<65536;i++)
@ -84,6 +93,13 @@ int isoburn_destroy(struct isoburn **objpt, int flag)
/* >>> end mutex */
#ifdef NIX
if(o->stdio_path!=NULL)
free((char *) o->stdio_path);
if(o->stdio_fd!=-1)
close(o->stdio_fd);
#endif
if(o->drive!=NULL)
burn_drive_release(o->drive, 0);
isoburn_free_rwopts(o);
@ -120,7 +136,8 @@ int isoburn_get_emulation_mode(struct isoburn *o, int *pt, int flag)
}
int isoburn_get_target_volset(struct isoburn *o, struct volset **pt, int flag)
int isoburn_get_target_volset(struct isoburn *o, struct iso_volset **pt,
int flag)
{
*pt= o->target_volset;
return(1);
@ -150,7 +167,7 @@ int isoburn_link(struct isoburn *o, struct isoburn *link, int flag)
/* >>> mutex */
if(isoburn_list_start==NULL ||
isoburn_list_start==link && (flag&1))
(isoburn_list_start==link && (flag&1)))
isoburn_list_start= o;
if(o->prev!=NULL)
o->prev->next= o->next;