CD exfat support for Tomato. https://github.com/dorimanx/exfat-nofuse.
[tomato.git] / release / src-rt / linux / linux-2.6 / fs / exfat / exfat_part.h
blob94dd8862f5e12e6464418f7eab32e378b5dd959a
1 /*
2 * Copyright (C) 2012-2013 Samsung Electronics Co., Ltd.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 /************************************************************************/
20 /* */
21 /* PROJECT : exFAT & FAT12/16/32 File System */
22 /* FILE : exfat_part.h */
23 /* PURPOSE : Header File for exFAT Partition Manager */
24 /* */
25 /*----------------------------------------------------------------------*/
26 /* NOTES */
27 /* */
28 /*----------------------------------------------------------------------*/
29 /* REVISION HISTORY (Ver 0.9) */
30 /* */
31 /* - 2010.11.15 [Joosun Hahn] : first writing */
32 /* */
33 /************************************************************************/
35 #ifndef _EXFAT_PART_H
36 #define _EXFAT_PART_H
38 #include "exfat_config.h"
39 #include "exfat_global.h"
40 #include "exfat_api.h"
42 #ifdef __cplusplus
43 extern "C" {
44 #endif /* __cplusplus */
46 /*----------------------------------------------------------------------*/
47 /* Constant & Macro Definitions */
48 /*----------------------------------------------------------------------*/
50 #define MBR_SIGNATURE 0xAA55
52 /*----------------------------------------------------------------------*/
53 /* Type Definitions */
54 /*----------------------------------------------------------------------*/
56 /* MS-DOS FAT master boot record (512 bytes) */
57 typedef struct {
58 UINT8 boot_code[446];
59 UINT8 partition[64];
60 UINT8 signature[2];
61 } MBR_SECTOR_T;
63 /* MS-DOS FAT partition table (64 bytes) */
64 typedef struct {
65 UINT8 def_boot;
66 UINT8 bgn_chs[3];
67 UINT8 sys_type;
68 UINT8 end_chs[3];
69 UINT8 start_sector[4];
70 UINT8 num_sectors[4];
71 } PART_ENTRY_T;
73 /*----------------------------------------------------------------------*/
74 /* External Function Declarations */
75 /*----------------------------------------------------------------------*/
77 /* volume management functions */
78 INT32 ffsSetPartition(INT32 dev, INT32 num_vol, PART_INFO_T *vol_spec);
79 INT32 ffsGetPartition(INT32 dev, INT32 *num_vol, PART_INFO_T *vol_spec);
80 INT32 ffsGetDevInfo(INT32 dev, DEV_INFO_T *info);
82 /*----------------------------------------------------------------------*/
83 /* External Function Declarations (NOT TO UPPER LAYER) */
84 /*----------------------------------------------------------------------*/
86 #ifdef __cplusplus
88 #endif /* __cplusplus */
90 #endif /* _EXFAT_PART_H */
92 /* end of exfat_part.h */