~aleteoryx/muditaos

ref: 32de9ec671db9ddaf68a61d7a53f6a971f45f75d muditaos/module-vfs/src/newlib/vfs_io_syscalls.cpp -rw-r--r-- 2.6 KiB
32de9ec6 — Lucjan Bryndza [EGD-5102] Fix compile on rt1051 platform 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <errno.h>
#include <dirent.h>
#include <log/log.hpp>
#include <fcntl.h>
#include <cstring>
#include <unistd.h>
#include "vfs_internal_dirent.hpp"
#include "HandleManager.hpp"
#include <newlib/vfs_io_syscalls.hpp>
#include <sys/statvfs.h>

namespace vfsn::internal::syscalls
{
    int open(int &_errno_, const char *file, int flags, int mode)
    {
        return -1;
    }

    long close(int &_errno_, int fd)
    {
        return -1;
    }

    long write(int &_errno_, int fd, const void *buf, size_t cnt)
    {
        return -1;
    }

    long read(int &_errno_, int fd, void *buf, size_t cnt)
    {
        return -1;
    }

    off_t lseek(int &_errno_, int fd, off_t pos, int dir)
    {
        return -1;
    }
    int fstat(int &_errno_, int fd, struct stat *pstat)
    {
        return -1;
    }
    int link(int &_errno_, const char *existing, const char *newLink)
    {
        return -1;
    }
    int unlink(int &_errno_, const char *name)
    {
        return -1;
    }

    int fcntl(int &_errno_, int fd, int cmd, int arg)
    {
        return -1;
    }
    int stat(int &_errno_, const char *file, struct stat *pstat)
    {
        return -1;
    }

    int chdir(int &_errno_, const char *path)
    {
        return -1;
    }
    char *getcwd(int &_errno_, char *buf, size_t size)
    {
        return nullptr;
    }
    int rename(int &_errno_, const char *oldName, const char *newName)
    {
        return -1;
    }

    int mkdir(int &_errno_, const char *path, uint32_t mode)
    {
        return -1;
    }

    DIR *opendir(int &_errno_, const char *dirname)
    {
        return nullptr;
    }

    int closedir(int &_errno_, DIR *dirp)
    {
        return -1;
    }

    struct dirent *readdir(int &_errno_, DIR *dirp)
    {
        return nullptr;
    }

    int readdir_r(int &_errno_, DIR *dirp, struct dirent *entry, struct dirent **result)
    {
        return -1;
    }

    void rewinddir(int &_errno_, DIR *dirp)
    {
    }

    void seekdir(int &_errno_, DIR *dirp, long int loc)
    {
    }
    long int telldir(int &_errno_, DIR *dirp)
    {
        return -1;
    }

    int chmod(int &_errno_, const char *path, mode_t mode)
    {
        return -1;
    }
    int fchmod(int &_errno_, int fd, mode_t mode)
    {
        return -1;
    }
    int fsync(int &_errno_, int fd)
    {
        return -1;
    }
    int statvfs(const char *path, struct statvfs *buf)
    {
        return -1;
    }

} // namespace vfsn::internal::syscalls