Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/src/unistd.c

    r4e6a610 r7c3fb9b  
    3939#include <errno.h>
    4040
    41 #include "posix/dirent.h"
    4241#include "posix/string.h"
    43 #include "posix/sys/types.h"
    4442#include "posix/fcntl.h"
    4543
     
    5351
    5452// FIXME: replace with a hash table
    55 aoff64_t posix_pos[VFS_MAX_OPEN_FILES];
     53aoff64_t posix_pos[MAX_OPEN_FILES];
    5654
    5755/* Array of environment variable strings (NAME=VALUE). */
     
    370368                 */
    371369                int fd = open(path, O_RDONLY);
    372                 if (fd >= 0) {
    373                         close(fd);
    374                         return 0;
    375                 }
    376                 DIR *dir = opendir(path);
    377                 if (dir != NULL) {
    378                         closedir(dir);
    379                         return 0;
    380                 }
    381                 return -1;
     370                if (fd < 0)
     371                        return -1;
     372                close(fd);
     373                return 0;
    382374        } else {
    383375                /* Invalid amode argument. */
Note: See TracChangeset for help on using the changeset viewer.