~aleteoryx/muditaos

ref: 03de91c8d2c4dace3e031e323f3424c6dfb0ce16 muditaos/module-vfs/src/purefs/fs/filesystem_operations.cpp -rw-r--r-- 3.4 KiB
03de91c8 — Kuba Kleczkowski [MOS-975] Fixed missing new message notification 2 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
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <purefs/fs/filesystem_operations.hpp>
#include <purefs/fs/directory_handle.hpp>

#include <errno.h>

namespace purefs::fs
{

    auto filesystem_operations::mount(fsmount mnt, const void *data) noexcept -> int
    {
        ++m_mount_count;
        return -ENOTSUP;
    }
    auto filesystem_operations::umount(fsmount mnt) noexcept -> int
    {
        if (m_mount_count > 0) {
            --m_mount_count;
        }
        return -ENOTSUP;
    }
    auto filesystem_operations::stat_vfs(fsmount mntp, std::string_view path, statvfs &stat) const noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::seek(fsfile zfile, off_t pos, int dir) noexcept -> off_t
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::fstat(fsfile zfile, struct stat &st) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::stat(fsmount mnt, std::string_view file, struct stat &st) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::link(fsmount mnt, std::string_view existing, std::string_view newlink) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::symlink(fsmount mnt, std::string_view existing, std::string_view newlink) noexcept
        -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::unlink(fsmount mnt, std::string_view name) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::rmdir(fsmount mnt, std::string_view name) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::rename(fsmount mnt, std::string_view oldname, std::string_view newname) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::mkdir(fsmount mnt, std::string_view path, int mode) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::diropen(fsmount mnt, std::string_view path) noexcept -> fsdir
    {
        return std::make_shared<internal::directory_handle>(nullptr, -ENOTSUP);
    }
    auto filesystem_operations::dirreset(fsdir dirstate) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::dirnext(fsdir dirstate, std::string &filename, struct stat &filestat) -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::dirclose(fsdir dirstate) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::ftruncate(fsfile zfile, off_t len) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::fsync(fsfile zfile) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::ioctl(fsmount mnt, std::string_view path, int cmd, void *arg) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::utimens(fsmount mnt, std::string_view path, std::array<timespec, 2> &tv) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::flock(fsfile zfile, int cmd) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::chmod(fsmount mnt, std::string_view path, mode_t mode) noexcept -> int
    {
        return -ENOTSUP;
    }
    auto filesystem_operations::fchmod(fsfile zfile, mode_t mode) noexcept -> int
    {
        return -ENOTSUP;
    }
} // namespace purefs::fs