Changeset 2d2c6ce in mainline
- Timestamp:
- 2012-01-21T12:47:15Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 73196d2
- Parents:
- 121e7adf
- Location:
- uspace/lib/ext4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_filesystem.c
r121e7adf r2d2c6ce 283 283 } 284 284 285 int ext4_filesystem_alloc_inode(ext4_filesystem_t *fs, ext4_inode_ref_t **inode_ref) 286 { 287 // TODO 288 return EOK; 289 } 290 291 int ext4_filesystem_init_inode(ext4_filesystem_t *fs, ext4_inode_ref_t *inode_ref, int flags) 292 { 293 ext4_inode_t *inode = inode_ref->inode; 294 295 if (flags & L_DIRECTORY) { 296 ext4_inode_set_mode(fs->superblock, inode, EXT4_INODE_MODE_DIRECTORY); 297 ext4_inode_set_links_count(inode, 1); // '.' entry 298 } else { 299 ext4_inode_set_mode(fs->superblock, inode, EXT4_INODE_MODE_FILE); 300 ext4_inode_set_links_count(inode, 0); 301 } 302 303 ext4_inode_set_uid(inode, 0); 304 ext4_inode_set_gid(inode, 0); 305 ext4_inode_set_size(inode, 0); 306 ext4_inode_set_access_time(inode, 0); 307 ext4_inode_set_change_inode_time(inode, 0); 308 ext4_inode_set_modification_time(inode, 0); 309 ext4_inode_set_deletion_time(inode, 0); 310 ext4_inode_set_blocks_count(fs->superblock, inode, 0); 311 ext4_inode_set_flags(inode, 0); 312 ext4_inode_set_generation(inode, 0); 313 314 for (uint32_t i = 0; i < EXT4_INODE_BLOCKS; i++) { 315 inode->blocks[i] = 0; 316 } 317 318 return EOK; 319 } 320 285 321 int ext4_filesystem_free_inode(ext4_filesystem_t *fs, ext4_inode_ref_t *inode_ref) 286 322 { -
uspace/lib/ext4/libext4_filesystem.h
r121e7adf r2d2c6ce 61 61 ext4_inode_ref_t **); 62 62 extern int ext4_filesystem_put_inode_ref(ext4_inode_ref_t *); 63 extern int ext4_filesystem_alloc_inode(ext4_filesystem_t *, ext4_inode_ref_t **); 64 extern int ext4_filesystem_init_inode(ext4_filesystem_t *, ext4_inode_ref_t *, int); 63 65 extern int ext4_filesystem_free_inode(ext4_filesystem_t *, ext4_inode_ref_t *); 64 66 extern int ext4_filesystem_truncate_inode(ext4_filesystem_t *,
Note:
See TracChangeset
for help on using the changeset viewer.