blob: 4634d0d954270b63dd669838774438575f0c9682 [file] [log] [blame]
bigbiff bigbiff9c754052013-01-09 09:09:08 -05001/*
2 mkexfat.h (09.11.10)
3 FS creation engine.
4
5 Copyright (C) 2011, 2012 Andrew Nayenko
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef MKFS_MKEXFAT_H_INCLUDED
22#define MKFS_MKEXFAT_H_INCLUDED
23
24#include <exfat.h>
25
26struct fs_object
27{
28 off64_t (*get_alignment)(void);
29 off64_t (*get_size)(void);
30 int (*write)(struct exfat_dev* dev);
31};
32
33extern const struct fs_object* objects[];
34
35int get_sector_bits(void);
36int get_spc_bits(void);
37off64_t get_volume_size(void);
38const le16_t* get_volume_label(void);
39uint32_t get_volume_serial(void);
40uint64_t get_first_sector(void);
41int get_sector_size(void);
42int get_cluster_size(void);
43
44int mkfs(struct exfat_dev* dev, off64_t volume_size);
45off64_t get_position(const struct fs_object* object);
46
47#endif /* ifndef MKFS_MKEXFAT_H_INCLUDED */