blob: 6e15c59e4141b37670408a0ba145f2ccc641b2fc [file] [log] [blame]
bigbiff bigbiff9c754052013-01-09 09:09:08 -05001/*
2 mkexfat.h (09.11.10)
3 FS creation engine.
4
bigbiff bigbiff61cdc022013-08-08 08:35:06 -04005 Free exFAT implementation.
Matt Mower09ef1e42015-12-13 11:29:45 -06006 Copyright (C) 2011-2015 Andrew Nayenko
bigbiff bigbiff9c754052013-01-09 09:09:08 -05007
bigbiff bigbiff61cdc022013-08-08 08:35:06 -04008 This program is free software; you can redistribute it and/or modify
bigbiff bigbiff9c754052013-01-09 09:09:08 -05009 it under the terms of the GNU General Public License as published by
bigbiff bigbiff61cdc022013-08-08 08:35:06 -040010 the Free Software Foundation, either version 2 of the License, or
bigbiff bigbiff9c754052013-01-09 09:09:08 -050011 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
bigbiff bigbiff61cdc022013-08-08 08:35:06 -040018 You should have received a copy of the GNU General Public License along
19 with this program; if not, write to the Free Software Foundation, Inc.,
20 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
bigbiff bigbiff9c754052013-01-09 09:09:08 -050021*/
22
23#ifndef MKFS_MKEXFAT_H_INCLUDED
24#define MKFS_MKEXFAT_H_INCLUDED
25
26#include <exfat.h>
27
28struct fs_object
29{
Spegeliusd69ac2b2014-11-23 15:15:06 +020030 loff_t (*get_alignment)(void);
31 loff_t (*get_size)(void);
bigbiff bigbiff9c754052013-01-09 09:09:08 -050032 int (*write)(struct exfat_dev* dev);
33};
34
35extern const struct fs_object* objects[];
36
37int get_sector_bits(void);
38int get_spc_bits(void);
Spegeliusd69ac2b2014-11-23 15:15:06 +020039loff_t get_volume_size(void);
bigbiff bigbiff9c754052013-01-09 09:09:08 -050040const le16_t* get_volume_label(void);
41uint32_t get_volume_serial(void);
42uint64_t get_first_sector(void);
43int get_sector_size(void);
44int get_cluster_size(void);
45
Spegeliusd69ac2b2014-11-23 15:15:06 +020046int mkfs(struct exfat_dev* dev, loff_t volume_size);
47loff_t get_position(const struct fs_object* object);
bigbiff bigbiff9c754052013-01-09 09:09:08 -050048
49#endif /* ifndef MKFS_MKEXFAT_H_INCLUDED */