Changeset 0d0b319 in mainline for uspace/lib/posix/source/fcntl.c


Ignore:
Timestamp:
2018-01-04T20:03:02Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3c7702c0
Parents:
10de842
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 19:18:29)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:03:02)
Message:

Flip error constants to positive values, and update libposix for the change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/source/fcntl.c

    r10de842 r0d0b319  
    4040
    4141#include "libc/vfs/vfs.h"
    42 #include "posix/errno.h"
     42
     43#include <errno.h>
    4344
    4445/**
     
    103104int posix_open(const char *pathname, int posix_flags, ...)
    104105{
    105         int rc;
    106106        posix_mode_t posix_mode = 0;
    107107        if (posix_flags & O_CREAT) {
     
    136136
    137137        int file;
    138         rc = rcerrno(vfs_lookup, pathname, flags, &file);
    139         if (rc != EOK)
     138
     139        if (failed(vfs_lookup(pathname, flags, &file)))
    140140                return -1;
    141141
    142         rc = rcerrno(vfs_open, file, mode);
    143         if (rc != EOK) {
     142        if (failed(vfs_open(file, mode))) {
    144143                vfs_put(file);
    145144                return -1;
     
    148147        if (posix_flags & O_TRUNC) {
    149148                if (posix_flags & (O_RDWR | O_WRONLY)) {
    150                         rc = rcerrno(vfs_resize, file, 0);
    151                         if (rc != EOK) {
     149                        if (failed(vfs_resize(file, 0))) {
    152150                                vfs_put(file);
    153151                                return -1;
Note: See TracChangeset for help on using the changeset viewer.