Version leap to 0.6.15 and

new API call iso_write_opts_get_data_start()
This commit is contained in:
Thomas Schmitt 2009-02-28 23:22:31 +01:00
parent 4daf626493
commit e1460aa9a6
5 changed files with 58 additions and 8 deletions

View File

@ -1,4 +1,4 @@
AC_INIT([libisofs], [0.6.14], [http://libburnia-project.org]) AC_INIT([libisofs], [0.6.15], [http://libburnia-project.org])
AC_PREREQ([2.50]) AC_PREREQ([2.50])
dnl AC_CONFIG_HEADER([config.h]) dnl AC_CONFIG_HEADER([config.h])
@ -44,7 +44,7 @@ dnl If LIBISOFS_*_VERSION changes, be sure to change AC_INIT above to match.
dnl dnl
LIBISOFS_MAJOR_VERSION=0 LIBISOFS_MAJOR_VERSION=0
LIBISOFS_MINOR_VERSION=6 LIBISOFS_MINOR_VERSION=6
LIBISOFS_MICRO_VERSION=14 LIBISOFS_MICRO_VERSION=15
LIBISOFS_VERSION=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION.$LIBISOFS_MICRO_VERSION LIBISOFS_VERSION=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION.$LIBISOFS_MICRO_VERSION
AC_SUBST(LIBISOFS_MAJOR_VERSION) AC_SUBST(LIBISOFS_MAJOR_VERSION)
@ -54,10 +54,11 @@ AC_SUBST(LIBISOFS_VERSION)
dnl Libtool versioning dnl Libtool versioning
LT_RELEASE=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION LT_RELEASE=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION
# SONAME = 16 - 10 = 6 . Library name = libisofs.6.10.0 # 2009.02.28: development jump has already happened
LT_CURRENT=16 # SONAME = 17 - 11 = 6 . Library name = libisofs.6.11.0
LT_CURRENT=17
LT_REVISION=0 LT_REVISION=0
LT_AGE=10 LT_AGE=11
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE` LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
AC_SUBST(LT_RELEASE) AC_SUBST(LT_RELEASE)

View File

@ -22,6 +22,7 @@ Purpose:
Format of Value: Format of Value:
DEV_LEN | DEV_BYTES | INO_LEN | INO_BYTES DEV_LEN | DEV_BYTES | INO_LEN | INO_BYTES
The _LEN fields comply to ISO 9660 Format section 7.1.1. The _LEN fields comply to ISO 9660 Format section 7.1.1.
The byte strings begin with the most significant byte.
Example: Example:
Device number 2001, inode number 176343 Device number 2001, inode number 176343

View File

@ -865,7 +865,7 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
{ {
int ret, i, voldesc_size, nwriters; int ret, i, voldesc_size, nwriters;
Ecma119Image *target; Ecma119Image *target;
int el_torito_writer_index = -1; int el_torito_writer_index = -1, file_src_writer_index= -1;
/* 1. Allocate target and copy opts there */ /* 1. Allocate target and copy opts there */
target = calloc(1, sizeof(Ecma119Image)); target = calloc(1, sizeof(Ecma119Image));
@ -1032,6 +1032,7 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
if (ret < 0) { if (ret < 0) {
goto target_cleanup; goto target_cleanup;
} }
file_src_writer_index = target->nwriters - 1;
/* /*
* 3. * 3.
@ -1048,6 +1049,12 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
if (i == el_torito_writer_index) if (i == el_torito_writer_index)
continue; continue;
#endif #endif
/* ts A90228 : exposing address of data start to IsoWriteOpts */
if (i == file_src_writer_index) {
opts->data_start_lba = target->curblock;
}
ret = writer->compute_data_blocks(writer); ret = writer->compute_data_blocks(writer);
if (ret < 0) { if (ret < 0) {
goto target_cleanup; goto target_cleanup;
@ -1682,3 +1689,13 @@ int iso_write_opts_set_fifo_size(IsoWriteOpts *opts, size_t fifo_size)
opts->fifo_size = fifo_size; opts->fifo_size = fifo_size;
return ISO_SUCCESS; return ISO_SUCCESS;
} }
int iso_write_opts_get_data_start(IsoWriteOpts *opts, uint32_t *data_start,
int flag)
{
if(opts->data_start_lba == 0)
return ISO_ERROR;
*data_start = opts->data_start_lba;
return ISO_SUCCESS;
}

View File

@ -239,6 +239,16 @@ struct iso_write_opts {
* buffer. * buffer.
*/ */
size_t fifo_size; size_t fifo_size;
/* ts A90228 : exposing address of data start block to the API */
/**
* This is not an option setting but a value returned after the options
* were used to compute the layout of the image.
* It tells the LBA of the first plain file data block in the image.
*/
uint32_t data_start_lba;
}; };
typedef struct ecma119_image Ecma119Image; typedef struct ecma119_image Ecma119Image;

View File

@ -997,7 +997,7 @@ int iso_lib_is_compatible(int major, int minor, int micro);
*/ */
#define iso_lib_header_version_major 0 #define iso_lib_header_version_major 0
#define iso_lib_header_version_minor 6 #define iso_lib_header_version_minor 6
#define iso_lib_header_version_micro 14 #define iso_lib_header_version_micro 15
/** /**
* Usage discussion: * Usage discussion:
@ -1479,6 +1479,27 @@ int iso_write_opts_set_overwrite_buf(IsoWriteOpts *opts, uint8_t *overwrite);
*/ */
int iso_write_opts_set_fifo_size(IsoWriteOpts *opts, size_t fifo_size); int iso_write_opts_set_fifo_size(IsoWriteOpts *opts, size_t fifo_size);
/* ts A90228 */
#define Libisofs_has_iwo_get_data_starT yes
/**
* Inquire the start address of the file data blocks after having used
* IsoWriteOpts with iso_image_create_burn_source().
* @param opts
* The option set that was used when starting image creation
* @param data_start
* Returns the logical block address if it is already valid
* @param flag
* Reserved for future usage, set to 0.
* @return
* 1 indicates valid data_start, <0 indicates invalid data_start
*
* @since 0.6.16
*/
int iso_write_opts_get_data_start(IsoWriteOpts *opts, uint32_t *data_start,
int flag);
/** /**
* Create a burn_source and a thread which immediately begins to generate * Create a burn_source and a thread which immediately begins to generate
* the image. That burn_source can be used with libburn as a data source * the image. That burn_source can be used with libburn as a data source
@ -4061,7 +4082,7 @@ void iso_stream_get_id(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id,
*/ */
#define ISO_FILE_ERROR 0xE830FF80 #define ISO_FILE_ERROR 0xE830FF80
/** Trying to open an already openned file (FAILURE,HIGH, -129) */ /** Trying to open an already opened file (FAILURE,HIGH, -129) */
#define ISO_FILE_ALREADY_OPENED 0xE830FF7F #define ISO_FILE_ALREADY_OPENED 0xE830FF7F
/* @deprecated use ISO_FILE_ALREADY_OPENED instead */ /* @deprecated use ISO_FILE_ALREADY_OPENED instead */