Changes in uspace/srv/fs/ext4fs/ext4fs_ops.c [feeac0d:cc8044e] in mainline
- File:
-
- 1 edited
-
uspace/srv/fs/ext4fs/ext4fs_ops.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/ext4fs/ext4fs_ops.c
rfeeac0d rcc8044e 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 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 *); 103 106 104 107 /* Static variables */ … … 833 836 ext4fs_node_t *enode = EXT4FS_NODE(fn); 834 837 return enode->instance->service_id; 838 } 839 840 int ext4fs_size_block(service_id_t service_id, uint32_t *size) 841 { 842 ext4fs_instance_t *inst; 843 int rc = ext4fs_instance_get(service_id, &inst); 844 if (rc != EOK) 845 return rc; 846 847 if (NULL == inst) 848 return ENOENT; 849 850 ext4_superblock_t *sb = inst->filesystem->superblock; 851 *size = ext4_superblock_get_block_size(sb); 852 853 return EOK; 854 } 855 856 int ext4fs_total_block_count(service_id_t service_id, uint64_t *count) 857 { 858 ext4fs_instance_t *inst; 859 int rc = ext4fs_instance_get(service_id, &inst); 860 if (rc != EOK) 861 return rc; 862 863 if (NULL == inst) 864 return ENOENT; 865 866 ext4_superblock_t *sb = inst->filesystem->superblock; 867 *count = ext4_superblock_get_blocks_count(sb); 868 869 return EOK; 870 } 871 872 int ext4fs_free_block_count(service_id_t service_id, uint64_t *count) 873 { 874 ext4fs_instance_t *inst; 875 int rc = ext4fs_instance_get(service_id, &inst); 876 if (rc != EOK) 877 return rc; 878 879 ext4_superblock_t *sb = inst->filesystem->superblock; 880 *count = ext4_superblock_get_free_blocks_count(sb); 881 882 return EOK; 835 883 } 836 884 … … 854 902 .is_directory = ext4fs_is_directory, 855 903 .is_file = ext4fs_is_file, 856 .service_get = ext4fs_service_get 904 .service_get = ext4fs_service_get, 905 .size_block = ext4fs_size_block, 906 .total_block_count = ext4fs_total_block_count, 907 .free_block_count = ext4fs_free_block_count 857 908 }; 858 909
Note:
See TracChangeset
for help on using the changeset viewer.
