X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=lwext4%2Fext4_inode.h;h=90c575403853df214b066b0ae6c50bc047518e6f;hb=e0720c64b73449e31a960d09e2f06cfce3b2bdeb;hp=c86bdb6feab639cc757196973f07a02ea39749f1;hpb=0697bc2f9ff85fa341dc597495413b2160636d59;p=lwext4.git diff --git a/lwext4/ext4_inode.h b/lwext4/ext4_inode.h index c86bdb6..90c5754 100644 --- a/lwext4/ext4_inode.h +++ b/lwext4/ext4_inode.h @@ -42,6 +42,10 @@ #ifndef EXT4_INODE_H_ #define EXT4_INODE_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include "ext4_config.h" #include @@ -114,25 +118,25 @@ void ext4_inode_set_change_inode_time(struct ext4_inode *inode, uint32_t time); * @param inode I-node * @return Time of the last content modification (POSIX) */ -uint32_t ext4_inode_get_modification_time(struct ext4_inode *inode); +uint32_t ext4_inode_get_modif_time(struct ext4_inode *inode); /**@brief Set time, when i-node content was last modified. * @param inode I-node * @param time Time of the last content modification (POSIX) */ -void ext4_inode_set_modification_time(struct ext4_inode *inode, uint32_t time); +void ext4_inode_set_modif_time(struct ext4_inode *inode, uint32_t time); /**@brief Get time, when i-node was deleted. * @param inode I-node * @return Time of the delete action (POSIX) */ -uint32_t ext4_inode_get_deletion_time(struct ext4_inode *inode); +uint32_t ext4_inode_get_del_time(struct ext4_inode *inode); /**@brief Set time, when i-node was deleted. * @param inode I-node * @param time Time of the delete action (POSIX) */ -void ext4_inode_set_deletion_time(struct ext4_inode *inode, uint32_t time); +void ext4_inode_set_del_time(struct ext4_inode *inode, uint32_t time); /**@brief Get ID of the i-node owner's group. * @param inode I-node to load gid from @@ -150,13 +154,13 @@ void ext4_inode_set_gid(struct ext4_inode *inode, uint32_t gid); * @param inode I-node to load number of links from * @return Number of links to i-node */ -uint16_t ext4_inode_get_links_count(struct ext4_inode *inode); +uint16_t ext4_inode_get_links_cnt(struct ext4_inode *inode); /**@brief Set number of links to i-node. * @param inode I-node to set number of links to * @param count Number of links to i-node */ -void ext4_inode_set_links_count(struct ext4_inode *inode, uint16_t cnt); +void ext4_inode_set_links_cnt(struct ext4_inode *inode, uint16_t cnt); /**@brief Get number of 512-bytes blocks used for i-node. * @param sb Superblock @@ -199,6 +203,18 @@ uint32_t ext4_inode_get_generation(struct ext4_inode *inode); */ void ext4_inode_set_generation(struct ext4_inode *inode, uint32_t gen); +/**@brief Get extra I-node size field. + * @param inode I-node + * @return extra I-node size + */ +uint16_t ext4_inode_get_extra_isize(struct ext4_inode *inode); + +/**@brief Set extra I-node size field. + * @param inode I-node + * @param size extra I-node size + */ +void ext4_inode_set_extra_isize(struct ext4_inode *inode, uint16_t size); + /**@brief Get address of block, where are extended attributes located. * @param inode I-node * @param sb Superblock @@ -280,6 +296,21 @@ void ext4_inode_clear_flag(struct ext4_inode *inode, uint32_t f); */ void ext4_inode_set_flag(struct ext4_inode *inode, uint32_t f); +/**@brief Get inode checksum(crc32) + * @param sb Superblock + * @param inode I-node to get checksum value from + */ +uint32_t +ext4_inode_get_csum(struct ext4_sblock *sb, struct ext4_inode *inode); + +/**@brief Get inode checksum(crc32) + * @param sb Superblock + * @param inode I-node to get checksum value from + */ +void +ext4_inode_set_csum(struct ext4_sblock *sb, struct ext4_inode *inode, + uint32_t checksum); + /**@brief Check if i-node can be truncated. * @param sb Superblock * @param inode I-node to check @@ -294,6 +325,10 @@ bool ext4_inode_can_truncate(struct ext4_sblock *sb, struct ext4_inode *inode); struct ext4_extent_header * ext4_inode_get_extent_header(struct ext4_inode *inode); +#ifdef __cplusplus +} +#endif + #endif /* EXT4_INODE_H_ */ /**