Changeset 79d031b in mainline
- Timestamp:
- 2008-08-12T20:47:16Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c06dbf9
- Parents:
- 4bf40f6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_ops.c
r4bf40f6 r79d031b 70 70 #define FAT_DENTRY_DOT 0x2e 71 71 #define FAT_DENTRY_ERASED 0xe5 72 73 #define min(a, b) ((a) < (b) ? (a) : (b)) 72 74 73 75 static void dentry_name_canonify(fat_dentry_t *d, char *buf) … … 713 715 off_t pos = (off_t)IPC_GET_ARG3(*request); 714 716 fat_node_t *nodep = (fat_node_t *)fat_node_get(dev_handle, index); 717 uint16_t bps = fat_bps_get(dev_handle); 718 size_t bytes; 719 715 720 if (!nodep) { 716 721 ipc_answer_0(rid, ENOENT); … … 728 733 729 734 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 block_t *b; 736 737 bytes = min(len, bps - pos % bps); 738 b = fat_block_get(nodep, pos / bps); 739 (void) ipc_data_read_finalize(callid, b->data + pos % bps, 740 bytes); 741 block_put(b); 735 742 } else { 736 743 assert(nodep->type == FAT_DIRECTORY); … … 743 750 744 751 fat_node_put(nodep); 752 ipc_answer_1(rid, EOK, (ipcarg_t)bytes); 745 753 } 746 754
Note:
See TracChangeset
for help on using the changeset viewer.