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_MAPS_H 17 #define VFS_MAPS_H 18 19 #include "prt_fs.h" 20 21 struct TagMountOps; 22 23 struct TagFsManagement { 24 S32 (*fdisk)(const char *dev, S32 *lengthArray, S32 partNum); 25 S32 (*format)(const char *partName, void *data); 26 }; 27 28 struct TagFsMap { 29 const char *fsType; 30 const struct TagMountOps *fsMops; 31 const struct TagFileOps *fsFops; 32 const struct TagFsManagement *fsMgt; 33 U32 fsRefs; 34 struct TagFsMap *next; 35 }; 36 37 S32 OsFsRegister(const char *fsType, struct TagMountOps *fsMops, 38 struct TagFileOps *fsFops, struct TagFsManagement *fsMgt); 39 struct TagFsMap *OsVfsGetFsMap(const char *fsType); 40 S32 OsVfsFsMgtDisk(const char *dev, const char *fsType, S32 *lengthArray, S32 partNum); 41 S32 OsVfsFsMgtFormat(const char *partName, char *fsType, void *data); 42 #endif /* VFS_MAPS_H */ 43