aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-20 16:31:31 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-20 18:34:17 +0200
commitd57efdfa0b7420dabf97335ffe3a8b391b9f54b3 (patch)
treef42eed71fc5c4a07ef03696c9953da7d4e860095 /include
parentc106a290ed07fa89b39072925b1a2258071511a8 (diff)
Remove sqfs reader & fstree usage from sqfsdiff
Replace with direct usage of the dir reader and lower level data structures. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/data_reader.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/include/data_reader.h b/include/data_reader.h
index 63bd539..77bdd82 100644
--- a/include/data_reader.h
+++ b/include/data_reader.h
@@ -32,26 +32,14 @@ int data_reader_dump(data_reader_t *data, const sqfs_inode_generic_t *inode,
int outfd, bool allow_sparse);
/*
- Use a file_info_t to locate and extract all blocks of the coresponding
- file and its fragment, if it has one. The entire data is dumped to the
- given file descriptor.
-
- If allow_sparse is true, try to truncate and seek forward on outfd if a
- zero block is found. If false, always write blocks of zeros to outfd.
-
- Returns 0 on success, prints error messages to stderr on failure.
- */
-int data_reader_dump_file(data_reader_t *data, file_info_t *fi, int outfd,
- bool allow_sparse);
-
-/*
Read a chunk of data from a file. Starting from 'offset' into the
uncompressed file, read 'size' bytes into 'buffer'.
Returns the number of bytes read, 0 if EOF, -1 on failure. Prints an
error message to stderr on failure.
*/
-ssize_t data_reader_read(data_reader_t *data, file_info_t *fi,
+ssize_t data_reader_read(data_reader_t *data,
+ const sqfs_inode_generic_t *inode,
uint64_t offset, void *buffer, size_t size);
#endif /* DATA_READER_H */