Remove private header import and copy needed functions.

This commit is contained in:
Vreixo Formoso Lopes 2007-09-12 15:13:51 +00:00
parent 4cef3b4c34
commit b51c3b8212
2 changed files with 55 additions and 12 deletions

View File

@ -16,10 +16,6 @@
#include "../libburn/libburn.h"
#include "isoburn.h"
// TODO this are libisofs internals, should then be imported here?
#include "../libisofs/util.h"
#include "../libisofs/ecma119.h"
/* Vreixo:
This is now all yours. My text here is only a snapshot
@ -32,6 +28,57 @@
*/
#define BP(a,b) [(b) - (a) + 1]
struct ecma119_pri_vol_desc
{
uint8_t vol_desc_type BP(1, 1);
uint8_t std_identifier BP(2, 6);
uint8_t vol_desc_version BP(7, 7);
uint8_t unused1 BP(8, 8);
uint8_t system_id BP(9, 40);
uint8_t volume_id BP(41, 72);
uint8_t unused2 BP(73, 80);
uint8_t vol_space_size BP(81, 88);
uint8_t unused3 BP(89, 120);
uint8_t vol_set_size BP(121, 124);
uint8_t vol_seq_number BP(125, 128);
uint8_t block_size BP(129, 132);
uint8_t path_table_size BP(133, 140);
uint8_t l_path_table_pos BP(141, 144);
uint8_t opt_l_path_table_pos BP(145, 148);
uint8_t m_path_table_pos BP(149, 152);
uint8_t opt_m_path_table_pos BP(153, 156);
uint8_t root_dir_record BP(157, 190);
uint8_t vol_set_id BP(191, 318);
uint8_t publisher_id BP(319, 446);
uint8_t data_prep_id BP(447, 574);
uint8_t application_id BP(575, 702);
uint8_t copyright_file_id BP(703, 739);
uint8_t abstract_file_id BP(740, 776);
uint8_t bibliographic_file_id BP(777, 813);
uint8_t vol_creation_time BP(814, 830);
uint8_t vol_modification_time BP(831, 847);
uint8_t vol_expiration_time BP(848, 864);
uint8_t vol_effective_time BP(865, 881);
uint8_t file_structure_version BP(882, 882);
uint8_t reserved1 BP(883, 883);
uint8_t app_use BP(884, 1395);
uint8_t reserved2 BP(1396, 2048);
};
static
uint32_t iso_read_lsb(const uint8_t *buf, int bytes)
{
int i;
uint32_t ret = 0;
for (i=0; i<bytes; i++) {
ret += ((uint32_t) buf[i]) << (i*8);
}
return ret;
}
/* API function. See libisoburn.h
*/
@ -148,14 +195,10 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
return 1;
}
// TODO why read is needed? can't I assume 64k are already cached?
// TODO can I assume isoburn_start_emulation was already called and
// disc contains a valid image?
// TODO why "The result shall especially keep libisofs from accepting the
// media image as ISO filesystem"?
/** Reads, alters and writes the first 64 kB of a "media" to invalidate
/** Alters and writes the first 64 kB of a "media" to invalidate
an ISO image. (It shall stay restorable by skilled humans, though).
The result shall especially keep libisofs from accepting the media
The result shall especially keep libisoburn from accepting the media
image as ISO filesystem.
@param o A fully activated isoburn object. isoburn_start_emulation()
was already called.

View File

@ -112,7 +112,7 @@ struct isoburn_read_opts {
image growing or image modification. The loaded volset gets attached
to the drive object and is not publicly available.
Not a wrapper, but peculiar to libisoburn.
@param d The drive which holds an existing IOS filesystem
@param d The drive which holds an existing ISO filesystem
@param read_opts The read options which can be chosen by the application
@param volset the volset that represents the image, or NULL if the image is
empty.