New API calls burn_os_open_track_src() , burn_os_alloc_buffer()

This commit is contained in:
2009-11-23 18:56:18 +00:00
parent 259d1cd2b7
commit dc8ecdd77e
13 changed files with 372 additions and 68 deletions

View File

@ -688,3 +688,47 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
return 1;
}
/* ts A91122 : an interface to open(O_DIRECT) or similar OS tricks. */
#ifdef Libburn_read_o_direcT
/* No special O_DIRECT-like precautions are implemented here */
#endif /* Libburn_read_o_direcT */
int burn_os_open_track_src(char *path, int open_flags, int flag)
{
int fd;
fd = open(path, open_flags);
return fd;
}
int burn_os_close_track_src(int fd, int flag)
{
int ret = 0;
if(fd != -1)
ret = close(fd);
return ret;
}
void *burn_os_alloc_buffer(size_t amount, int flag)
{
void *buf = NULL;
buf = calloc(1, amount);
return buf;
}
int burn_os_free_buffer(void *buffer, size_t amount, int flag)
{
free(buffer);
return 1;
}