Changeset 8e3498b in mainline for uspace/drv/bus/isa


Ignore:
Timestamp:
2017-12-04T18:44:24Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bde5c04
Parents:
40feeac
Message:

vfs_read/write() should return error code separately from number of bytes transferred.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/isa/isa.c

    r40feeac r8e3498b  
    277277        int fd;
    278278        size_t len;
    279         ssize_t r;
     279        int rc;
     280        size_t nread;
    280281        struct stat st;
    281282
     
    306307        }
    307308
    308         r = vfs_read(fd, (aoff64_t []) {0}, buf, len);
    309         if (r < 0) {
     309        rc = vfs_read(fd, (aoff64_t []) {0}, buf, len, &nread);
     310        if (rc != EOK) {
    310311                ddf_msg(LVL_ERROR, "Unable to read file '%s'.", conf_path);
    311312                goto cleanup;
    312313        }
    313314
    314         buf[len] = 0;
     315        buf[nread] = 0;
    315316
    316317        suc = true;
Note: See TracChangeset for help on using the changeset viewer.