summaryrefslogtreecommitdiff
path: root/ecos/packages/fs/fat/current/include/fatfs.h
blob: a29c9a2d7def523192ed365583fba1895089cb8e (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef CYGONCE_CYG_FS_FAT_H
#define CYGONCE_CYG_FS_FAT_H
//=============================================================================
//
//      fatfs.h
//
//      FAT FS attributes and stat information
//
//=============================================================================
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
// -------------------------------------------                              
// This file is part of eCos, the Embedded Configurable Operating System.   
// Copyright (C) 2004 Free Software Foundation, Inc.                        
//
// eCos is free software; you can redistribute it and/or modify it under    
// the terms of the GNU General Public License as published by the Free     
// Software Foundation; either version 2 or (at your option) any later      
// version.                                                                 
//
// eCos is distributed in the hope that it will be useful, but WITHOUT      
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
// for more details.                                                        
//
// You should have received a copy of the GNU General Public License        
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
//
// As a special exception, if other files instantiate templates or use      
// macros or inline functions from this file, or you compile this file      
// and link it with other works to produce a work based on this file,       
// this file does not by itself cause the resulting work to be covered by   
// the GNU General Public License. However the source code for this file    
// must still be made available in accordance with section (3) of the GNU   
// General Public License v2.                                               
//
// This exception does not invalidate any other reasons why a work based    
// on this file might be covered by the GNU General Public License.         
// -------------------------------------------                              
// ####ECOSGPLCOPYRIGHTEND####                                              
//=============================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s):     David Brennam <eCos@brennanhome.com>
// Contributors:  
// Date:          2004-10-22
// Purpose:       
// Description:   This header contains attributes and stat like mode
//                information for FAT filesystems.
//              
// Usage:
//              #include <cyg/fs/fatfs.h>
//              
//
//####DESCRIPTIONEND####
//
//=============================================================================
// -------------------------------------------------------------------------
// FAT filesystem dir entry attributes

#define S_FATFS_RDONLY  (0x01) // Read only
#define S_FATFS_HIDDEN  (0x02) // Hidden
#define S_FATFS_SYSTEM  (0x04) // System
#define S_FATFS_VOLUME  (0x08) // Volume label
#define S_FATFS_DIR     (0x10) // Subdirectory
#define S_FATFS_ARCHIVE (0x20) // Needs archiving

// Mode bits which are allowed to be changed by attrib
#define S_FATFS_ATTRIB   (S_FATFS_RDONLY | S_FATFS_HIDDEN | S_FATFS_SYSTEM | \
                          S_FATFS_ARCHIVE)
// -------------------------------------------------------------------------
// mode FAT dir entry attributes macros

#define S_FATFS_ISRDONLY(__mode)  ((__mode) & S_FATFS_RDONLY)
#define S_FATFS_ISHIDDEN(__mode)  ((__mode) & S_FATFS_HIDDEN)
#define S_FATFS_ISSYSTEM(__mode)  ((__mode) & S_FATFS_SYSTEM)
#define S_FATFS_ISVOLUME(__mode)  ((__mode) & S_FATFS_VOLUME)
#define S_FATFS_ISDIR(__mode)     ((__mode) & S_FATFS_DIR)
#define S_FATFS_ISARCHIVE(__mode) ((__mode) & S_FATFS_ARCHIVE)

#endif // CYGONCE_CYG_FS_FAT_H
// End of fatfs.h