Changeset c77a64f in mainline for uspace/srv/bd/file_bd/file_bd.c


Ignore:
Timestamp:
2010-01-10T12:22:14Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6c01702
Parents:
5f70118
Message:

Must clear error indicator when reading/writing blocks in file_bd, otherwise a read beyond the end of device would render it unusable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/file_bd/file_bd.c

    r5f70118 rc77a64f  
    208208        fibril_mutex_lock(&dev_lock);
    209209
     210        clearerr(img);
    210211        fseek(img, ba * block_size, SEEK_SET);
    211212        n_rd = fread(buf, block_size, cnt, img);
     
    231232        fibril_mutex_lock(&dev_lock);
    232233
     234        clearerr(img);
    233235        fseek(img, ba * block_size, SEEK_SET);
    234236        n_wr = fwrite(buf, block_size, cnt, img);
Note: See TracChangeset for help on using the changeset viewer.