Ignore:
File:
1 edited

Legend:

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

    rf77c1c9 rb446b02  
    4949#include <ctype.h>
    5050#include <macros.h>
    51 #include <stdlib.h>
     51#include <malloc.h>
    5252#include <dirent.h>
    5353#include <ipc/irc.h>
     
    277277        int fd;
    278278        size_t len;
    279         int rc;
    280         size_t nread;
     279        ssize_t r;
    281280        struct stat st;
    282281
    283         rc = vfs_lookup_open(conf_path, WALK_REGULAR, MODE_READ, &fd);
    284         if (rc != EOK) {
     282        fd = vfs_lookup_open(conf_path, WALK_REGULAR, MODE_READ);
     283        if (fd < 0) {
    285284                ddf_msg(LVL_ERROR, "Unable to open %s", conf_path);
    286285                goto cleanup;
     
    307306        }
    308307
    309         rc = vfs_read(fd, (aoff64_t []) {0}, buf, len, &nread);
    310         if (rc != EOK) {
     308        r = vfs_read(fd, (aoff64_t []) {0}, buf, len);
     309        if (r < 0) {
    311310                ddf_msg(LVL_ERROR, "Unable to read file '%s'.", conf_path);
    312311                goto cleanup;
    313312        }
    314313
    315         buf[nread] = 0;
     314        buf[len] = 0;
    316315
    317316        suc = true;
Note: See TracChangeset for help on using the changeset viewer.