summaryrefslogtreecommitdiff
path: root/libc/src/close.c
blob: f508a2cfff0978545da0aac3aa92cc3620df6a1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "reent.h"
#include "errno.h"
#include <fio.h>

int close(int fd) {
    if (!fio_is_open(fd)) {
        set_errno(EBADF);
        return -1;
    }
    
    return fio_close(fd);
}