1 /**************************************************************************** 2 * include/fs/fs.h 3 * 4 * Copyright (C) 2007-2009, 2011-2013, 2015-2018 Gregory Nutt. All rights 5 * reserved. 6 * Author: Gregory Nutt <gnutt@nuttx.org> 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 12 * 1. Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 2. Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in 16 * the documentation and/or other materials provided with the 17 * distribution. 18 * 3. Neither the name NuttX nor the names of its contributors may be 19 * used to endorse or promote products derived from this software 20 * without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 29 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 30 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 32 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * POSSIBILITY OF SUCH DAMAGE. 34 * 35 ****************************************************************************/ 36 37 #ifndef __INCLUDE_FS_FS_H 38 #define __INCLUDE_FS_FS_H 39 40 /**************************************************************************** 41 * Included Files 42 ****************************************************************************/ 43 #include "mount.h" 44 #include "fs/driver.h" 45 46 #ifdef __cplusplus 47 #if __cplusplus 48 extern "C" { 49 #endif /* __cplusplus */ 50 #endif /* __cplusplus */ 51 52 /**************************************************************************** 53 * Public Type Definitions 54 ****************************************************************************/ 55 struct fsmap_t 56 { 57 const char *fs_filesystemtype; 58 const struct MountOps *fs_mops; 59 const BOOL is_mtd_support; 60 const BOOL is_bdfs; 61 }; 62 63 #define FSMAP_ENTRY(_l, _name, _mop, _is_mtd_support, _is_bdfs) \ 64 struct fsmap_t _l LOS_HAL_TABLE_ENTRY(fsmap) = \ 65 { \ 66 _name, \ 67 &_mop, \ 68 _is_mtd_support, \ 69 _is_bdfs \ 70 } 71 72 #define FAR /* for hdf compatibility, should remove later */ 73 74 /**************************************************************************** 75 * Name: fs_initialize 76 * 77 * Description: 78 * This is called from the OS initialization logic to configure the file 79 * system. 80 * 81 ****************************************************************************/ 82 83 void fs_initialize(void); 84 85 #ifdef __cplusplus 86 #if __cplusplus 87 } 88 #endif /* __cplusplus */ 89 #endif /* __cplusplus */ 90 #endif /* __INCLUDE_FS_FS_H */ 91