bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 1 | /* |
| 2 | mkexfat.h (09.11.10) |
| 3 | FS creation engine. |
| 4 | |
bigbiff bigbiff | 61cdc02 | 2013-08-08 08:35:06 -0400 | [diff] [blame] | 5 | Free exFAT implementation. |
bigbiff bigbiff | 2e33c5e | 2014-09-04 20:58:41 -0400 | [diff] [blame] | 6 | Copyright (C) 2011-2014 Andrew Nayenko |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 7 | |
bigbiff bigbiff | 61cdc02 | 2013-08-08 08:35:06 -0400 | [diff] [blame] | 8 | This program is free software; you can redistribute it and/or modify |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 9 | it under the terms of the GNU General Public License as published by |
bigbiff bigbiff | 61cdc02 | 2013-08-08 08:35:06 -0400 | [diff] [blame] | 10 | the Free Software Foundation, either version 2 of the License, or |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 11 | (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 bigbiff | 61cdc02 | 2013-08-08 08:35:06 -0400 | [diff] [blame] | 18 | 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 bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 21 | */ |
| 22 | |
| 23 | #ifndef MKFS_MKEXFAT_H_INCLUDED |
| 24 | #define MKFS_MKEXFAT_H_INCLUDED |
| 25 | |
| 26 | #include <exfat.h> |
| 27 | |
| 28 | struct fs_object |
| 29 | { |
| 30 | off64_t (*get_alignment)(void); |
| 31 | off64_t (*get_size)(void); |
| 32 | int (*write)(struct exfat_dev* dev); |
| 33 | }; |
| 34 | |
| 35 | extern const struct fs_object* objects[]; |
| 36 | |
| 37 | int get_sector_bits(void); |
| 38 | int get_spc_bits(void); |
| 39 | off64_t get_volume_size(void); |
| 40 | const le16_t* get_volume_label(void); |
| 41 | uint32_t get_volume_serial(void); |
| 42 | uint64_t get_first_sector(void); |
| 43 | int get_sector_size(void); |
| 44 | int get_cluster_size(void); |
| 45 | |
| 46 | int mkfs(struct exfat_dev* dev, off64_t volume_size); |
| 47 | off64_t get_position(const struct fs_object* object); |
| 48 | |
| 49 | #endif /* ifndef MKFS_MKEXFAT_H_INCLUDED */ |