diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 549b2c8..7f503ef 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2009.11.23.193252" +#define Cdrskin_timestamP "2009.11.25.122233" diff --git a/libburn/libburn.h b/libburn/libburn.h index a4665d1..161759a 100644 --- a/libburn/libburn.h +++ b/libburn/libburn.h @@ -1814,21 +1814,13 @@ struct burn_source *burn_file_source_new(const char *path, @param path The file address to open @param open_flags The flags as of man 2 open. Normally just O_RDONLY. @param flag Bitfield for control purposes (unused yet, submit 0). - @return A file descriptor as of open(2). Close it by - burn_os_close_track_src(). + @return A file descriptor as of open(2). Finally to be disposed + by close(2). -1 indicates failure. @since 0.7.4 */ int burn_os_open_track_src(char *path, int open_flags, int flag); -/** Close a file descriptor opened by burn_os_open_track_src(). - @param fd Filedescriptor to be closed - @param flag Bitfield for control purposes (unused yet, submit 0). - @return like close(2): 0 on success, -1 on error - @since 0.7.4 -*/ -int burn_os_close_track_src(int fd, int flag); - /** Allocate a memory area that is suitable for reading with a file descriptor opened by burn_os_open_track_src(). @param amount Number of bytes to allocate. This should be a multiple @@ -1847,6 +1839,7 @@ void *burn_os_alloc_buffer(size_t amount, int flag); @param amount The number of bytes which was allocated at that address. @param flag Bitfield for control purposes (unused yet, submit 0). + @return 1 success , <=0 failure @since 0.7.4 */ int burn_os_free_buffer(void *buffer, size_t amount, int flag); @@ -1946,9 +1939,9 @@ int burn_fifo_inquire_status(struct burn_source *fifo, int *size, data have arrived or until it becomes clear that this will not happen. The call may be repeated with increased bufsize. It will always yield the bytes beginning from the first one in the fifo. - @param fifo The fifo object to inquire + @param fifo The fifo object to inquire resp. start @param buf Pointer to memory of at least bufsize bytes where to - deliver the peeked data + deliver the peeked data. @param bufsize Number of bytes to peek from the start of the fifo data @param flag Bitfield for control purposes (unused yet, submit 0). @return <0 on severe error, 0 if not enough data, 1 if bufsize bytes read diff --git a/libburn/sg-dummy.c b/libburn/sg-dummy.c index d1bd2f6..f33fc50 100644 --- a/libburn/sg-dummy.c +++ b/libburn/sg-dummy.c @@ -247,16 +247,6 @@ int burn_os_open_track_src(char *path, int open_flags, int flag) } -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; @@ -268,6 +258,8 @@ void *burn_os_alloc_buffer(size_t amount, int flag) int burn_os_free_buffer(void *buffer, size_t amount, int flag) { + if (buffer == NULL) + return 0; free(buffer); return 1; } diff --git a/libburn/sg-freebsd-port.c b/libburn/sg-freebsd-port.c index 3ab1b48..e317212 100644 --- a/libburn/sg-freebsd-port.c +++ b/libburn/sg-freebsd-port.c @@ -648,16 +648,6 @@ int burn_os_open_track_src(char *path, int open_flags, int flag) } -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; @@ -669,6 +659,8 @@ void *burn_os_alloc_buffer(size_t amount, int flag) int burn_os_free_buffer(void *buffer, size_t amount, int flag) { + if (buffer == NULL) + return 0; free(buffer); return 1; } diff --git a/libburn/sg-freebsd.c b/libburn/sg-freebsd.c index d74dab9..051c0da 100644 --- a/libburn/sg-freebsd.c +++ b/libburn/sg-freebsd.c @@ -707,16 +707,6 @@ int burn_os_open_track_src(char *path, int open_flags, int flag) } -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; @@ -728,6 +718,8 @@ void *burn_os_alloc_buffer(size_t amount, int flag) int burn_os_free_buffer(void *buffer, size_t amount, int flag) { + if (buffer == NULL) + return 0; free(buffer); return 1; } diff --git a/libburn/sg-linux.c b/libburn/sg-linux.c index 67bef29..403e089 100644 --- a/libburn/sg-linux.c +++ b/libburn/sg-linux.c @@ -2128,16 +2128,6 @@ int burn_os_open_track_src(char *path, int open_flags, int flag) } -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; @@ -2165,11 +2155,15 @@ void *burn_os_alloc_buffer(size_t amount, int flag) int burn_os_free_buffer(void *buffer, size_t amount, int flag) { + int ret = 0; + + if (buffer == NULL) + return 0; #ifdef Libburn_linux_do_o_direcT - munmap(buffer, amount); + ret = munmap(buffer, amount); #else free(buffer); #endif - return 1; + return (ret == 0); }