summaryrefstree
path: root/kernel/fs/exfat/exfat_part.h
blob: cc6db65cbe7b4927f15c1225d05453f590915efd (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
/*
 *  Copyright (C) 2012-2013 Samsung Electronics Co., Ltd.
 *
 *  This program 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
 *  of the License, or (at your option) any later version.
 *
 *  This program 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 this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef _EXFAT_PART_H
#define _EXFAT_PART_H

#include "exfat_config.h"
#include "exfat_global.h"
#include "exfat_api.h"

#ifdef __cplusplus
extern "C" {
#endif

#define MBR_SIGNATURE           0xAA55
	typedef struct {
		UINT8       boot_code[446];
		UINT8       partition[64];
		UINT8       signature[2];
	} MBR_SECTOR_T;

	typedef struct {
		UINT8       def_boot;
		UINT8       bgn_chs[3];
		UINT8       sys_type;
		UINT8       end_chs[3];
		UINT8       start_sector[4];
		UINT8       num_sectors[4];
	} PART_ENTRY_T;

	INT32 ffsSetPartition(INT32 dev, INT32 num_vol, PART_INFO_T *vol_spec);
	INT32 ffsGetPartition(INT32 dev, INT32 *num_vol, PART_INFO_T *vol_spec);
	INT32 ffsGetDevInfo(INT32 dev, DEV_INFO_T *info);

#ifdef __cplusplus
}
#endif

#endif