Changeset b7fd2a0 in mainline for uspace/srv/fs/udf/udf_ops.c
- Timestamp:
- 2018-01-13T03:10:29Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/udf/udf_ops.c
r36f0738 rb7fd2a0 68 68 static LIST_INITIALIZE(ffn_list); 69 69 70 static int udf_node_get(fs_node_t **rfn, service_id_t service_id,70 static errno_t udf_node_get(fs_node_t **rfn, service_id_t service_id, 71 71 fs_index_t index) 72 72 { 73 73 udf_instance_t *instance; 74 int rc = fs_instance_get(service_id, (void **) &instance);74 errno_t rc = fs_instance_get(service_id, (void **) &instance); 75 75 if (rc != EOK) 76 76 return rc; … … 94 94 } 95 95 96 static int udf_root_get(fs_node_t **rfn, service_id_t service_id)96 static errno_t udf_root_get(fs_node_t **rfn, service_id_t service_id) 97 97 { 98 98 udf_instance_t *instance; 99 int rc = fs_instance_get(service_id, (void **) &instance);99 errno_t rc = fs_instance_get(service_id, (void **) &instance); 100 100 if (rc != EOK) 101 101 return rc; … … 114 114 } 115 115 116 static int udf_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)116 static errno_t udf_match(fs_node_t **rfn, fs_node_t *pfn, const char *component) 117 117 { 118 118 char *name = malloc(MAX_FILE_NAME_LEN + 1); … … 132 132 133 133 if (str_casecmp(name, component) == 0) { 134 int rc = udf_node_get(rfn, udf_service_get(pfn),134 errno_t rc = udf_node_get(rfn, udf_service_get(pfn), 135 135 udf_long_ad_to_pos(UDF_NODE(pfn)->instance, &long_ad)); 136 136 … … 143 143 144 144 if (block != NULL) { 145 int rc = block_put(block);145 errno_t rc = block_put(block); 146 146 if (rc != EOK) 147 147 return rc; … … 155 155 } 156 156 157 static int udf_node_open(fs_node_t *fn)158 { 159 return EOK; 160 } 161 162 static int udf_node_put(fs_node_t *fn)157 static errno_t udf_node_open(fs_node_t *fn) 158 { 159 return EOK; 160 } 161 162 static errno_t udf_node_put(fs_node_t *fn) 163 163 { 164 164 udf_node_t *node = UDF_NODE(fn); … … 177 177 } 178 178 179 static int udf_create_node(fs_node_t **rfn, service_id_t service_id, int flags)180 { 181 return ENOTSUP; 182 } 183 184 static int udf_destroy_node(fs_node_t *fn)185 { 186 return ENOTSUP; 187 } 188 189 static int udf_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)190 { 191 return ENOTSUP; 192 } 193 194 static int udf_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *nm)195 { 196 return ENOTSUP; 197 } 198 199 static int udf_has_children(bool *has_children, fs_node_t *fn)179 static errno_t udf_create_node(fs_node_t **rfn, service_id_t service_id, int flags) 180 { 181 return ENOTSUP; 182 } 183 184 static errno_t udf_destroy_node(fs_node_t *fn) 185 { 186 return ENOTSUP; 187 } 188 189 static errno_t udf_link(fs_node_t *pfn, fs_node_t *cfn, const char *name) 190 { 191 return ENOTSUP; 192 } 193 194 static errno_t udf_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *nm) 195 { 196 return ENOTSUP; 197 } 198 199 static errno_t udf_has_children(bool *has_children, fs_node_t *fn) 200 200 { 201 201 *has_children = true; … … 248 248 } 249 249 250 static int udf_size_block(service_id_t service_id, uint32_t *size)250 static errno_t udf_size_block(service_id_t service_id, uint32_t *size) 251 251 { 252 252 udf_instance_t *instance; 253 int rc = fs_instance_get(service_id, (void **) &instance);253 errno_t rc = fs_instance_get(service_id, (void **) &instance); 254 254 if (rc != EOK) 255 255 return rc; … … 263 263 } 264 264 265 static int udf_total_block_count(service_id_t service_id, uint64_t *count)265 static errno_t udf_total_block_count(service_id_t service_id, uint64_t *count) 266 266 { 267 267 *count = 0; … … 270 270 } 271 271 272 static int udf_free_block_count(service_id_t service_id, uint64_t *count)272 static errno_t udf_free_block_count(service_id_t service_id, uint64_t *count) 273 273 { 274 274 *count = 0; … … 299 299 }; 300 300 301 static int udf_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info)302 { 303 return ENOTSUP; 304 } 305 306 static int udf_mounted(service_id_t service_id, const char *opts,301 static errno_t udf_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info) 302 { 303 return ENOTSUP; 304 } 305 306 static errno_t udf_mounted(service_id_t service_id, const char *opts, 307 307 fs_index_t *index, aoff64_t *size) 308 308 { … … 330 330 331 331 /* initialize block cache */ 332 int rc = block_init(service_id, MAX_SIZE);332 errno_t rc = block_init(service_id, MAX_SIZE); 333 333 if (rc != EOK) 334 334 return rc; … … 415 415 } 416 416 417 static int udf_unmounted(service_id_t service_id)417 static errno_t udf_unmounted(service_id_t service_id) 418 418 { 419 419 fs_node_t *fn; 420 int rc = udf_root_get(&fn, service_id);420 errno_t rc = udf_root_get(&fn, service_id); 421 421 if (rc != EOK) 422 422 return rc; … … 449 449 } 450 450 451 static int udf_read(service_id_t service_id, fs_index_t index, aoff64_t pos,451 static errno_t udf_read(service_id_t service_id, fs_index_t index, aoff64_t pos, 452 452 size_t *rbytes) 453 453 { 454 454 udf_instance_t *instance; 455 int rc = fs_instance_get(service_id, (void **) &instance);455 errno_t rc = fs_instance_get(service_id, (void **) &instance); 456 456 if (rc != EOK) 457 457 return rc; … … 523 523 } 524 524 525 static int udf_close(service_id_t service_id, fs_index_t index)526 { 527 return EOK; 528 } 529 530 static int udf_sync(service_id_t service_id, fs_index_t index)531 { 532 return ENOTSUP; 533 } 534 535 static int udf_write(service_id_t service_id, fs_index_t index, aoff64_t pos,525 static errno_t udf_close(service_id_t service_id, fs_index_t index) 526 { 527 return EOK; 528 } 529 530 static errno_t udf_sync(service_id_t service_id, fs_index_t index) 531 { 532 return ENOTSUP; 533 } 534 535 static errno_t udf_write(service_id_t service_id, fs_index_t index, aoff64_t pos, 536 536 size_t *wbytes, aoff64_t *nsize) 537 537 { … … 539 539 } 540 540 541 static int udf_truncate(service_id_t service_id, fs_index_t index,541 static errno_t udf_truncate(service_id_t service_id, fs_index_t index, 542 542 aoff64_t size) 543 543 { … … 545 545 } 546 546 547 static int udf_destroy(service_id_t service_id, fs_index_t index)547 static errno_t udf_destroy(service_id_t service_id, fs_index_t index) 548 548 { 549 549 return ENOTSUP;
Note:
See TracChangeset
for help on using the changeset viewer.