xref: /kernel/uniproton/src/fs/vfs/vfs_partition.h (revision 54568cb3)
1/*
2 * Copyright (c) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved.
3 *
4 * UniProton is licensed under Mulan PSL v2.
5 * You can use this software according to the terms and conditions of the Mulan PSL v2.
6 * You may obtain a copy of Mulan PSL v2 at:
7 *          http://license.coscl.org.cn/MulanPSL2
8 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
9 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
10 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
11 * See the Mulan PSL v2 for more details.
12 * Create: 2022-09-21
13 * Description: 文件系统vfs层
14 */
15
16#ifndef VFS_PARTITION_H
17#define VFS_PARTITION_H
18
19#include "prt_typedef.h"
20
21#define MAX_PARTITION_NUM 4
22
23S32 OsGetPartIdByPartName(const char *partName);
24S32 OsGetDevIdByDevName(const char *dev);
25struct TagDeviceDesc *OsGetDeviceList(void);
26
27struct TagDeviceDesc {
28    struct TagFsMap      *dFs;             /* 文件系统信息 */
29    struct TagDeviceDesc *dNext;           /* 指向下一个挂载节点 */
30    const char           *dPath;           /* 挂载节点路径, /system, /usr, etc. */
31    const char           *dDev;            /* 设备名, "emmc0p0", "emmc0p1", etc. */
32    void                 *dData;           /* 挂载节点数据 */
33    const char           *dFsType;         /* 文件系统类型 */
34    S32                  *dLengthArray;    /* 设备分区长度记录数组 */
35    uintptr_t            *dAddrArray;      /* 设备分区地址记录数组 */
36    S32                  dPartNum;         /* 设备分区号 */
37};
38
39#endif /* VFS_PARTITION_H */
40