Compare commits
12 Commits
release-0.
...
release-0.
Author | SHA1 | Date | |
---|---|---|---|
438024d11b | |||
1d6fdf51dc | |||
281462802f | |||
2b2a86ea2e | |||
c0963596e5 | |||
9be5b241e2 | |||
fcde936670 | |||
73c6bc49c6 | |||
5ed507da83 | |||
ae626b9570 | |||
3528493b92 | |||
9cf460a3b1 |
16
configure.ac
16
configure.ac
@ -1,4 +1,4 @@
|
||||
AC_INIT([libisofs], [0.6.32], [http://libburnia-project.org])
|
||||
AC_INIT([libisofs], [0.6.34], [http://libburnia-project.org])
|
||||
AC_PREREQ([2.50])
|
||||
dnl AC_CONFIG_HEADER([config.h])
|
||||
|
||||
@ -9,12 +9,6 @@ LIBBURNIA_SET_FLAGS
|
||||
|
||||
AM_INIT_AUTOMAKE([subdir-objects])
|
||||
|
||||
dnl A61101 This breaks Linux build (makes 32 bit off_t)
|
||||
dnl http://sourceware.org/autobook/autobook/autobook_96.html says
|
||||
dnl one must include some config.h and this was a pitfall.
|
||||
dnl So why dig the pit at all ?
|
||||
dnl AM_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl
|
||||
dnl if MAJOR or MINOR version changes, be sure to change AC_INIT above to match
|
||||
dnl
|
||||
@ -46,7 +40,7 @@ dnl If LIBISOFS_*_VERSION changes, be sure to change AC_INIT above to match.
|
||||
dnl
|
||||
LIBISOFS_MAJOR_VERSION=0
|
||||
LIBISOFS_MINOR_VERSION=6
|
||||
LIBISOFS_MICRO_VERSION=32
|
||||
LIBISOFS_MICRO_VERSION=34
|
||||
LIBISOFS_VERSION=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION.$LIBISOFS_MICRO_VERSION
|
||||
|
||||
AC_SUBST(LIBISOFS_MAJOR_VERSION)
|
||||
@ -57,9 +51,9 @@ AC_SUBST(LIBISOFS_VERSION)
|
||||
dnl Libtool versioning
|
||||
LT_RELEASE=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION
|
||||
# 2010.05.03 development jump has not yet happened
|
||||
# SONAME = 34 - 28 = 6 . Library name = libisofs.6.28.0
|
||||
LT_CURRENT=34
|
||||
LT_AGE=28
|
||||
# SONAME = 36 - 30 = 6 . Library name = libisofs.6.30.0
|
||||
LT_CURRENT=36
|
||||
LT_AGE=30
|
||||
LT_REVISION=0
|
||||
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
|
||||
|
||||
|
@ -15,6 +15,10 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
@ -11,6 +11,10 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
@ -11,6 +11,10 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
@ -11,6 +11,10 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
@ -17,6 +17,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
Use the copy of the struct burn_source definition in libisofs.h
|
||||
*/
|
||||
|
@ -8,6 +8,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
/* libisofs.h defines aaip_xinfo_func */
|
||||
#include "libisofs.h"
|
||||
|
||||
|
@ -7,6 +7,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "libisofs.h"
|
||||
#include "util.h"
|
||||
|
||||
|
@ -9,6 +9,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
Use the copy of the struct burn_source definition in libisofs.h
|
||||
*/
|
||||
@ -27,10 +31,7 @@
|
||||
#include "rockridge.h"
|
||||
#include "util.h"
|
||||
#include "system_area.h"
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
#include "md5.h"
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
@ -76,16 +77,12 @@ void ecma119_image_free(Ecma119Image *t)
|
||||
free(t->bootsrc);
|
||||
if (t->system_area_data != NULL)
|
||||
free(t->system_area_data);
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
if (t->checksum_ctx != NULL) { /* dispose checksum context */
|
||||
char md5[16];
|
||||
iso_md5_end(&(t->checksum_ctx), md5);
|
||||
}
|
||||
if (t->checksum_buffer != NULL)
|
||||
free(t->checksum_buffer);
|
||||
#endif
|
||||
|
||||
if (t->writers != NULL)
|
||||
free(t->writers);
|
||||
free(t);
|
||||
@ -256,17 +253,11 @@ int ecma119_writer_compute_data_blocks(IsoImageWriter *writer)
|
||||
target->m_path_table_pos = target->curblock;
|
||||
target->curblock += DIV_UP(path_table_size, BLOCK_SIZE);
|
||||
target->path_table_size = path_table_size;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if (target->md5_session_checksum) {
|
||||
/* Account for tree checksum tag */
|
||||
target->checksum_tree_tag_pos = target->curblock;
|
||||
target->curblock++;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
|
||||
@ -737,16 +728,10 @@ int ecma119_writer_write_data(IsoImageWriter *writer)
|
||||
ret = write_path_tables(t);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if (t->md5_session_checksum) {
|
||||
/* Write tree checksum tag */
|
||||
ret = iso_md5_write_tag(t, 3);
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -934,8 +919,6 @@ void *write_function(void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
/* Write superblock checksum tag */
|
||||
if (target->md5_session_checksum && target->checksum_ctx != NULL) {
|
||||
res = iso_md5_write_tag(target, 2);
|
||||
@ -943,9 +926,6 @@ void *write_function(void *arg)
|
||||
goto write_error;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
|
||||
/* write data for each writer */
|
||||
for (i = 0; i < target->nwriters; ++i) {
|
||||
writer = target->writers[i];
|
||||
@ -955,13 +935,9 @@ void *write_function(void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
/* Transplant checksum buffer from Ecma119Image to IsoImage */
|
||||
transplant_checksum_buffer(target, 0);
|
||||
|
||||
#endif
|
||||
|
||||
iso_ring_buffer_writer_close(target->buffer, 0);
|
||||
|
||||
#ifdef Libisofs_with_pthread_exiT
|
||||
@ -981,15 +957,11 @@ void *write_function(void *arg)
|
||||
}
|
||||
iso_ring_buffer_writer_close(target->buffer, 1);
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
/* Transplant checksum buffer away from Ecma119Image */
|
||||
transplant_checksum_buffer(target, 0);
|
||||
/* Invalidate the transplanted checksum buffer in IsoImage */
|
||||
iso_image_free_checksums(target->image, 0);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef Libisofs_with_pthread_exiT
|
||||
pthread_exit(NULL);
|
||||
#else
|
||||
@ -999,9 +971,6 @@ void *write_function(void *arg)
|
||||
}
|
||||
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
|
||||
static
|
||||
int checksum_prepare_image(IsoImage *src, int flag)
|
||||
{
|
||||
@ -1096,9 +1065,6 @@ int checksum_prepare_nodes(Ecma119Image *target, IsoNode *node, int flag)
|
||||
}
|
||||
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
|
||||
static
|
||||
int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
{
|
||||
@ -1222,8 +1188,6 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
goto target_cleanup;
|
||||
}
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
target->md5_file_checksums = opts->md5_file_checksums;
|
||||
target->md5_session_checksum = opts->md5_session_checksum;
|
||||
strcpy(target->scdbackup_tag_parm, opts->scdbackup_tag_parm);
|
||||
@ -1241,8 +1205,6 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
target->checksum_range_size = 0;
|
||||
target->opts_overwrite = 0;
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 2. Based on those options, create needed writers: iso, joliet...
|
||||
* Each writer inits its structures and stores needed info into
|
||||
@ -1266,9 +1228,6 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
nwriters++;
|
||||
}
|
||||
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if ((target->md5_file_checksums & 1) || target->md5_session_checksum) {
|
||||
nwriters++;
|
||||
image_checksums_mad = 1; /* from here on the loaded checksums are
|
||||
@ -1285,9 +1244,6 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
target->checksum_idx_counter = 0;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
|
||||
target->writers = malloc(nwriters * sizeof(void*));
|
||||
if (target->writers == NULL) {
|
||||
ret = ISO_OUT_OF_MEM;
|
||||
@ -1345,19 +1301,12 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
goto target_cleanup;
|
||||
}
|
||||
file_src_writer_index = target->nwriters - 1;
|
||||
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if ((target->md5_file_checksums & 1) || target->md5_session_checksum) {
|
||||
ret = checksum_writer_create(target);
|
||||
if (ret < 0)
|
||||
goto target_cleanup;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
|
||||
/*
|
||||
* 3.
|
||||
* Call compute_data_blocks() in each Writer.
|
||||
@ -1456,8 +1405,6 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
memcpy(vol->std_identifier, "CD001", 5);
|
||||
vol->vol_desc_version[0] = 1;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
/* Write relocated superblock checksum tag */
|
||||
tag_pos = voldesc_size / BLOCK_SIZE + 16 + 1;
|
||||
if (target->md5_session_checksum) {
|
||||
@ -1489,9 +1436,6 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
if (ret > 0)
|
||||
opts->overwrite[i * 2048] = 0;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1503,8 +1447,6 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
|
||||
|
||||
/* 4. Create and start writing thread */
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
if (target->md5_session_checksum) {
|
||||
/* After any fake writes are done: Initialize image checksum context */
|
||||
if (target->checksum_ctx != NULL)
|
||||
@ -1518,8 +1460,6 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
iso_image_free_checksums(target->image, 0);
|
||||
image_checksums_mad = 0;
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
/* ensure the thread is created joinable */
|
||||
pthread_attr_init(&(target->th_attr));
|
||||
pthread_attr_setdetachstate(&(target->th_attr), PTHREAD_CREATE_JOINABLE);
|
||||
@ -1544,14 +1484,8 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
return ISO_SUCCESS;
|
||||
|
||||
target_cleanup: ;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if(image_checksums_mad) /* No checksums is better than mad checksums */
|
||||
iso_image_free_checksums(target->image, 0);
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
ecma119_image_free(target);
|
||||
return ret;
|
||||
}
|
||||
@ -1691,17 +1625,11 @@ int iso_write(Ecma119Image *target, void *buf, size_t count)
|
||||
/* reader cancelled */
|
||||
return ISO_CANCELED;
|
||||
}
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if (target->checksum_ctx != NULL) {
|
||||
/* Add to image checksum */
|
||||
target->checksum_counter += count;
|
||||
iso_md5_compute(target->checksum_ctx, (char *) buf, (int) count);
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
/* total size is 0 when writing the overwrite buffer */
|
||||
if (ret > 0 && (target->total_size != (off_t) 0)){
|
||||
unsigned int kbw, kbt;
|
||||
@ -1977,14 +1905,8 @@ int iso_write_opts_set_sort_files(IsoWriteOpts *opts, int sort)
|
||||
|
||||
int iso_write_opts_set_record_md5(IsoWriteOpts *opts, int session, int files)
|
||||
{
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
opts->md5_session_checksum = session & 1;
|
||||
opts->md5_file_checksums = files & 3;
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
|
||||
@ -1992,9 +1914,6 @@ int iso_write_opts_set_scdbackup_tag(IsoWriteOpts *opts,
|
||||
char *name, char *timestamp,
|
||||
char *tag_written)
|
||||
{
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
char eff_name[81], eff_time[19];
|
||||
int i;
|
||||
|
||||
@ -2020,9 +1939,6 @@ int iso_write_opts_set_scdbackup_tag(IsoWriteOpts *opts,
|
||||
opts->scdbackup_tag_written = tag_written;
|
||||
if (tag_written != NULL)
|
||||
tag_written[0] = 0;
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -152,8 +152,6 @@ struct iso_write_opts {
|
||||
*/
|
||||
unsigned int dir_rec_mtime :1;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
/**
|
||||
* Compute MD5 checksum for the whole session and record it as index 0 of
|
||||
* the checksum blocks after the data area of the session. The layout and
|
||||
@ -174,8 +172,6 @@ struct iso_write_opts {
|
||||
*/
|
||||
unsigned int md5_file_checksums :2;
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
/** If files should be sorted based on their weight. */
|
||||
unsigned int sort_files :1;
|
||||
|
||||
@ -373,13 +369,9 @@ struct ecma119_image
|
||||
/* Store in ECMA-119 timestamp mtime of source */
|
||||
unsigned int dir_rec_mtime :1;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
unsigned int md5_session_checksum :1;
|
||||
unsigned int md5_file_checksums :2;
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
/*
|
||||
* Mode replace. If one of these flags is set, the correspodent values are
|
||||
* replaced with values below.
|
||||
@ -498,8 +490,6 @@ struct ecma119_image
|
||||
/* tree of files sources */
|
||||
IsoRBTree *files;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
unsigned int checksum_idx_counter;
|
||||
void *checksum_ctx;
|
||||
off_t checksum_counter;
|
||||
@ -525,8 +515,6 @@ struct ecma119_image
|
||||
char scdbackup_tag_parm[100];
|
||||
char *scdbackup_tag_written;
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
/* Buffer for communication between burn_source and writer thread */
|
||||
IsoRingBuffer *buffer;
|
||||
|
||||
|
@ -8,6 +8,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "ecma119_tree.h"
|
||||
#include "ecma119.h"
|
||||
#include "node.h"
|
||||
@ -146,15 +150,11 @@ int create_dir(Ecma119Image *img, IsoDir *iso, Ecma119Node **node)
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new ECMA-119 node representing a regular file from a iso file
|
||||
* node.
|
||||
*/
|
||||
|
||||
static
|
||||
int create_file(Ecma119Image *img, IsoFile *iso, Ecma119Node **node)
|
||||
int create_file_src(Ecma119Image *img, IsoFile *iso, IsoFileSrc **src)
|
||||
{
|
||||
int ret;
|
||||
IsoFileSrc *src;
|
||||
off_t size;
|
||||
|
||||
size = iso_stream_get_size(iso->stream);
|
||||
@ -166,8 +166,25 @@ int create_file(Ecma119Image *img, IsoFile *iso, Ecma119Node **node)
|
||||
free(ipath);
|
||||
return ret;
|
||||
}
|
||||
ret = iso_file_src_create(img, iso, src);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = iso_file_src_create(img, iso, &src);
|
||||
|
||||
/**
|
||||
* Create a new ECMA-119 node representing a regular file from a iso file
|
||||
* node.
|
||||
*/
|
||||
static
|
||||
int create_file(Ecma119Image *img, IsoFile *iso, Ecma119Node **node)
|
||||
{
|
||||
int ret;
|
||||
IsoFileSrc *src;
|
||||
|
||||
ret = create_file_src(img, iso, &src);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
@ -267,58 +284,78 @@ void ecma119_node_free(Ecma119Node *node)
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param flag
|
||||
* bit0= iso is in a hidden directory. Thus hide it.
|
||||
* @return
|
||||
* 1 success, 0 node ignored, < 0 error
|
||||
*
|
||||
*/
|
||||
static
|
||||
int create_tree(Ecma119Image *image, IsoNode *iso, Ecma119Node **tree,
|
||||
int depth, int pathlen)
|
||||
int depth, int pathlen, int flag)
|
||||
{
|
||||
int ret;
|
||||
Ecma119Node *node;
|
||||
int ret, hidden;
|
||||
Ecma119Node *node = NULL;
|
||||
int max_path;
|
||||
char *iso_name= NULL;
|
||||
char *iso_name= NULL, *ipath = NULL;
|
||||
IsoFileSrc *src = NULL;
|
||||
|
||||
if (image == NULL || iso == NULL || tree == NULL) {
|
||||
return ISO_NULL_POINTER;
|
||||
}
|
||||
*tree = NULL;
|
||||
|
||||
hidden = flag & 1;
|
||||
if (iso->hidden & LIBISO_HIDE_ON_RR) {
|
||||
/* file will be ignored */
|
||||
return 0;
|
||||
hidden = 1;
|
||||
if (!((iso->hidden & LIBISO_HIDE_BUT_WRITE) ||
|
||||
iso->type == LIBISO_BOOT)) {
|
||||
return 0; /* file will be ignored */
|
||||
}
|
||||
}
|
||||
ret = get_iso_name(image, iso, &iso_name);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
max_path = pathlen + 1 + (iso_name ? strlen(iso_name) : 0);
|
||||
if (!image->rockridge) {
|
||||
if ((iso->type == LIBISO_DIR && depth > 8) && !image->allow_deep_paths) {
|
||||
char *ipath = iso_tree_get_node_path(iso);
|
||||
return iso_msg_submit(image->image->id, ISO_FILE_IMGPATH_WRONG, 0,
|
||||
"File \"%s\" can't be added, because directory depth "
|
||||
"is greater than 8.", ipath);
|
||||
free(iso_name);
|
||||
free(ipath);
|
||||
return ret;
|
||||
} else if (max_path > 255 && !image->allow_longer_paths) {
|
||||
char *ipath = iso_tree_get_node_path(iso);
|
||||
ret = iso_msg_submit(image->image->id, ISO_FILE_IMGPATH_WRONG, 0,
|
||||
"File \"%s\" can't be added, because path length "
|
||||
"is greater than 255 characters", ipath);
|
||||
free(iso_name);
|
||||
free(ipath);
|
||||
return ret;
|
||||
|
||||
if (hidden) {
|
||||
max_path= pathlen;
|
||||
} else {
|
||||
ret = get_iso_name(image, iso, &iso_name);
|
||||
if (ret < 0) {
|
||||
iso_name = NULL; /* invalid, do not free */
|
||||
goto ex;
|
||||
}
|
||||
max_path = pathlen + 1 + (iso_name ? strlen(iso_name) : 0);
|
||||
if (!image->rockridge) {
|
||||
if ((iso->type == LIBISO_DIR && depth > 8) &&
|
||||
!image->allow_deep_paths) {
|
||||
ipath = iso_tree_get_node_path(iso);
|
||||
ret = iso_msg_submit(image->image->id, ISO_FILE_IMGPATH_WRONG,
|
||||
0, "File \"%s\" can't be added, "
|
||||
"because directory depth "
|
||||
"is greater than 8.", ipath);
|
||||
goto ex;
|
||||
} else if (max_path > 255 && !image->allow_longer_paths) {
|
||||
ipath = iso_tree_get_node_path(iso);
|
||||
ret = iso_msg_submit(image->image->id, ISO_FILE_IMGPATH_WRONG,
|
||||
0, "File \"%s\" can't be added, "
|
||||
"because path length "
|
||||
"is greater than 255 characters", ipath);
|
||||
goto ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (iso->type) {
|
||||
case LIBISO_FILE:
|
||||
ret = create_file(image, (IsoFile*)iso, &node);
|
||||
if (hidden) {
|
||||
ret = create_file_src(image, (IsoFile *) iso, &src);
|
||||
} else {
|
||||
ret = create_file(image, (IsoFile*)iso, &node);
|
||||
}
|
||||
break;
|
||||
case LIBISO_SYMLINK:
|
||||
if (hidden) {
|
||||
ret = 0; /* Hidden means non-existing */
|
||||
goto ex;
|
||||
}
|
||||
if (image->rockridge) {
|
||||
ret = create_symlink(image, (IsoSymlink*)iso, &node);
|
||||
} else {
|
||||
@ -331,6 +368,10 @@ int create_tree(Ecma119Image *image, IsoNode *iso, Ecma119Node **tree,
|
||||
}
|
||||
break;
|
||||
case LIBISO_SPECIAL:
|
||||
if (hidden) {
|
||||
ret = 0; /* Hidden means non-existing */
|
||||
goto ex;
|
||||
}
|
||||
if (image->rockridge) {
|
||||
ret = create_special(image, (IsoSpecial*)iso, &node);
|
||||
} else {
|
||||
@ -344,7 +385,11 @@ int create_tree(Ecma119Image *image, IsoNode *iso, Ecma119Node **tree,
|
||||
break;
|
||||
case LIBISO_BOOT:
|
||||
if (image->eltorito) {
|
||||
ret = create_boot_cat(image, (IsoBoot*)iso, &node);
|
||||
if (hidden) {
|
||||
ret = el_torito_catalog_file_src_create(image, &src);
|
||||
} else {
|
||||
ret = create_boot_cat(image, (IsoBoot*)iso, &node);
|
||||
}
|
||||
} else {
|
||||
/* log and ignore */
|
||||
ret = iso_msg_submit(image->image->id, ISO_FILE_IGNORED, 0,
|
||||
@ -355,21 +400,27 @@ int create_tree(Ecma119Image *image, IsoNode *iso, Ecma119Node **tree,
|
||||
{
|
||||
IsoNode *pos;
|
||||
IsoDir *dir = (IsoDir*)iso;
|
||||
ret = create_dir(image, dir, &node);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
|
||||
if (!hidden) {
|
||||
ret = create_dir(image, dir, &node);
|
||||
if (ret < 0) {
|
||||
goto ex;
|
||||
}
|
||||
}
|
||||
ret = ISO_SUCCESS;
|
||||
pos = dir->children;
|
||||
while (pos) {
|
||||
int cret;
|
||||
Ecma119Node *child;
|
||||
cret = create_tree(image, pos, &child, depth + 1, max_path);
|
||||
cret = create_tree(image, pos, &child, depth + 1, max_path,
|
||||
!!hidden);
|
||||
if (cret < 0) {
|
||||
/* error */
|
||||
ecma119_node_free(node);
|
||||
if (!hidden)
|
||||
ecma119_node_free(node);
|
||||
ret = cret;
|
||||
break;
|
||||
} else if (cret == ISO_SUCCESS) {
|
||||
} else if (cret == ISO_SUCCESS && !hidden) {
|
||||
/* add child to this node */
|
||||
int nchildren = node->info.dir->nchildren++;
|
||||
node->info.dir->children[nchildren] = child;
|
||||
@ -381,15 +432,30 @@ int create_tree(Ecma119Image *image, IsoNode *iso, Ecma119Node **tree,
|
||||
break;
|
||||
default:
|
||||
/* should never happen */
|
||||
return ISO_ASSERT_FAILURE;
|
||||
ret = ISO_ASSERT_FAILURE;
|
||||
goto ex;
|
||||
}
|
||||
if (ret <= 0) {
|
||||
free(iso_name);
|
||||
return ret;
|
||||
goto ex;
|
||||
}
|
||||
node->iso_name = iso_name;
|
||||
*tree = node;
|
||||
return ISO_SUCCESS;
|
||||
if (!hidden) {
|
||||
node->iso_name = iso_name;
|
||||
iso_name = NULL; /* now owned by node, do not free */
|
||||
*tree = node;
|
||||
node = NULL; /* now owned by caller, do not free */
|
||||
}
|
||||
ret = ISO_SUCCESS;
|
||||
ex:
|
||||
if (iso_name != NULL)
|
||||
free(iso_name);
|
||||
if (ipath != NULL)
|
||||
free(ipath);
|
||||
if (node != NULL)
|
||||
ecma119_node_free(node);
|
||||
if (hidden && ret == ISO_SUCCESS)
|
||||
ret = 0;
|
||||
/* The sources of hidden files are now owned by the rb-tree */
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -981,7 +1047,7 @@ int ecma119_tree_create(Ecma119Image *img)
|
||||
int ret;
|
||||
Ecma119Node *root;
|
||||
|
||||
ret = create_tree(img, (IsoNode*)img->image->root, &root, 1, 0);
|
||||
ret = create_tree(img, (IsoNode*)img->image->root, &root, 1, 0, 0);
|
||||
if (ret <= 0) {
|
||||
if (ret == 0) {
|
||||
/* unexpected error, root ignored!! This can't happen */
|
||||
|
@ -8,6 +8,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "eltorito.h"
|
||||
#include "stream.h"
|
||||
#include "fsource.h"
|
||||
@ -649,6 +653,8 @@ int iso_image_add_boot_image(IsoImage *image, const char *image_path,
|
||||
struct el_torito_boot_catalog *catalog = image->bootcat;
|
||||
ElToritoBootImage *boot_img;
|
||||
|
||||
if(catalog == NULL)
|
||||
return ISO_BOOT_NO_CATALOG;
|
||||
if (catalog->num_bootimages >= Libisofs_max_boot_imageS)
|
||||
return ISO_BOOT_IMAGE_OVERFLOW;
|
||||
ret = create_image(image, image_path, type, &boot_img);
|
||||
@ -670,6 +676,18 @@ int iso_image_set_boot_catalog_weight(IsoImage *image, int sort_weight)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* API */
|
||||
int iso_image_set_boot_catalog_hidden(IsoImage *image, int hide_attrs)
|
||||
{
|
||||
if (image->bootcat == NULL)
|
||||
return 0;
|
||||
if (image->bootcat->node == NULL)
|
||||
return 0;
|
||||
iso_node_set_hidden((IsoNode *) image->bootcat->node, hide_attrs);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void el_torito_boot_catalog_free(struct el_torito_boot_catalog *cat)
|
||||
{
|
||||
struct el_torito_boot_image *image;
|
||||
|
@ -7,6 +7,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "filesrc.h"
|
||||
#include "node.h"
|
||||
#include "util.h"
|
||||
@ -14,10 +18,7 @@
|
||||
#include "messages.h"
|
||||
#include "image.h"
|
||||
#include "stream.h"
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
#include "md5.h"
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -53,11 +54,8 @@ int iso_file_src_create(Ecma119Image *img, IsoFile *file, IsoFileSrc **src)
|
||||
unsigned int fs_id;
|
||||
dev_t dev_id;
|
||||
ino_t ino_id;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
int cret, no_md5= 0;
|
||||
void *xipt = NULL;
|
||||
#endif
|
||||
|
||||
if (img == NULL || file == NULL || src == NULL) {
|
||||
return ISO_NULL_POINTER;
|
||||
@ -103,9 +101,6 @@ int iso_file_src_create(Ecma119Image *img, IsoFile *file, IsoFileSrc **src)
|
||||
/* insert the filesrc in the tree */
|
||||
ret = iso_rbtree_insert(img->files, fsrc, (void**)src);
|
||||
if (ret <= 0) {
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if (ret == 0 && (*src)->checksum_index > 0) {
|
||||
/* Duplicate file source was mapped to previously registered source
|
||||
*/
|
||||
@ -113,17 +108,12 @@ int iso_file_src_create(Ecma119Image *img, IsoFile *file, IsoFileSrc **src)
|
||||
if (cret < 0)
|
||||
ret = cret;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
free(fsrc->sections);
|
||||
free(fsrc);
|
||||
return ret;
|
||||
}
|
||||
iso_stream_ref(fsrc->stream);
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if ((img->md5_file_checksums & 1) &&
|
||||
file->from_old_session && img->appendable) {
|
||||
ret = iso_node_get_xinfo((IsoNode *) file, checksum_md5_xinfo_func,
|
||||
@ -149,8 +139,6 @@ int iso_file_src_create(Ecma119Image *img, IsoFile *file, IsoFileSrc **src)
|
||||
return cret;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
|
||||
@ -304,21 +292,16 @@ int filesrc_read(IsoFileSrc *file, char *buf, size_t count)
|
||||
return iso_stream_read_buffer(file->stream, buf, count, &got);
|
||||
}
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
/* @return 1=ok, md5 is valid,
|
||||
0= not ok, go on,
|
||||
<0 fatal error, abort
|
||||
*/
|
||||
|
||||
static
|
||||
int filesrc_make_md5(Ecma119Image *t, IsoFileSrc *file, char md5[16], int flag)
|
||||
{
|
||||
return iso_stream_make_md5(file->stream, md5, 0);
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
static
|
||||
int filesrc_writer_write_data(IsoImageWriter *writer)
|
||||
{
|
||||
@ -331,13 +314,9 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
||||
char buffer[BLOCK_SIZE];
|
||||
off_t file_size;
|
||||
uint32_t nblocks;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
void *ctx= NULL;
|
||||
char md5[16], pre_md5[16];
|
||||
int pre_md5_valid = 0;
|
||||
#endif
|
||||
|
||||
|
||||
if (writer == NULL) {
|
||||
return ISO_ASSERT_FAILURE;
|
||||
@ -353,17 +332,11 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
||||
was_error = 0;
|
||||
file_size = iso_file_src_get_size(file);
|
||||
nblocks = DIV_UP(file_size, BLOCK_SIZE);
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
pre_md5_valid = 0;
|
||||
if (file->checksum_index > 0 && (t->md5_file_checksums & 2)) {
|
||||
/* Obtain an MD5 of content by a first read pass */
|
||||
pre_md5_valid = filesrc_make_md5(t, file, pre_md5, 0);
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
res = filesrc_open(file);
|
||||
iso_stream_get_file_name(file->stream, name);
|
||||
if (res < 0) {
|
||||
@ -407,18 +380,12 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if (file->checksum_index > 0) {
|
||||
/* initialize file checksum */
|
||||
res = iso_md5_start(&ctx);
|
||||
if (res <= 0)
|
||||
file->checksum_index = 0;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
/* write file contents to image */
|
||||
for (b = 0; b < nblocks; ++b) {
|
||||
int wres;
|
||||
@ -434,9 +401,6 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
||||
ret = wres;
|
||||
goto ex;
|
||||
}
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if (file->checksum_index > 0) {
|
||||
/* Add to file checksum */
|
||||
if (file_size - b * BLOCK_SIZE > BLOCK_SIZE)
|
||||
@ -447,9 +411,6 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
||||
if (res <= 0)
|
||||
file->checksum_index = 0;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
}
|
||||
|
||||
filesrc_close(file);
|
||||
@ -484,9 +445,6 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
||||
ret = res;
|
||||
goto ex;
|
||||
}
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if (file->checksum_index > 0) {
|
||||
/* Add to file checksum */
|
||||
if (file_size - b * BLOCK_SIZE > BLOCK_SIZE)
|
||||
@ -497,14 +455,8 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
||||
if (res <= 0)
|
||||
file->checksum_index = 0;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if (file->checksum_index > 0 &&
|
||||
file->checksum_index <= t->checksum_idx_counter) {
|
||||
/* Obtain checksum and dispose checksum context */
|
||||
@ -529,19 +481,12 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
||||
/* Write md5 into checksum buffer at file->checksum_index */
|
||||
memcpy(t->checksum_buffer + 16 * file->checksum_index, md5, 16);
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
}
|
||||
|
||||
ret = ISO_SUCCESS;
|
||||
ex:;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
if (ctx != NULL) /* avoid any memory leak */
|
||||
iso_md5_end(&ctx, md5);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -18,14 +18,8 @@
|
||||
struct Iso_File_Src
|
||||
{
|
||||
unsigned int prev_img :1; /**< if the file comes from a previous image */
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
unsigned int checksum_index :31;
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
|
||||
/** File Sections of the file in the image */
|
||||
struct iso_file_section *sections;
|
||||
int nsections;
|
||||
|
@ -8,6 +8,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "libisofs.h"
|
||||
#include "filter.h"
|
||||
#include "node.h"
|
||||
|
@ -13,6 +13,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "../libisofs.h"
|
||||
#include "../filter.h"
|
||||
#include "../fsource.h"
|
||||
|
@ -17,6 +17,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "../libisofs.h"
|
||||
#include "../filter.h"
|
||||
#include "../fsource.h"
|
||||
|
@ -7,6 +7,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "../libisofs.h"
|
||||
#include "../filter.h"
|
||||
#include "../fsource.h"
|
||||
|
@ -14,6 +14,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "../libisofs.h"
|
||||
#include "../filter.h"
|
||||
#include "../fsource.h"
|
||||
@ -826,6 +830,9 @@ int ziso_cmp_ino(IsoStream *s1, IsoStream *s2)
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
|
||||
#ifdef Libisofs_with_zliB
|
||||
|
||||
static
|
||||
void ziso_filter_free(FilterContext *filter)
|
||||
{
|
||||
@ -913,8 +920,6 @@ int ziso_filter_get_uncompressor(FilterContext *filter, IsoStream *original,
|
||||
}
|
||||
|
||||
|
||||
#ifdef Libisofs_with_zliB
|
||||
|
||||
/* Produce a parameter object suitable for iso_file_add_filter().
|
||||
* It may be disposed by free() after all those calls are made.
|
||||
*
|
||||
|
@ -7,6 +7,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "libisofs.h"
|
||||
#include "node.h"
|
||||
|
||||
|
@ -13,6 +13,10 @@
|
||||
* IsoDataSource to read image data.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "libisofs.h"
|
||||
#include "ecma119.h"
|
||||
#include "messages.h"
|
||||
@ -2439,9 +2443,6 @@ int iso_image_filesystem_new(IsoDataSource *src, struct iso_read_opts *opts,
|
||||
ifs->free = ifs_fs_free;
|
||||
|
||||
/* read Volume Descriptors and ensure it is a valid image */
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if (data->md5_load) {
|
||||
/* From opts->block on : check for superblock and tree tags */;
|
||||
ret = iso_src_check_sb_tree(src, opts->block, 0);
|
||||
@ -2456,8 +2457,6 @@ int iso_image_filesystem_new(IsoDataSource *src, struct iso_read_opts *opts,
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
/* 1. first, open the filesystem */
|
||||
ifs_fs_open(ifs);
|
||||
|
||||
@ -3128,8 +3127,6 @@ int iso_image_import(IsoImage *image, IsoDataSource *src,
|
||||
uint8_t *rpt;
|
||||
IsoFileSource *boot_src;
|
||||
IsoNode *node;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
uint32_t old_checksum_start_lba;
|
||||
uint32_t old_checksum_end_lba;
|
||||
uint32_t old_checksum_idx_count;
|
||||
@ -3139,7 +3136,6 @@ int iso_image_import(IsoImage *image, IsoDataSource *src,
|
||||
size_t size;
|
||||
void *ctx = NULL;
|
||||
char md5[16];
|
||||
#endif
|
||||
|
||||
if (image == NULL || src == NULL || opts == NULL) {
|
||||
return ISO_NULL_POINTER;
|
||||
@ -3181,14 +3177,11 @@ int iso_image_import(IsoImage *image, IsoDataSource *src,
|
||||
oldroot = image->root;
|
||||
oldbootcat = image->bootcat; /* could be NULL */
|
||||
image->bootcat = NULL;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
old_checksum_start_lba = image->checksum_start_lba;
|
||||
old_checksum_end_lba = image->checksum_end_lba;
|
||||
old_checksum_idx_count = image->checksum_idx_count;
|
||||
old_checksum_array = image->checksum_array;
|
||||
image->checksum_array = NULL;
|
||||
#endif
|
||||
|
||||
/* create new builder */
|
||||
ret = iso_image_builder_new(blback, &image->builder);
|
||||
@ -3363,8 +3356,6 @@ int iso_image_import(IsoImage *image, IsoDataSource *src,
|
||||
(*features)->size = data->nblocks;
|
||||
}
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if (data->md5_load) {
|
||||
/* Read checksum array */
|
||||
ret = iso_root_get_isofsca((IsoNode *) image->root,
|
||||
@ -3417,8 +3408,6 @@ int iso_image_import(IsoImage *image, IsoDataSource *src,
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
ret = iso_image_eval_boot_info_table(image, opts, src, data->nblocks, 0);
|
||||
if (ret < 0)
|
||||
goto import_revert;
|
||||
@ -3432,14 +3421,11 @@ int iso_image_import(IsoImage *image, IsoDataSource *src,
|
||||
el_torito_boot_catalog_free(image->bootcat);
|
||||
image->root = oldroot;
|
||||
image->bootcat = oldbootcat;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
old_checksum_start_lba = image->checksum_start_lba;
|
||||
old_checksum_end_lba = image->checksum_end_lba;
|
||||
old_checksum_idx_count = image->checksum_idx_count;
|
||||
image->checksum_array = old_checksum_array;
|
||||
old_checksum_array = NULL;
|
||||
#endif
|
||||
|
||||
import_cleanup:;
|
||||
|
||||
@ -3450,14 +3436,10 @@ int iso_image_import(IsoImage *image, IsoDataSource *src,
|
||||
iso_file_source_unref(newroot);
|
||||
fs->close(fs);
|
||||
iso_filesystem_unref(fs);
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
if (old_checksum_array != NULL)
|
||||
free(old_checksum_array);
|
||||
if (ctx != NULL)
|
||||
iso_md5_end(&ctx, md5);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,10 @@
|
||||
* Filesystem/FileSource implementation to access the local filesystem.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "fsource.h"
|
||||
#include "util.h"
|
||||
#include "aaip_0_2.h"
|
||||
|
@ -7,6 +7,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "fsource.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -8,6 +8,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "libisofs.h"
|
||||
#include "image.h"
|
||||
#include "node.h"
|
||||
@ -81,14 +85,10 @@ int iso_image_new(const char *name, IsoImage **image)
|
||||
img->inode_counter = 0;
|
||||
img->used_inodes = NULL;
|
||||
img->used_inodes_start = 0;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
img->checksum_start_lba = 0;
|
||||
img->checksum_end_lba = 0;
|
||||
img->checksum_idx_count = 0;
|
||||
img->checksum_array = NULL;
|
||||
#endif
|
||||
|
||||
*image = img;
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
@ -145,17 +145,12 @@ void iso_image_unref(IsoImage *image)
|
||||
|
||||
int iso_image_free_checksums(IsoImage *image, int flag)
|
||||
{
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
image->checksum_start_lba = 0;
|
||||
image->checksum_end_lba = 0;
|
||||
image->checksum_idx_count = 0;
|
||||
if (image->checksum_array != NULL)
|
||||
free(image->checksum_array);
|
||||
image->checksum_array = NULL;
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -175,13 +170,13 @@ int iso_image_free_checksums(IsoImage *image, int flag)
|
||||
*/
|
||||
int iso_image_attach_data(IsoImage *image, void *data, void (*give_up)(void*))
|
||||
{
|
||||
if (image == NULL || (data != NULL && free == NULL)) {
|
||||
if (image == NULL) {
|
||||
return ISO_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (image->user_data != NULL) {
|
||||
/* free previously attached data */
|
||||
if (image->user_data_free) {
|
||||
if (image->user_data_free != NULL) {
|
||||
image->user_data_free(image->user_data);
|
||||
}
|
||||
image->user_data = NULL;
|
||||
@ -592,39 +587,23 @@ ex:;
|
||||
int iso_image_get_session_md5(IsoImage *image, uint32_t *start_lba,
|
||||
uint32_t *end_lba, char md5[16], int flag)
|
||||
{
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if (image->checksum_array == NULL || image->checksum_idx_count < 1)
|
||||
return 0;
|
||||
*start_lba = image->checksum_start_lba;
|
||||
*end_lba = image->checksum_end_lba;
|
||||
memcpy(md5, image->checksum_array, 16);
|
||||
return ISO_SUCCESS;
|
||||
|
||||
#else
|
||||
|
||||
return 0;
|
||||
|
||||
#endif /* ! Libisofs_with_checksumS */
|
||||
|
||||
}
|
||||
|
||||
int iso_image_set_checksums(IsoImage *image, char *checksum_array,
|
||||
uint32_t start_lba, uint32_t end_lba,
|
||||
uint32_t idx_count, int flag)
|
||||
{
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
iso_image_free_checksums(image, 0);
|
||||
image->checksum_array = checksum_array;
|
||||
image->checksum_start_lba = start_lba;
|
||||
image->checksum_end_lba = end_lba;
|
||||
image->checksum_idx_count = idx_count;
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -154,8 +154,6 @@ struct Iso_Image
|
||||
uint8_t *used_inodes;
|
||||
ino_t used_inodes_start;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
/**
|
||||
* Array of MD5 checksums as announced by xattr "isofs.ca" of the
|
||||
* root node. Array element 0 contains an overall image checksum for the
|
||||
@ -168,8 +166,6 @@ struct Iso_Image
|
||||
uint32_t checksum_idx_count;
|
||||
char *checksum_array;
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -7,6 +7,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "iso1999.h"
|
||||
#include "messages.h"
|
||||
#include "writer.h"
|
||||
|
@ -8,6 +8,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "joliet.h"
|
||||
#include "messages.h"
|
||||
#include "writer.h"
|
||||
|
@ -5,6 +5,10 @@
|
||||
provided under GPL version 2 or later
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
@ -168,7 +168,17 @@ enum IsoHideNodeFlag {
|
||||
/** Hide the node in the Joliet tree, if Joliet extension are enabled */
|
||||
LIBISO_HIDE_ON_JOLIET = 1 << 1,
|
||||
/** Hide the node in the ISO-9660:1999 tree, if that format is enabled */
|
||||
LIBISO_HIDE_ON_1999 = 1 << 2
|
||||
LIBISO_HIDE_ON_1999 = 1 << 2,
|
||||
|
||||
/** With IsoNode and IsoBoot: Write data content even if the node is
|
||||
* not visible in any tree.
|
||||
* With directory nodes : Write data content of IsoNode and IsoBoot
|
||||
* in the directory's tree unless they are
|
||||
* explicitely marked LIBISO_HIDE_ON_RR
|
||||
* without LIBISO_HIDE_BUT_WRITE.
|
||||
* @since 0.6.34
|
||||
*/
|
||||
LIBISO_HIDE_BUT_WRITE = 1 << 3
|
||||
};
|
||||
|
||||
/**
|
||||
@ -785,6 +795,7 @@ struct IsoStream_Iface
|
||||
/**
|
||||
* Type of Stream.
|
||||
* "fsrc" -> Read from file source
|
||||
* "cout" -> Cut out interval from disk file
|
||||
* "mem " -> Read from memory
|
||||
* "boot" -> Boot catalog
|
||||
* "extf" -> External filter program
|
||||
@ -1091,7 +1102,7 @@ int iso_lib_is_compatible(int major, int minor, int micro);
|
||||
*/
|
||||
#define iso_lib_header_version_major 0
|
||||
#define iso_lib_header_version_minor 6
|
||||
#define iso_lib_header_version_micro 32
|
||||
#define iso_lib_header_version_micro 34
|
||||
|
||||
/**
|
||||
* Usage discussion:
|
||||
@ -2343,6 +2354,8 @@ int iso_image_set_boot_image(IsoImage *image, const char *image_path,
|
||||
* See iso_image_set_boot_image
|
||||
* @return
|
||||
* 1 on success, < 0 on error
|
||||
* ISO_BOOT_NO_CATALOG means iso_image_set_boot_image()
|
||||
* was not called first.
|
||||
*
|
||||
* @since 0.6.32
|
||||
*/
|
||||
@ -2350,8 +2363,6 @@ int iso_image_add_boot_image(IsoImage *image, const char *image_path,
|
||||
enum eltorito_boot_media_type type, int flag,
|
||||
ElToritoBootImage **boot);
|
||||
|
||||
/* TODO #00026 : add support for "hidden" bootable images. */
|
||||
|
||||
/**
|
||||
* Get the El-Torito boot catalog and the default boot image of an ISO image.
|
||||
*
|
||||
@ -2361,7 +2372,7 @@ int iso_image_add_boot_image(IsoImage *image, const char *image_path,
|
||||
* example, to prevent the user removing it.
|
||||
*
|
||||
* Both nodes are owned by libisofs and should not be freed. You can get your
|
||||
* own ref with iso_node_ref(). You can can also check if the node is already
|
||||
* own ref with iso_node_ref(). You can also check if the node is already
|
||||
* on the tree by getting its parent (note that when reading El-Torito info
|
||||
* from a previous image, the nodes might not be on the tree even if you haven't
|
||||
* removed them). Remember that you'll need to get a new ref
|
||||
@ -2449,6 +2460,25 @@ void iso_image_remove_boot_image(IsoImage *image);
|
||||
*/
|
||||
int iso_image_set_boot_catalog_weight(IsoImage *image, int sort_weight);
|
||||
|
||||
/**
|
||||
* Hides the boot catalog file from directory trees.
|
||||
*
|
||||
* For the meaning of hiding files see iso_node_set_hidden().
|
||||
*
|
||||
*
|
||||
* @param image
|
||||
* The image to manipulate.
|
||||
* @param hide_attrs
|
||||
* Or-combination of values from enum IsoHideNodeFlag to set the trees
|
||||
* in which the record.
|
||||
* @return
|
||||
* 0= no boot catalog attached , 1= ok , <0 = error
|
||||
*
|
||||
* @since 0.6.34
|
||||
*/
|
||||
int iso_image_set_boot_catalog_hidden(IsoImage *image, int hide_attrs);
|
||||
|
||||
|
||||
/**
|
||||
* Get the boot media type as of parameter "type" of iso_image_set_boot_image()
|
||||
* resp. iso_image_add_boot_image().
|
||||
@ -2958,26 +2988,40 @@ void iso_node_set_ctime(IsoNode *node, time_t time);
|
||||
time_t iso_node_get_ctime(const IsoNode *node);
|
||||
|
||||
/**
|
||||
* Set if the node will be hidden in RR/ISO tree, Joliet tree or both.
|
||||
* Set whether the node will be hidden in the directory trees of RR/ISO 9660,
|
||||
* or of Joliet (if enabled at all), or of ISO-9660:1999 (if enabled at all).
|
||||
*
|
||||
* If the file is set as hidden in one tree, it wil not be included there, so
|
||||
* it won't be visible in a OS accessing CD using that tree. For example,
|
||||
* GNU/Linux systems access to Rock Ridge / ISO9960 tree in order to see
|
||||
* what is recorded on CD, while MS Windows make use of the Joliet tree. If a
|
||||
* file is hidden only in Joliet, it wil not be visible in Windows systems,
|
||||
* while still visible in GNU/Linux.
|
||||
* A hidden file does not show up by name in the affected directory tree.
|
||||
* For example, if a file is hidden only in Joliet, it will normally
|
||||
* not be visible on Windows systems, while being shown on GNU/Linux.
|
||||
*
|
||||
* If a file is hidden in both trees, it will not be written to image.
|
||||
* If a file is not shown in any of the enabled trees, then its content will
|
||||
* not be written to the image, unless LIBISO_HIDE_BUT_WRITE is given (which
|
||||
* is available only since release 0.6.34).
|
||||
*
|
||||
* @param node
|
||||
* The node that is to be hidden.
|
||||
* @param hide_attrs
|
||||
* IsoHideNodeFlag's to set the trees in which file will be hidden.
|
||||
* Or-combination of values from enum IsoHideNodeFlag to set the trees
|
||||
* in which the node's name shall be hidden.
|
||||
*
|
||||
* @since 0.6.2
|
||||
*/
|
||||
void iso_node_set_hidden(IsoNode *node, int hide_attrs);
|
||||
|
||||
/**
|
||||
* Get the hide_attrs as eventually set by iso_node_set_hidden().
|
||||
*
|
||||
* @param node
|
||||
* The node to inquire.
|
||||
* @return
|
||||
* Or-combination of values from enum IsoHideNodeFlag which are
|
||||
* currently set for the node.
|
||||
*
|
||||
* @since 0.6.34
|
||||
*/
|
||||
int iso_node_get_hidden(IsoNode *node);
|
||||
|
||||
/**
|
||||
* Compare two nodes whether they are based on the same input and
|
||||
* can be considered as hardlinks to the same file objects.
|
||||
@ -3675,8 +3719,13 @@ void iso_tree_set_follow_symlinks(IsoImage *image, int follow);
|
||||
int iso_tree_get_follow_symlinks(IsoImage *image);
|
||||
|
||||
/**
|
||||
* Set whether to skip or not hidden files when adding a directory recursibely.
|
||||
* Default behavior is to not ignore them, i.e., to add hidden files to image.
|
||||
* Set whether to skip or not disk files with names beginning by '.'
|
||||
* when adding a directory recursively.
|
||||
* Default behavior is to not ignore them.
|
||||
*
|
||||
* Clarification: This is not related to the IsoNode property to be hidden
|
||||
* in one or more of the resulting image trees as of
|
||||
* IsoHideNodeFlag and iso_node_set_hidden().
|
||||
*
|
||||
* @since 0.6.2
|
||||
*/
|
||||
@ -5710,6 +5759,10 @@ int iso_md5_match(char first_md5[16], char second_md5[16]);
|
||||
/** Too many boot images (FAILURE,HIGH, -69) */
|
||||
#define ISO_BOOT_IMAGE_OVERFLOW 0xE830FFBA
|
||||
|
||||
/** No boot catalog created yet ((FAILURE,HIGH, -70) */ /* @since 0.6.34 */
|
||||
#define ISO_BOOT_NO_CATALOG 0xE830FFB9
|
||||
|
||||
|
||||
/**
|
||||
* Error on file operation (FAILURE,HIGH, -128)
|
||||
* (take a look at more specified error codes below)
|
||||
@ -6160,13 +6213,7 @@ struct burn_source {
|
||||
|
||||
/* ---------------------------- Improvements --------------------------- */
|
||||
|
||||
|
||||
/* Checksums : During image writing equip IsoFile objects with MD5 checksums
|
||||
and compute an overall checksum of the session. Store them in
|
||||
a separate checksum block area after the data area of the
|
||||
session.
|
||||
*/
|
||||
#define Libisofs_with_checksumS yes
|
||||
/* currently none being tested */
|
||||
|
||||
|
||||
/* ---------------------------- Experiments ---------------------------- */
|
||||
|
@ -1,3 +1,8 @@
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -8,6 +8,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -430,8 +434,6 @@ int checksum_md5_xinfo_func(void *data, int flag)
|
||||
|
||||
/* MD5 checksum image writer */
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
/*
|
||||
@flag bit0= recursion
|
||||
bit1= session will be appended to an existing image
|
||||
@ -508,15 +510,10 @@ int checksum_copy_old_nodes(Ecma119Image *target, IsoNode *node, int flag)
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
|
||||
static
|
||||
int checksum_writer_compute_data_blocks(IsoImageWriter *writer)
|
||||
{
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
size_t size;
|
||||
Ecma119Image *t;
|
||||
int ret;
|
||||
@ -557,9 +554,6 @@ int checksum_writer_compute_data_blocks(IsoImageWriter *writer)
|
||||
t->checksum_idx_counter + 2, 16, "MD5", 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
|
||||
@ -580,9 +574,6 @@ int checksum_writer_write_vol_desc(IsoImageWriter *writer)
|
||||
static
|
||||
int checksum_writer_write_data(IsoImageWriter *writer)
|
||||
{
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
int wres, res;
|
||||
size_t i, size;
|
||||
Ecma119Image *t;
|
||||
@ -649,12 +640,6 @@ ex:;
|
||||
if (ctx != NULL)
|
||||
iso_md5_end(&ctx, md5);
|
||||
return(res);
|
||||
|
||||
#else /* Libisofs_with_checksumS */
|
||||
|
||||
return ISO_SUCCESS;
|
||||
|
||||
#endif /* ! Libisofs_with_checksumS */
|
||||
}
|
||||
|
||||
|
||||
@ -684,17 +669,11 @@ int checksum_writer_create(Ecma119Image *target)
|
||||
|
||||
/* add this writer to image */
|
||||
target->writers[target->nwriters++] = writer;
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
/* Account for superblock checksum tag */
|
||||
if (target->md5_session_checksum) {
|
||||
target->checksum_sb_tag_pos = target->curblock;
|
||||
target->curblock++;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
|
||||
@ -702,9 +681,6 @@ int checksum_writer_create(Ecma119Image *target)
|
||||
static
|
||||
int iso_md5_write_scdbackup_tag(Ecma119Image *t, char *tag_block, int flag)
|
||||
{
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
void *ctx = NULL;
|
||||
off_t pos = 0, line_start;
|
||||
int record_len, block_len, res, i;
|
||||
@ -753,12 +729,6 @@ ex:;
|
||||
if (ctx != NULL)
|
||||
iso_md5_end(&ctx, md5);
|
||||
return res;
|
||||
|
||||
#else
|
||||
|
||||
return ISO_SUCCESS;
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
}
|
||||
|
||||
|
||||
@ -772,9 +742,6 @@ ex:;
|
||||
*/
|
||||
int iso_md5_write_tag(Ecma119Image *t, int flag)
|
||||
{
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
int res, mode, l, i, wres, tag_id_len;
|
||||
void *ctx = NULL;
|
||||
char md5[16], tag_block[2048], *tag_id;
|
||||
@ -863,13 +830,6 @@ ex:;
|
||||
if (ctx != NULL)
|
||||
iso_md5_end(&ctx, md5);
|
||||
return res;
|
||||
|
||||
#else /* Libisofs_with_checksumS */
|
||||
|
||||
return ISO_SUCCESS;
|
||||
|
||||
#endif /* ! Libisofs_with_checksumS */
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,6 +6,11 @@
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
@ -279,6 +284,8 @@ const char *iso_error_to_msg(int errcode)
|
||||
return "Detected file content changes while it was written into the image";
|
||||
case ISO_SCDBACKUP_TAG_NOT_0:
|
||||
return "Session does not start at LBA 0. scdbackup checksum tag not written.";
|
||||
case ISO_BOOT_NO_CATALOG:
|
||||
return "No boot catalog created yet";
|
||||
default:
|
||||
return "Unknown error";
|
||||
}
|
||||
|
@ -8,6 +8,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "libisofs.h"
|
||||
#include "image.h"
|
||||
#include "node.h"
|
||||
@ -428,6 +432,12 @@ void iso_node_set_hidden(IsoNode *node, int hide_attrs)
|
||||
}
|
||||
}
|
||||
|
||||
int iso_node_get_hidden(IsoNode *node)
|
||||
{
|
||||
return node->hidden;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a new node to a dir. Note that this function don't add a new ref to
|
||||
* the node, so you don't need to free it, it will be automatically freed
|
||||
@ -2660,9 +2670,6 @@ ex:;
|
||||
/* API */
|
||||
int iso_file_get_md5(IsoImage *image, IsoFile *file, char md5[16], int flag)
|
||||
{
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
int ret, i;
|
||||
size_t value_len;
|
||||
char *value = NULL;
|
||||
@ -2702,21 +2709,12 @@ ex:;
|
||||
if (value != NULL)
|
||||
free(value);
|
||||
return ret;
|
||||
|
||||
#else
|
||||
|
||||
return 0;
|
||||
|
||||
#endif /* ! Libisofs_with_checksumS */
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* API */
|
||||
int iso_file_make_md5(IsoFile *file, int flag)
|
||||
{
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
int ret, dig = 0;
|
||||
char *md5 = NULL;
|
||||
|
||||
@ -2737,13 +2735,6 @@ int iso_file_make_md5(IsoFile *file, int flag)
|
||||
ret = 1;
|
||||
ex:;
|
||||
return ret;
|
||||
|
||||
#else
|
||||
|
||||
return ISO_ERROR;
|
||||
|
||||
#endif /* ! Libisofs_with_checksumS */
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -9,6 +9,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "rockridge.h"
|
||||
#include "node.h"
|
||||
#include "ecma119_tree.h"
|
||||
|
@ -13,6 +13,10 @@
|
||||
* Rock Ridge and AAIP extensions on an ECMA-119 image.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "libisofs.h"
|
||||
#include "ecma119.h"
|
||||
#include "util.h"
|
||||
|
@ -8,6 +8,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "libisofs.h"
|
||||
#include "stream.h"
|
||||
#include "fsource.h"
|
||||
@ -864,9 +868,6 @@ int iso_stream_read_buffer(IsoStream *stream, char *buf, size_t count,
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
|
||||
/* @param flag bit0= dig out most original stream (e.g. because from old image)
|
||||
@return 1=ok, md5 is valid,
|
||||
0= not ok,
|
||||
@ -923,6 +924,3 @@ ex:;
|
||||
iso_md5_end(&ctx, md5);
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
||||
|
@ -8,6 +8,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "system_area.h"
|
||||
#include "eltorito.h"
|
||||
#include "filesrc.h"
|
||||
|
@ -11,6 +11,10 @@
|
||||
* Functions that act on the iso tree.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "libisofs.h"
|
||||
#include "node.h"
|
||||
#include "image.h"
|
||||
|
@ -9,6 +9,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "util.h"
|
||||
#include "libisofs.h"
|
||||
#include "messages.h"
|
||||
|
@ -7,6 +7,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "util.h"
|
||||
#include "libisofs.h"
|
||||
|
||||
|
@ -7,6 +7,10 @@
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "util.h"
|
||||
#include "libisofs.h"
|
||||
|
||||
|
Reference in New Issue
Block a user