Changeset ccce242 in mainline
- Timestamp:
- 2010-01-10T14:01:25Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ff9e67
- Parents:
- 1ac3a52 (diff), 6c01702 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/io/io.c
r1ac3a52 rccce242 595 595 } 596 596 597 void clearerr(FILE *stream) 598 { 599 stream->eof = false; 600 stream->error = false; 601 } 602 597 603 int fphone(FILE *stream) 598 604 { -
uspace/srv/bd/file_bd/file_bd.c
r1ac3a52 rccce242 205 205 { 206 206 size_t n_rd; 207 int rc; 207 208 208 209 fibril_mutex_lock(&dev_lock); 209 210 210 fseek(img, ba * block_size, SEEK_SET); 211 clearerr(img); 212 rc = fseek(img, ba * block_size, SEEK_SET); 213 if (rc < 0) { 214 fibril_mutex_unlock(&dev_lock); 215 return EIO; 216 } 217 211 218 n_rd = fread(buf, block_size, cnt, img); 212 219 … … 228 235 { 229 236 size_t n_wr; 237 int rc; 230 238 231 239 fibril_mutex_lock(&dev_lock); 232 240 233 fseek(img, ba * block_size, SEEK_SET); 241 clearerr(img); 242 rc = fseek(img, ba * block_size, SEEK_SET); 243 if (rc < 0) { 244 fibril_mutex_unlock(&dev_lock); 245 return EIO; 246 } 247 234 248 n_wr = fwrite(buf, block_size, cnt, img); 235 249 … … 237 251 fibril_mutex_unlock(&dev_lock); 238 252 return EIO; /* Write error */ 253 } 254 255 if (fflush(img) != 0) { 256 fibril_mutex_unlock(&dev_lock); 257 return EIO; 239 258 } 240 259
Note:
See TracChangeset
for help on using the changeset viewer.