Move size, ino, dev cache from IsoFileSrc to IsoStream.

That is a better decission, as it reduces the number of stat() call 
needed, and anyway some Streams will need the size.
This commit is contained in:
Vreixo Formoso
2007-12-18 20:46:28 +01:00
parent 5b93cb4cdc
commit 39bde82ff6
5 changed files with 85 additions and 74 deletions

View File

@ -15,14 +15,7 @@
#include <stdint.h>
struct Iso_File_Src {
/* key */
unsigned int fs_id;
dev_t dev_id;
ino_t ino_id;
unsigned int prev_img:1; /**< if the file comes from a previous image */
off_t size; /**< size of this file */
uint32_t block; /**< Block where this file will be written on image */
int sort_weight;
IsoStream *stream;
@ -52,6 +45,11 @@ int iso_file_src_create(Ecma119Image *img, IsoFile *file, IsoFileSrc **src);
*/
void iso_file_src_free(Ecma119Image *img);
/**
* Get the size of the file this IsoFileSrc represents
*/
off_t iso_file_src_get_size(IsoFileSrc *file);
// TODO not implemented
int iso_file_src_open(IsoFileSrc *file);