Unified · Split
| @@ -403,7 +403,7 @@ int ext4_raw_inode_fill(const char *path, uint32_t *ret_ino, · 402 unmodified lines | |||
| 403 | * | 403 | * |
| 404 | * @param path Parh to file/dir/link. | 404 | * @param path Parh to file/dir/link. |
| 405 | * @param type Inode type. | 405 | * @param type Inode type. |
| 406 | * @ref EXT4_DIRENTRY_UNKNOWN | 406 | * @ref EXT4_DE_UNKNOWN |
| 407 | * @ref EXT4_DE_REG_FILE | 407 | * @ref EXT4_DE_REG_FILE |
| 408 | * @ref EXT4_DE_DIR | 408 | * @ref EXT4_DE_DIR |
| 409 | * @ref EXT4_DE_CHRDEV | 409 | * @ref EXT4_DE_CHRDEV |
| @@ -137,6 +137,12 @@ void ext4_inode_set_modif_time(struct ext4_inode *inode, uint32_t time); · 136 unmodified lines | |||
| 137 | */ | 137 | */ |
| 138 | uint32_t ext4_inode_get_del_time(struct ext4_inode *inode); | 138 | uint32_t ext4_inode_get_del_time(struct ext4_inode *inode); |
| 139 | 139 | ||
| 140 | /**@brief Get time, when i-node was created. | ||
| 141 | * @param inode I-node | ||
| 142 | * @return Time of the create action (POSIX) | ||
| 143 | */ | ||
| 144 | uint32_t ext4_inode_get_creation_time(struct ext4_inode *inode); | ||
| 145 | |||
| 140 | /**@brief Set time, when i-node was deleted. | 146 | /**@brief Set time, when i-node was deleted. |
| 141 | * @param inode I-node | 147 | * @param inode I-node |
| 142 | * @param time Time of the delete action (POSIX) | 148 | * @param time Time of the delete action (POSIX) |
| @@ -12,7 +12,7 @@ typedef u64int uint64_t; · 11 unmodified lines | |||
| 12 | typedef s32int int32_t; | 12 | typedef s32int int32_t; |
| 13 | typedef s64int int64_t; | 13 | typedef s64int int64_t; |
| 14 | 14 | ||
| 15 | typedef ulong size_t; | 15 | typedef uintptr size_t; |
| 16 | typedef uintptr ptrdiff_t; | 16 | typedef uintptr ptrdiff_t; |
| 17 | 17 | ||
| 18 | typedef enum { false, true } bool; | 18 | typedef enum { false, true } bool; |
| @@ -274,7 +274,8 @@ int ext4_bcache_free(struct ext4_bcache *bc, struct ext4_block *b) · 273 unmodified lines | |||
| 274 | ext4_assert(bc && b); | 274 | ext4_assert(bc && b); |
| 275 | 275 | ||
| 276 | /*Check if valid.*/ | 276 | /*Check if valid.*/ |
| 277 | ext4_assert(b->lb_id); | 277 | if (!b->lb_id) |
| 278 | return EINVAL; | ||
| 278 | 279 | ||
| 279 | /*Block should have a valid pointer to ext4_buf.*/ | 280 | /*Block should have a valid pointer to ext4_buf.*/ |
| 280 | ext4_assert(buf); | 281 | ext4_assert(buf); |
| @@ -173,6 +173,11 @@ void ext4_inode_set_del_time(struct ext4_inode *inode, uint32_t time) · 172 unmodified lines | |||
| 173 | inode->deletion_time = to_le32(time); | 173 | inode->deletion_time = to_le32(time); |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | uint32_t ext4_inode_get_creation_time(struct ext4_inode *inode) | ||
| 177 | { | ||
| 178 | return to_le32(inode->crtime); | ||
| 179 | } | ||
| 180 | |||
| 176 | uint32_t ext4_inode_get_gid(struct ext4_inode *inode) | 181 | uint32_t ext4_inode_get_gid(struct ext4_inode *inode) |
| 177 | { | 182 | { |
| 178 | return to_le32(inode->gid); | 183 | return to_le32(inode->gid); |