diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-20 11:56:28 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-20 12:02:53 +0200 |
commit | 13cc42ce135155f0437298540b0bc5a821d7a644 (patch) | |
tree | 18acd391d928db760a73d8b7c5231899ec7e7812 /include/meta_reader.h | |
parent | c2e01ed987e942005fa66f11d96b8edb1d930c99 (diff) |
cleanup: remove overly excessive comments
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/meta_reader.h')
-rw-r--r-- | include/meta_reader.h | 111 |
1 files changed, 9 insertions, 102 deletions
diff --git a/include/meta_reader.h b/include/meta_reader.h index a662959..16003f6 100644 --- a/include/meta_reader.h +++ b/include/meta_reader.h @@ -7,124 +7,31 @@ typedef struct meta_reader_t meta_reader_t; -/** - * @brief Create a meta data reader - * - * @memberof meta_reader_t - * - * @note This function internally prints error message to stderr on failure - * - * @param fd The underlying file descriptor to read from - * @param cmp A pointer to a compressor to use for extracting the data - * - * @return A pointer to a meta data reader, NULL on failure - */ +/* Create a meta data reader using a given compressor to extract data. + Internally prints error message to stderr on failure. */ meta_reader_t *meta_reader_create(int fd, compressor_t *cmp); -/** - * @brief Destroy a meta data reader and free all memory used by it - * - * @memberof meta_reader_t - * - * @param m A pointer to a meta data reader - */ void meta_reader_destroy(meta_reader_t *m); -/** - * @brief Seek to a specific meta data block and offset - * - * @memberof meta_reader_t - * - * @note This function internally prints error message to stderr on failure - * - * @param m A pointer to a meta data reader - * @param block_start The absolute position of the 16 bit header right before - * the compressed data block - * @param offset A byte offset into the data block - * - * @return Zero on success, -1 on failure - */ +/* Returns 0 on success. Internally prints to stderr on failure */ int meta_reader_seek(meta_reader_t *m, uint64_t block_start, size_t offset); -/** - * @brief Read a chunk of data from a meta data block - * - * @memberof meta_reader_t - * - * @note This function internally prints error message to stderr on failure - * - * If the end of the block is reached, this function transparently tries to - * interpret the data after the current block as a further meta data block, - * i.e. it can transparently read across multiple meta data blocks. - * - * @param m A pointer to a meta data reader - * @param data A pointer to a memory block to write the data to - * @param size The number of bytes to read - * - * @return Zero on success, -1 on failure - */ +/* Returns 0 on success. Internally prints to stderr on failure */ int meta_reader_read(meta_reader_t *m, void *data, size_t size); -/** - * @brief Read an inode from a meta data block - * - * @memberof meta_reader_t - * - * @note This function internally prints error message to stderr on failure - * - * This function is a conveniance wrapper around @ref meta_reader_read that - * reads and decodes an entire SquashFS inode. It first reads the common inode - * header, interprets it and reads the additional, type dependend data. - * - * @param ir A pointer to a meta data reader - * @param super A pointer to the SquashFS super block - * @param block_start A byte offset relative to the inode table start where - * the meta data containing the inode starts - * @param offset A byte offset into the uncompressed meta data block - * where the inode is stored - * - * @return A pointer to the decoded inode or NULL on failure. Can be freed - * with a single free call. - */ +/* Inode can be freed with a single free() call. + The function internally prints error message to stderr on failure. */ sqfs_inode_generic_t *meta_reader_read_inode(meta_reader_t *ir, sqfs_super_t *super, uint64_t block_start, size_t offset); -/** - * @brief Read a directory header from a meta data block - * - * @memberof meta_reader_t - * - * @note This function internally prints error message to stderr on failure - * - * This function is a conveniance wrapper around @ref meta_reader_read that - * reads and decodes a SquashFS directory header. - * - * @param m A pointer to a meta data reader - * @param hdr A pointer to a directory header structure to write the decoded - * data to - * - * @return Zero on success, -1 on failure - */ +/* Returns 0 on success. Internally prints to stderr on failure */ int meta_reader_read_dir_header(meta_reader_t *m, sqfs_dir_header_t *hdr); -/** - * @brief Read a directory entry from a meta data block - * - * @memberof meta_reader_t - * - * @note This function internally prints error message to stderr on failure - * - * This function is a conveniance wrapper around @ref meta_reader_read that - * reads and decodes a SquashFS directory entry. - * - * @param m A pointer to a meta data reader - * - * @return A pointer to a directory entry or NULL on failure. Can be freed - * with a single free call. - */ +/* Entry can be freed with a single free() call. + The function internally prints to stderr on failure */ sqfs_dir_entry_t *meta_reader_read_dir_ent(meta_reader_t *m); #endif /* META_READER_H */ |