Age | Commit message (Collapse) | Author |
|
This commit rewrites the libtar write paths to use libfstream insead of
a FILE pointer. Also, the libcommon file extraction function is remodeled
to use libfstream.
In accordance, rdsquashfs, sqfs2tar and sqfsdiff have some minor
adjustments made to work with the ported libtar and libcommon.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Instead of having seperate counters for blocks, dir index bytes
and having to fiddle out the link target size, simply use a single
value that stores the number of payload bytes used.
A seperate "payload bytes available" is used for dynamically
growing inodes during processing.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
There are 3 types of extra payload:
- Directory index
- File block sizes
- Symlink target
This commit removes the type specific pointers and modifies the code
to use the payload area directly. To simplify the file block case and
mitigate alignment issues, the type of the extra field is changed to
sqfs_u32.
For symlink target, the extra field can simply be cast to a character
pointer (it had to be cast anyway for most uses). For block sizes,
probably the most common usecase, it can be used as is. For directory
indices, there is a helper function anyway.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
In most cases, including unistd.h and fcntl.h was a left over anyway.
In the cases where it was not, move it to compat.h.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Instead, use stdio FILE pointers. On POSIX systems, use fileno to get
the file descriptor and hopefully create sparase files.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
That is IMO less confusing and express what it is (i.e. what it has
become) more clearly, i.e. common code shared by the utilities.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|