~aleteoryx/muditaos

ref: 9cbebacd78cb0cf5674e5b5ff4969e81e45ef6b8 muditaos/module-vfs/include/user/purefs/blkdev/defs.hpp -rw-r--r-- 1.1 KiB
9cbebacd — Lucjan Bryndza [EGD-4262] Disk manager (#1025) 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
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once
#include <cstdint>
#include <memory>

namespace purefs::blkdev
{
    using sector_t = uint64_t;
    using scount_t = int64_t;
    namespace internal
    {
        class disk_handle;
    }
    using disk_fd_t = std::shared_ptr<internal::disk_handle>;
    //! Disk status result
    enum class media_status
    {
        healthly, //! Disk OK
        uninit,   //! Disk unintialized
        nomedia,  //! No media
        wprotect, //! Write protected
        error,    //! Internal error
    };
    // Information parameter
    enum class info_type
    {
        sector_count,
        sector_size,
        erase_block
    };

    //! Power control states
    enum class pm_state
    {
        active,        //! Device is in active state
        low_power,     //! Device is in low power state
        suspend,       //! Device is in suspend state
        force_suspend, //! Device is in force suspend state
        power_off      //! Device is in poweroff state
    };
} // namespace purefs::blkdev