Changeset 3dd148d in mainline for uspace/lib/fs
- 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
- Location:
- uspace/lib/fs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fs/libfs.c
ra1c95da r3dd148d 834 834 835 835 ops->node_put(fn); 836 836 837 837 838 async_data_read_finalize(callid, &stat, sizeof(struct stat)); 838 839 async_answer_0(rid, EOK); … … 862 863 memset(&statfs, 0, sizeof(struct statfs)); 863 864 864 if (NULL != ops->size_block) 865 statfs.f_bsize = ops->size_block(service_id); 866 if (NULL != ops->total_block_count) 867 statfs.f_blocks = ops->total_block_count(service_id); 868 if (NULL != ops->free_block_count) 869 statfs.f_bfree = ops->free_block_count(service_id); 870 865 if (NULL != ops->size_block) { 866 rc = ops->size_block(service_id, &statfs.f_bsize); 867 if (rc != EOK) goto error; 868 } 869 870 if (NULL != ops->total_block_count) { 871 rc = ops->total_block_count(service_id, &statfs.f_blocks); 872 if (rc != EOK) goto error; 873 } 874 875 if (NULL != ops->free_block_count) { 876 rc = ops->free_block_count(service_id, &statfs.f_bfree); 877 if (rc != EOK) goto error; 878 } 879 871 880 ops->node_put(fn); 872 873 881 async_data_read_finalize(callid, &statfs, sizeof(struct statfs)); 874 882 async_answer_0(rid, EOK); 883 return; 884 885 error: 886 ops->node_put(fn); 887 async_answer_0(callid, EINVAL); 888 async_answer_0(rid, EINVAL); 875 889 } 876 890 -
uspace/lib/fs/libfs.h
ra1c95da r3dd148d 93 93 bool (* is_file)(fs_node_t *); 94 94 service_id_t (* service_get)(fs_node_t *); 95 uint32_t (* size_block)(service_id_t);96 uint64_t (* total_block_count)(service_id_t);97 uint64_t (* free_block_count)(service_id_t);95 int (* size_block)(service_id_t, uint32_t *); 96 int (* total_block_count)(service_id_t, uint64_t *); 97 int (* free_block_count)(service_id_t, uint64_t *); 98 98 } libfs_ops_t; 99 99
Note:
See TracChangeset
for help on using the changeset viewer.