2007-12-15 12:13:49 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2007 Vreixo Formoso
|
|
|
|
*
|
|
|
|
* This file is part of the libisofs project; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation. See COPYING file for details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LIBISO_ECMA119_H_
|
|
|
|
#define LIBISO_ECMA119_H_
|
|
|
|
|
2007-12-16 18:10:47 +00:00
|
|
|
#include "libisofs.h"
|
|
|
|
|
2007-12-17 22:22:19 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2007-12-17 23:20:03 +00:00
|
|
|
#define BLOCK_SIZE 2048
|
|
|
|
|
2007-12-15 12:13:49 +00:00
|
|
|
typedef struct ecma119_image Ecma119Image;
|
2007-12-15 15:55:44 +00:00
|
|
|
typedef struct ecma119_node Ecma119Node;
|
2007-12-15 15:48:50 +00:00
|
|
|
typedef struct Iso_File_Src IsoFileSrc;
|
2007-12-16 18:10:47 +00:00
|
|
|
typedef struct Iso_Image_Writer IsoImageWriter;
|
2007-12-15 12:13:49 +00:00
|
|
|
|
|
|
|
struct ecma119_image {
|
2007-12-16 18:10:47 +00:00
|
|
|
IsoImage *image;
|
2007-12-15 15:55:44 +00:00
|
|
|
Ecma119Node *root;
|
2007-12-15 12:13:49 +00:00
|
|
|
|
|
|
|
unsigned int iso_level:2;
|
2007-12-16 18:10:47 +00:00
|
|
|
|
|
|
|
// int relaxed_constraints; /**< see ecma119_relaxed_constraints_flag */
|
|
|
|
//
|
|
|
|
// int replace_mode; /**< Replace ownership and modes of files
|
|
|
|
// *
|
|
|
|
// * 0. filesystem values
|
|
|
|
// * 1. useful values
|
|
|
|
// * bits 1-4 bitmask:
|
|
|
|
// * 2 - replace dir
|
|
|
|
// * 3 - replace file
|
|
|
|
// * 4 - replace gid
|
|
|
|
// * 5 - replace uid
|
|
|
|
// */
|
|
|
|
// mode_t dir_mode;
|
|
|
|
// mode_t file_mode;
|
|
|
|
// gid_t gid;
|
|
|
|
// uid_t uid;
|
2007-12-17 23:20:03 +00:00
|
|
|
int sort_files; /**< if sort files or not. Sorting is based of
|
|
|
|
* the weight of each file */
|
2007-12-16 18:10:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
time_t now; /**< Time at which writing began. */
|
|
|
|
off_t total_size; /**< Total size of the output. This only
|
|
|
|
* includes the current volume. */
|
|
|
|
//uint32_t vol_space_size;
|
2007-12-15 12:13:49 +00:00
|
|
|
|
2007-12-17 22:22:19 +00:00
|
|
|
/*
|
|
|
|
* Block being processed, either during image writing or structure
|
|
|
|
* size calculation.
|
|
|
|
*/
|
|
|
|
uint32_t curblock;
|
2007-12-17 23:20:03 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* number of dirs in ECMA-119 tree, computed together with dir position,
|
|
|
|
* and needed for path table computation in a efficient way
|
|
|
|
*/
|
|
|
|
size_t ndirs;
|
|
|
|
uint32_t l_path_table_pos;
|
|
|
|
uint32_t m_path_table_pos;
|
2007-12-17 22:22:19 +00:00
|
|
|
|
|
|
|
size_t nwriters;
|
|
|
|
IsoImageWriter **writers;
|
|
|
|
|
2007-12-15 12:13:49 +00:00
|
|
|
/* tree of files sources */
|
|
|
|
void *file_srcs;
|
|
|
|
int file_count;
|
2007-12-17 23:37:24 +00:00
|
|
|
|
|
|
|
/* file descriptors for read and writing image */
|
|
|
|
int wrfd; /* write to here */
|
|
|
|
int rdfd; /* read from here */
|
2007-12-15 12:13:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /*LIBISO_ECMA119_H_*/
|