• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  * include/nuttx/fs/fs.h
3  *
4  * Licensed to the Apache Software Foundation (ASF) under one or more
5  * contributor license agreements.  See the NOTICE file distributed with
6  * this work for additional information regarding copyright ownership.  The
7  * ASF licenses this file to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance with the
9  * License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
16  * License for the specific language governing permissions and limitations
17  * under the License.
18  *
19  ****************************************************************************/
20 
21 #ifndef __INCLUDE_FS_FS_H
22 #define __INCLUDE_FS_FS_H
23 
24 /****************************************************************************
25  * Included Files
26  ****************************************************************************/
27 #include "mount.h"
28 #include "fs/driver.h"
29 
30 #ifdef __cplusplus
31 #if __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
34 #endif /* __cplusplus */
35 
36 /****************************************************************************
37  * Public Type Definitions
38  ****************************************************************************/
39 struct fsmap_t
40 {
41   const char                      *fs_filesystemtype;
42   const struct                    MountOps *fs_mops;
43   const BOOL                      is_mtd_support;
44   const BOOL                      is_bdfs;
45 };
46 
47 #define FSMAP_ENTRY(_l, _name, _mop, _is_mtd_support, _is_bdfs)                      \
48 struct fsmap_t _l LOS_HAL_TABLE_ENTRY(fsmap) =  \
49 {                                                       \
50   _name,                                              \
51   &_mop,                                               \
52   _is_mtd_support,                                    \
53   _is_bdfs                                                \
54 }
55 
56 #define FAR     /* for hdf compatibility, should remove later */
57 
58 /****************************************************************************
59  * Name: fs_initialize
60  *
61  * Description:
62  *   This is called from the OS initialization logic to configure the file
63  *   system.
64  *
65  ****************************************************************************/
66 
67 void fs_initialize(void);
68 
69 #ifdef __cplusplus
70 #if __cplusplus
71 }
72 #endif /* __cplusplus */
73 #endif /* __cplusplus */
74 #endif /* __INCLUDE_FS_FS_H */
75