Changeset 132ab5d1 in mainline for uspace/drv/bus/isa/isa.c


Ignore:
Timestamp:
2018-01-30T03:20:45Z (8 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a6cc679
Parents:
8bfb163 (diff), 6a5d05b (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.
Message:

Merge commit '6a5d05bd2551e64111bea4f9332dd7448c26ce84' into forwardport

Separate return value from error code in gen_irq_code*().

File:
1 edited

Legend:

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

    r8bfb163 r132ab5d1  
    4949#include <ctype.h>
    5050#include <macros.h>
    51 #include <malloc.h>
     51#include <stdlib.h>
    5252#include <dirent.h>
    5353#include <ipc/irc.h>
     
    277277        int fd;
    278278        size_t len;
    279         ssize_t r;
     279        int rc;
     280        size_t nread;
    280281        struct stat st;
    281282
    282         fd = vfs_lookup_open(conf_path, WALK_REGULAR, MODE_READ);
    283         if (fd < 0) {
     283        rc = vfs_lookup_open(conf_path, WALK_REGULAR, MODE_READ, &fd);
     284        if (rc != EOK) {
    284285                ddf_msg(LVL_ERROR, "Unable to open %s", conf_path);
    285286                goto cleanup;
     
    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.