Changeset d5c1051 in mainline for uspace/srv/bd


Ignore:
Timestamp:
2017-12-20T22:25:34Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
39b54fe
Parents:
8610c2c
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 22:22:29)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 22:25:34)
Message:

"Obviously harmless" error handling tweaks.

Location:
uspace/srv/bd
Files:
3 edited

Legend:

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

    r8610c2c rd5c1051  
    222222{
    223223        size_t n_rd;
    224         int rc;
    225224
    226225        if (size < cnt * block_size)
     
    238237
    239238        clearerr(img);
    240         rc = fseek(img, ba * block_size, SEEK_SET);
    241         if (rc < 0) {
     239        if (fseek(img, ba * block_size, SEEK_SET) < 0) {
    242240                fibril_mutex_unlock(&dev_lock);
    243241                return EIO;
     
    264262{
    265263        size_t n_wr;
    266         int rc;
    267264
    268265        if (size < cnt * block_size)
     
    280277
    281278        clearerr(img);
    282         rc = fseek(img, ba * block_size, SEEK_SET);
    283         if (rc < 0) {
     279        if (fseek(img, ba * block_size, SEEK_SET) < 0) {
    284280                fibril_mutex_unlock(&dev_lock);
    285281                return EIO;
  • uspace/srv/bd/sata_bd/sata_bd.c

    r8610c2c rd5c1051  
    251251        async_set_fallback_port_handler(sata_bd_connection, NULL);
    252252        rc = loc_server_register(NAME);
    253         if (rc < 0) {
     253        if (rc != EOK) {
    254254                printf(NAME ": Unable to register driver: %s.\n", str_error(rc));
    255255                return rc;
  • uspace/srv/bd/vbd/disk.c

    r8610c2c rd5c1051  
    11141114        idx = part->lpart->index;
    11151115
    1116         rc = asprintf(&name, "%sp%u", part->disk->svc_name, idx);
    1117         if (rc < 0) {
     1116        if (asprintf(&name, "%sp%u", part->disk->svc_name, idx) < 0) {
    11181117                log_msg(LOG_DEFAULT, LVL_ERROR, "Out of memory.");
    11191118                return ENOMEM;
Note: See TracChangeset for help on using the changeset viewer.