Ignore:
File:
1 edited

Legend:

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

    rb446b02 rf77c1c9  
    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.