5 Copyright (C) 2009, 2010 Andrew Nayenko
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.
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.
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/>.
21 #ifndef MKFS_MKEXFAT_H_INCLUDED
22 #define MKFS_MKEXFAT_H_INCLUDED
26 extern struct exfat_super_block sb;
27 extern struct exfat_entry_label label_entry;
28 extern struct exfat_entry_bitmap bitmap_entry;
29 extern struct exfat_entry_upcase upcase_entry;
31 #define OFFSET_TO_SECTOR(off) ((off) >> (sb).sector_bits)
32 #define SECTOR_TO_CLUSTER(sector) \
33 ((((sector) - le32_to_cpu((sb).cluster_sector_start)) >> (sb).spc_bits) + \
34 EXFAT_FIRST_DATA_CLUSTER)
35 #define OFFSET_TO_CLUSTER(off) SECTOR_TO_CLUSTER(OFFSET_TO_SECTOR(off))
37 #endif /* ifndef MKFS_MKEXFAT_H_INCLUDED */