Changeset 453f2e75 in mainline
- Timestamp:
- 2009-11-03T22:24:44Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dfddfcd
- Parents:
- 1647323
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_ops.c
r1647323 r453f2e75 1077 1077 rc = fat_block_get(&b, bs, nodep, pos / bps, 1078 1078 BLOCK_FLAGS_NONE); 1079 assert(rc == EOK); 1079 if (rc != EOK) { 1080 fat_node_put(fn); 1081 ipc_answer_0(callid, rc); 1082 ipc_answer_0(rid, rc); 1083 return; 1084 } 1080 1085 (void) async_data_read_finalize(callid, b->data + pos % bps, 1081 1086 bytes); 1082 1087 rc = block_put(b); 1083 assert(rc == EOK); 1088 if (rc != EOK) { 1089 fat_node_put(fn); 1090 ipc_answer_0(rid, rc); 1091 return; 1092 } 1084 1093 } 1085 1094 } else { … … 1105 1114 rc = fat_block_get(&b, bs, nodep, bnum, 1106 1115 BLOCK_FLAGS_NONE); 1107 assert(rc == EOK); 1116 if (rc != EOK) 1117 goto err; 1108 1118 for (o = pos % (bps / sizeof(fat_dentry_t)); 1109 1119 o < bps / sizeof(fat_dentry_t); … … 1116 1126 case FAT_DENTRY_LAST: 1117 1127 rc = block_put(b); 1118 assert(rc == EOK); 1128 if (rc != EOK) 1129 goto err; 1119 1130 goto miss; 1120 1131 default: … … 1122 1133 fat_dentry_name_get(d, name); 1123 1134 rc = block_put(b); 1124 assert(rc == EOK); 1135 if (rc != EOK) 1136 goto err; 1125 1137 goto hit; 1126 1138 } 1127 1139 } 1128 1140 rc = block_put(b); 1129 assert(rc == EOK); 1141 if (rc != EOK) 1142 goto err; 1130 1143 bnum++; 1131 1144 } 1132 1145 miss: 1133 fat_node_put(fn); 1134 ipc_answer_0(callid, ENOENT); 1135 ipc_answer_1(rid, ENOENT, 0); 1136 return; 1146 rc = fat_node_put(fn); 1147 ipc_answer_0(callid, rc != EOK ? rc : ENOENT); 1148 ipc_answer_1(rid, rc != EOK ? rc : ENOENT, 0); 1149 return; 1150 1151 err: 1152 (void) fat_node_put(fn); 1153 ipc_answer_0(callid, rc); 1154 ipc_answer_0(rid, rc); 1155 return; 1156 1137 1157 hit: 1138 1158 (void) async_data_read_finalize(callid, name, str_size(name) + 1); … … 1140 1160 } 1141 1161 1142 fat_node_put(fn);1143 ipc_answer_1(rid, EOK, (ipcarg_t)bytes);1162 rc = fat_node_put(fn); 1163 ipc_answer_1(rid, rc, (ipcarg_t)bytes); 1144 1164 } 1145 1165
Note:
See TracChangeset
for help on using the changeset viewer.