Changeset 3dd148d in mainline for uspace/srv/fs/ext4fs/ext4fs_ops.c
- Timestamp:
- 2013-07-29T15:15:49Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 736b07b
- Parents:
- a1c95da
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/ext4fs/ext4fs_ops.c
ra1c95da r3dd148d 101 101 static bool ext4fs_is_file(fs_node_t *node); 102 102 static service_id_t ext4fs_service_get(fs_node_t *node); 103 static uint32_t ext4fs_size_block(service_id_t);104 static uint64_t ext4fs_total_block_count(service_id_t);105 static uint64_t ext4fs_free_block_count(service_id_t);103 static int ext4fs_size_block(service_id_t, uint32_t *); 104 static int ext4fs_total_block_count(service_id_t, uint64_t *); 105 static int ext4fs_free_block_count(service_id_t, uint64_t *); 106 106 107 107 /* Static variables */ … … 841 841 } 842 842 843 uint32_t ext4fs_size_block(service_id_t service_id)843 int ext4fs_size_block(service_id_t service_id, uint32_t *size) 844 844 { 845 845 ext4fs_instance_t *inst; … … 847 847 if (rc != EOK) 848 848 return rc; 849 849 850 if (NULL == inst) 850 851 return ENOENT; 851 852 852 853 ext4_superblock_t *sb = inst->filesystem->superblock; 853 uint32_t block_size = ext4_superblock_get_block_size(sb);854 855 return block_size;856 } 857 858 uint64_t ext4fs_total_block_count(service_id_t service_id)854 *size = ext4_superblock_get_block_size(sb); 855 856 return EOK; 857 } 858 859 int ext4fs_total_block_count(service_id_t service_id, uint64_t *count) 859 860 { 860 861 ext4fs_instance_t *inst; … … 862 863 if (rc != EOK) 863 864 return rc; 865 864 866 if (NULL == inst) 865 867 return ENOENT; 866 868 867 869 ext4_superblock_t *sb = inst->filesystem->superblock; 868 uint64_t block_count = ext4_superblock_get_blocks_count(sb);869 870 return block_count;871 } 872 873 uint64_t ext4fs_free_block_count(service_id_t service_id)870 *count = ext4_superblock_get_blocks_count(sb); 871 872 return EOK; 873 } 874 875 int ext4fs_free_block_count(service_id_t service_id, uint64_t *count) 874 876 { 875 877 ext4fs_instance_t *inst; … … 881 883 882 884 ext4_superblock_t *sb = inst->filesystem->superblock; 883 uint64_t block_count = ext4_superblock_get_free_blocks_count(sb);884 885 return block_count;885 *count = ext4_superblock_get_free_blocks_count(sb); 886 887 return EOK; 886 888 } 887 889
Note:
See TracChangeset
for help on using the changeset viewer.