Init implementation of IsoFileSrc.
Ecma119Image, defined for first time in this commit, is the context for image written. It keeps the low level objects needed during image written. IsoFileSrc is the low level object that takes care about the info needed to write file contents to image. It takes care about reading from Stream in 2K block chunks. To prevent the same file be written twice to image, we keep in Ecma119Image a search tree, indexed by the triple key (fs, device, inode) that uniquelly identifies a source.
This commit is contained in:
11
src/stream.c
11
src/stream.c
@ -104,14 +104,17 @@ int fsrc_get_id(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id,
|
||||
}
|
||||
src = (IsoFileSource*)stream->data;
|
||||
|
||||
fs = src->get_filesystem(src);
|
||||
|
||||
*fs_id = fs->get_id(fs);
|
||||
if (fs_id == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
result = src->stat(src, &info);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
|
||||
fs = src->get_filesystem(src);
|
||||
|
||||
*fs_id = fs->get_id(fs);
|
||||
*dev_id = info.st_dev;
|
||||
*ino_id = info.st_ino;
|
||||
return ISO_SUCCESS;
|
||||
|
Reference in New Issue
Block a user