Changeset 2b9e142 in mainline
- Timestamp:
- 2011-11-10T08:26:02Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b3d7277
- Parents:
- 1e65444
- Location:
- uspace/srv/fs/ext4fs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/ext4fs/Makefile
r1e65444 r2b9e142 28 28 29 29 USPACE_PREFIX = ../../.. 30 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBFS_PREFIX)/libfs.a $(LIBEXT4_PREFIX)/libext4.a 31 EXTRA_CFLAGS += -I$(LIBBLOCK_PREFIX) -I$(LIBFS_PREFIX) -I$(LIBEXT4_PREFIX) 30 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBFS_PREFIX)/libfs.a $(LIBEXT4_PREFIX)/libext4.a $(LIBPOSIX_PREFIX)/libposix.a 31 EXTRA_CFLAGS += -I$(LIBBLOCK_PREFIX) -I$(LIBFS_PREFIX) -I$(LIBEXT4_PREFIX) -I$(LIBPOSIX_PREFIX) 32 32 BINARY = ext4fs 33 33 -
uspace/srv/fs/ext4fs/ext4fs_ops.c
r1e65444 r2b9e142 42 42 #include <macros.h> 43 43 #include <malloc.h> 44 #include <string.h> 44 45 #include <adt/hash_table.h> 45 46 #include <ipc/loc.h> … … 216 217 } 217 218 218 /* Find length of component in bytes 219 * TODO: check for library function call that does this 220 */ 221 component_size = 0; 222 while (*(component+component_size) != 0) { 223 component_size++; 224 } 219 component_size = strlen(component); 225 220 226 221 if (ext4_superblock_has_feature_compatible(fs->superblock, EXT4_FEATURE_COMPAT_DIR_INDEX) && … … 395 390 int ext4fs_node_open(fs_node_t *fn) 396 391 { 397 // TODO stateless operation392 // Stateless operation 398 393 return EOK; 399 394 } … … 882 877 883 878 /* Check for sparse file 884 * If ext 2_filesystem_get_inode_data_block_index returned879 * If ext4_filesystem_get_inode_data_block_index returned 885 880 * fs_block == 0, it means that the given block is not allocated for the 886 881 * file and we need to return a buffer of zeros … … 964 959 } 965 960 966 // EXT4FS_DBG("bytes == \%u", bytes);967 968 961 iblock = pos / block_size; 969 962 … … 971 964 972 965 if (fblock == 0) { 973 // EXT4FS_DBG("Allocate block !!!");974 966 rc = ext4_bitmap_alloc_block(fs, inode_ref, &fblock); 975 967 if (rc != EOK) { … … 984 976 flags = BLOCK_FLAGS_NOREAD; 985 977 986 // EXT4FS_DBG("block \%u allocated", fblock);987 978 } 988 979 … … 995 986 996 987 if (flags == BLOCK_FLAGS_NOREAD) { 997 // EXT4FS_DBG("fill block with zeros");998 988 memset(write_block->data, 0, block_size); 999 989 } … … 1012 1002 return rc; 1013 1003 } 1014 1015 // EXT4FS_DBG("writing finished");1016 1004 1017 1005 old_inode_size = ext4_inode_get_size(fs->superblock, inode_ref->inode); … … 1109 1097 static int ext4fs_close(service_id_t service_id, fs_index_t index) 1110 1098 { 1111 // TODO1112 1099 return EOK; 1113 1100 } … … 1155 1142 /** 1156 1143 * @} 1157 */ 1144 */
Note:
See TracChangeset
for help on using the changeset viewer.