Add example test program and some changes to make it work

This commit is contained in:
Vreixo Formoso Lopes
2007-09-22 15:19:05 +00:00
parent 2461231664
commit 4b1bcb6a37
7 changed files with 266 additions and 55 deletions

View File

@ -7,8 +7,8 @@
#include <assert.h>
#include <stdlib.h>
#include <libburn.h>
#include <libisofs.h>
#include <libburn/libburn.h>
#include <libisofs/libisofs.h>
#include "isoburn.h"
struct disc_data_src {
@ -31,9 +31,10 @@ ds_read_block(struct data_source *src, int lba, unsigned char *buffer)
* return BLOCK_OUT_OF_FILE;
*/
ret = burn_read_data(data->d, (off_t) lba * (off_t) 2048, buffer, 2048, &count, 0);
ret = burn_read_data(data->d, (off_t) lba * (off_t) 2048, (char *) buffer,
2048, &count, 0);
if (ret <= 0 )
return -1; //error
return -1;
return 0;
}
@ -55,7 +56,7 @@ ds_free_data(struct data_source *src)
free(src->data);
}
static struct data_source *
struct data_source *
isoburn_data_source_new(struct burn_drive *d)
{
struct disc_data_src *data;