History

size_t to uvlong

Sigrid Solveig Haflínudóttir committed 6 years ago

Commit bf878b51 parent fbafe5a5 files · +15 −3Browse files

Unified · Split

5 files
  1. include/ext4.h +1 −1
  2. include/ext4_inode.h +6 −0
  3. include/plan9/generated/ext4_config.h +1 −1
  4. src/ext4_bcache.c +2 −1
  5. src/ext4_inode.c +5 −0
include/ext4.h+1−1
@@ -403,7 +403,7 @@ int ext4_raw_inode_fill(const char *path, uint32_t *ret_ino, · 402 unmodified lines
403403 *
404404 * @param path Parh to file/dir/link.
405405 * @param type Inode type.
406− * @ref EXT4_DIRENTRY_UNKNOWN
406+ * @ref EXT4_DE_UNKNOWN
407407 * @ref EXT4_DE_REG_FILE
408408 * @ref EXT4_DE_DIR
409409 * @ref EXT4_DE_CHRDEV
include/ext4_inode.h+6−0
@@ -137,6 +137,12 @@ void ext4_inode_set_modif_time(struct ext4_inode *inode, uint32_t time); · 136 unmodified lines
137137 */
138138 uint32_t ext4_inode_get_del_time(struct ext4_inode *inode);
139139
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+
140146 /**@brief Set time, when i-node was deleted.
141147 * @param inode I-node
142148 * @param time Time of the delete action (POSIX)
include/plan9/generated/ext4_config.h+1−1
@@ -12,7 +12,7 @@ typedef u64int uint64_t; · 11 unmodified lines
1212 typedef s32int int32_t;
1313 typedef s64int int64_t;
1414
15−typedef ulong size_t;
15+typedef uintptr size_t;
1616 typedef uintptr ptrdiff_t;
1717
1818 typedef enum { false, true } bool;
src/ext4_bcache.c+2−1
@@ -274,7 +274,8 @@ int ext4_bcache_free(struct ext4_bcache *bc, struct ext4_block *b) · 273 unmodified lines
274274 ext4_assert(bc && b);
275275
276276 /*Check if valid.*/
277− ext4_assert(b->lb_id);
277+ if (!b->lb_id)
278+ return EINVAL;
278279
279280 /*Block should have a valid pointer to ext4_buf.*/
280281 ext4_assert(buf);
src/ext4_inode.c+5−0
@@ -173,6 +173,11 @@ void ext4_inode_set_del_time(struct ext4_inode *inode, uint32_t time) · 172 unmodified lines
173173 inode->deletion_time = to_le32(time);
174174 }
175175
176+uint32_t ext4_inode_get_creation_time(struct ext4_inode *inode)
177+{
178+ return to_le32(inode->crtime);
179+}
180+
176181 uint32_t ext4_inode_get_gid(struct ext4_inode *inode)
177182 {
178183 return to_le32(inode->gid);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t