Changes in uspace/srv/fs/ext4fs/ext4fs_ops.c [cc8044e:feeac0d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/ext4fs/ext4fs_ops.c
rcc8044e rfeeac0d 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 *);106 103 107 104 /* Static variables */ … … 836 833 ext4fs_node_t *enode = EXT4FS_NODE(fn); 837 834 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;883 835 } 884 836 … … 902 854 .is_directory = ext4fs_is_directory, 903 855 .is_file = ext4fs_is_file, 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 856 .service_get = ext4fs_service_get 908 857 }; 909 858
Note:
See TracChangeset
for help on using the changeset viewer.