Changeset ec18957a in mainline for uspace/lib/posix/fcntl.c


Ignore:
Timestamp:
2011-07-08T00:54:24Z (13 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:
9c1984f
Parents:
3f466c33
Message:

Added errno.h (see commentary inside).

File:
1 edited

Legend:

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

    r3f466c33 rec18957a  
    3737#include "internal/common.h"
    3838#include "fcntl.h"
     39
    3940#include "libc/unistd.h"
    4041#include "libc/vfs/vfs.h"
    41 #include <errno.h>
     42#include "errno.h"
    4243
    4344/**
     
    6566                rc = fd_node(fd, &node);
    6667                if (rc != EOK) {
    67                         // TODO: propagate a POSIX compatible errno
     68                        errno = -rc;
    6869                        return -1;
    6970                }
     
    7273                int newfd = open_node(&node, 0);
    7374                if (newfd < 0) {
    74                         // TODO: propagate a POSIX compatible errno
     75                        errno = -newfd;
    7576                        return -1;
    7677                }
     
    8182                rc = dup2(fd, newfd);
    8283                if (rc != EOK) {
    83                         // TODO: propagate a POSIX compatible errno
     84                        errno = -rc;
    8485                        return -1;
    8586                }
Note: See TracChangeset for help on using the changeset viewer.