Implementation of isoburn_read_volset().
This commit is contained in:
parent
110f22932d
commit
7c64a8dde0
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include "../libisofs/libisofs.h"
|
#include "../libisofs/libisofs.h"
|
||||||
#include "../libburn/libburn.h"
|
#include "../libburn/libburn.h"
|
||||||
@ -79,6 +80,51 @@ uint32_t iso_read_lsb(const uint8_t *buf, int bytes)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* API function. See libisoburn.h
|
||||||
|
*/
|
||||||
|
int isoburn_read_volset(struct burn_drive *d, struct isoburn_read_opts *read_opts,
|
||||||
|
struct iso_volset **volset)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
struct ecma119_read_opts ropts;
|
||||||
|
struct data_source *src;
|
||||||
|
struct isoburn *o;
|
||||||
|
|
||||||
|
assert(d && read_opts && volset);
|
||||||
|
|
||||||
|
ret = isoburn_find_emulator(&o, d, 0);
|
||||||
|
if (ret < 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
ret = isoburn_disc_get_msc1(d, &ropts.block);
|
||||||
|
if (ret < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
ropts.norock = read_opts->norock;
|
||||||
|
ropts.nojoliet = read_opts->nojoliet;
|
||||||
|
ropts.preferjoliet = read_opts->preferjoliet;
|
||||||
|
ropts.mode = read_opts->mode;
|
||||||
|
ropts.uid = read_opts->uid;
|
||||||
|
ropts.gid = read_opts->gid;
|
||||||
|
|
||||||
|
src = isoburn_data_source_new(d);
|
||||||
|
if (!src)
|
||||||
|
return -2;
|
||||||
|
|
||||||
|
*volset = iso_volset_read(src, &ropts);
|
||||||
|
|
||||||
|
data_source_free(src);
|
||||||
|
|
||||||
|
if (!(*volset))
|
||||||
|
return -3;
|
||||||
|
|
||||||
|
o->target_volset = *volset;
|
||||||
|
|
||||||
|
read_opts->hasRR = ropts.hasRR;
|
||||||
|
read_opts->hasJoliet = ropts.hasJoliet;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* API function. See libisoburn.h
|
/* API function. See libisoburn.h
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user