bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 1 | /* |
| 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 | |
| 26 | struct fs_object |
| 27 | { |
| 28 | off64_t (*get_alignment)(void); |
| 29 | off64_t (*get_size)(void); |
| 30 | int (*write)(struct exfat_dev* dev); |
| 31 | }; |
| 32 | |
| 33 | extern const struct fs_object* objects[]; |
| 34 | |
| 35 | int get_sector_bits(void); |
| 36 | int get_spc_bits(void); |
| 37 | off64_t get_volume_size(void); |
| 38 | const le16_t* get_volume_label(void); |
| 39 | uint32_t get_volume_serial(void); |
| 40 | uint64_t get_first_sector(void); |
| 41 | int get_sector_size(void); |
| 42 | int get_cluster_size(void); |
| 43 | |
| 44 | int mkfs(struct exfat_dev* dev, off64_t volume_size); |
| 45 | off64_t get_position(const struct fs_object* object); |
| 46 | |
| 47 | #endif /* ifndef MKFS_MKEXFAT_H_INCLUDED */ |