Changeset 8e3498b in mainline for uspace/app/viewer/viewer.c


Ignore:
Timestamp:
2017-12-04T18:44:24Z (7 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/app/viewer/viewer.c

    r40feeac r8e3498b  
    126126        }
    127127
    128         ssize_t rd = vfs_read(fd, (aoff64_t []) {0}, tga, stat.size);
    129         if ((rd < 0) || (rd != (ssize_t) stat.size)) {
     128        size_t nread;
     129        rc = vfs_read(fd, (aoff64_t []) {0}, tga, stat.size, &nread);
     130        if (rc != EOK || nread != stat.size) {
    130131                free(tga);
    131132                vfs_put(fd);
Note: See TracChangeset for help on using the changeset viewer.