Changeset 4bf40f6 in mainline
- Timestamp:
- 2008-08-12T19:14:09Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 79d031b
- Parents:
- 17b2aac
- Location:
- uspace/srv/fs/fat
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat.c
r17b2aac r4bf40f6 108 108 fat_lookup(callid, &call); 109 109 break; 110 case VFS_READ: 111 fat_read(callid, &call); 112 break; 110 113 default: 111 114 ipc_answer_0(callid, ENOTSUP); -
uspace/srv/fs/fat/fat.h
r17b2aac r4bf40f6 223 223 extern void fat_mount(ipc_callid_t, ipc_call_t *); 224 224 extern void fat_lookup(ipc_callid_t, ipc_call_t *); 225 extern void fat_read(ipc_callid_t, ipc_call_t *); 225 226 226 227 extern fat_idx_t *fat_idx_get_by_pos(dev_handle_t, fat_cluster_t, unsigned); -
uspace/srv/fs/fat/fat_ops.c
r17b2aac r4bf40f6 707 707 } 708 708 709 void fat_read(ipc_callid_t rid, ipc_call_t *request) 710 { 711 dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request); 712 fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request); 713 off_t pos = (off_t)IPC_GET_ARG3(*request); 714 fat_node_t *nodep = (fat_node_t *)fat_node_get(dev_handle, index); 715 if (!nodep) { 716 ipc_answer_0(rid, ENOENT); 717 return; 718 } 719 720 ipc_callid_t callid; 721 size_t len; 722 if (!ipc_data_write_receive(&callid, &len)) { 723 fat_node_put(nodep); 724 ipc_answer_0(callid, EINVAL); 725 ipc_answer_0(rid, EINVAL); 726 return; 727 } 728 729 if (nodep->type == FAT_FILE) { 730 /* TODO */ 731 fat_node_put(nodep); 732 ipc_answer_0(callid, ENOTSUP); 733 ipc_answer_0(rid, ENOTSUP); 734 return; 735 } else { 736 assert(nodep->type == FAT_DIRECTORY); 737 /* TODO */ 738 fat_node_put(nodep); 739 ipc_answer_0(callid, ENOTSUP); 740 ipc_answer_0(rid, ENOTSUP); 741 return; 742 } 743 744 fat_node_put(nodep); 745 } 746 709 747 /** 710 748 * @}
Note:
See TracChangeset
for help on using the changeset viewer.