Merged Vreixo branch
This commit is contained in:
commit
2cc8a6d978
@ -1224,30 +1224,44 @@ int iso_write_opts_set_appendable(IsoWriteOpts *opts, int appendable);
|
|||||||
int iso_write_opts_set_ms_block(IsoWriteOpts *opts, uint32_t ms_block);
|
int iso_write_opts_set_ms_block(IsoWriteOpts *opts, uint32_t ms_block);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the buffer where to store the descriptors that need to be written
|
* Sets the buffer where to store the descriptors which shall to be written
|
||||||
* at the beginning of a overwriteable media to grow the image.
|
* at the beginning of an overwriteable media to point to the newly written
|
||||||
*
|
|
||||||
* @param overwrite
|
|
||||||
* When not NULL, it should point to a buffer of at least 64KiB, where
|
|
||||||
* libisofs will write the contents that should be written at the
|
|
||||||
* beginning of a overwriteable media, to grow the image. The growing
|
|
||||||
* of an image is a way, used by first time in growisofs by Andy Polyakov,
|
|
||||||
* to allow the appending of new data to non-multisession media, such
|
|
||||||
* as DVD+RW, in the same way you append a new session to a multisession
|
|
||||||
* disc, i.e., without need to write again the contents of the previous
|
|
||||||
* image.
|
* image.
|
||||||
|
* This is needed if the write start address of the image is not 0.
|
||||||
|
* In this case the first 64 KiB of the media have to be overwritten
|
||||||
|
* by the buffer content after the session was written and the buffer
|
||||||
|
* was updated by libisofs. Otherwise the new session would not be
|
||||||
|
* found by operating system function mount() or by libisoburn.
|
||||||
|
* (One could still mount that session if its start address is known.)
|
||||||
*
|
*
|
||||||
* Note that if you want this kind of image growing, you will also need to
|
* If you do not need this information, for example because you are creating a
|
||||||
* set appendable to "1" and provide a valid ms_block after the previous
|
* new image for LBA 0 or because you will create an image for a true
|
||||||
* image.
|
* multisession media, just do not use this call or set buffer to NULL.
|
||||||
*
|
*
|
||||||
* You should initialize the buffer either with 0s, or with the contents of
|
* Use cases:
|
||||||
* the first blocks of the image you're growing. In most cases, 0 is good
|
|
||||||
* enought.
|
|
||||||
*
|
*
|
||||||
* If you don't need this information, for example because you're creating a
|
* - Together with iso_write_opts_set_appendable(opts, 1) the buffer serves
|
||||||
* new image from scratch of because you will create an image for a true
|
* for the growing of an image as done in growisofs by Andy Polyakov.
|
||||||
* multisession media, just don't set this buffer or set it to NULL.
|
* This allows appending of a new session to non-multisession media, such
|
||||||
|
* as DVD+RW. The new session will refer to the data of previous sessions
|
||||||
|
* on the same media.
|
||||||
|
* libisoburn emulates multisession appendability on overwriteable media
|
||||||
|
* and disk files by performing this use case.
|
||||||
|
*
|
||||||
|
* - Together with iso_write_opts_set_appendable(opts, 0) the buffer allows
|
||||||
|
* to write the first session on overwriteable media to start addresses
|
||||||
|
* other than 0.
|
||||||
|
* libisoburn in most cases writes the first session on overwriteable media
|
||||||
|
* and disk files to LBA 32 in order to preserve its descriptors from the
|
||||||
|
* subsequent overwriting by the descriptor buffer of later sessions.
|
||||||
|
*
|
||||||
|
* @param buffer
|
||||||
|
* When not NULL, it should point to at least 64KiB of memory, where
|
||||||
|
* libisofs will install the contents that shall be written at the
|
||||||
|
* beginning of overwriteable media.
|
||||||
|
* You should initialize the buffer either with 0s, or with the contents
|
||||||
|
* of the first 32 blocks of the image you are growing. In most cases,
|
||||||
|
* 0 is good enought.
|
||||||
*
|
*
|
||||||
* @since 0.6.2
|
* @since 0.6.2
|
||||||
*/
|
*/
|
||||||
@ -2493,6 +2507,16 @@ int iso_file_get_sort_weight(IsoFile *file);
|
|||||||
*/
|
*/
|
||||||
off_t iso_file_get_size(IsoFile *file);
|
off_t iso_file_get_size(IsoFile *file);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the device id (major/minor numbers) of the given block or
|
||||||
|
* character device file. The result is undefined for other kind
|
||||||
|
* of special files, of first be sure iso_node_get_mode() returns either
|
||||||
|
* S_IFBLK or S_IFCHR.
|
||||||
|
*
|
||||||
|
* @since 0.6.6
|
||||||
|
*/
|
||||||
|
dev_t iso_special_get_dev(IsoSpecial *special);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the IsoStream that represents the contents of the given IsoFile.
|
* Get the IsoStream that represents the contents of the given IsoFile.
|
||||||
*
|
*
|
||||||
|
@ -906,6 +906,19 @@ IsoStream *iso_file_get_stream(IsoFile *file)
|
|||||||
return file->stream;
|
return file->stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the device id (major/minor numbers) of the given block or
|
||||||
|
* character device file. The result is undefined for other kind
|
||||||
|
* of special files, of first be sure iso_node_get_mode() returns either
|
||||||
|
* S_IFBLK or S_IFCHR.
|
||||||
|
*
|
||||||
|
* @since 0.6.6
|
||||||
|
*/
|
||||||
|
dev_t iso_special_get_dev(IsoSpecial *special)
|
||||||
|
{
|
||||||
|
return special->dev;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the block lba of a file node, if it was imported from an old image.
|
* Get the block lba of a file node, if it was imported from an old image.
|
||||||
*
|
*
|
||||||
|
@ -414,6 +414,6 @@ int read_rr_PN(struct susp_sys_user_entry *pn, struct stat *st)
|
|||||||
}
|
}
|
||||||
|
|
||||||
st->st_rdev = (dev_t)((dev_t)iso_read_bb(pn->data.PN.high, 4, NULL) << 32)
|
st->st_rdev = (dev_t)((dev_t)iso_read_bb(pn->data.PN.high, 4, NULL) << 32)
|
||||||
|| (dev_t)iso_read_bb(pn->data.PN.low, 4, NULL);
|
| (dev_t)iso_read_bb(pn->data.PN.low, 4, NULL);
|
||||||
return ISO_SUCCESS;
|
return ISO_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -938,6 +938,7 @@ int iso_tree_path_to_node(IsoImage *image, const char *path, IsoNode **node)
|
|||||||
while (component) {
|
while (component) {
|
||||||
if (n->type != LIBISO_DIR) {
|
if (n->type != LIBISO_DIR) {
|
||||||
n = NULL;
|
n = NULL;
|
||||||
|
result = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dir = (IsoDir *)n;
|
dir = (IsoDir *)n;
|
||||||
|
Loading…
Reference in New Issue
Block a user