libparted 3.6
Loading...
Searching...
No Matches
calc.h
Go to the documentation of this file.
1/*
2 libparted
3 Copyright (C) 1998-2000, 2007, 2009-2014, 2019-2023 Free Software
4 Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef PED_FAT_CALC_H
21#define PED_FAT_CALC_H
22
23extern PedSector fat_min_cluster_size (FatType fat_type);
24extern PedSector fat_max_cluster_size (FatType fat_type);
27
29
30extern int fat_check_resize_geometry (const PedFileSystem* fs,
31 const PedGeometry* geom,
32 PedSector new_cluster_sectors,
33 FatCluster new_cluster_count);
34
35extern int fat_calc_sizes (PedSector size,
36 PedSector align,
37 FatType fat_type,
38 PedSector root_dir_sectors,
39 PedSector* out_cluster_sectors,
40 FatCluster* out_cluster_count,
41 PedSector* out_fat_size);
42
43extern int fat_calc_resize_sizes (const PedGeometry* geom,
44 PedSector align,
45 FatType fat_type,
46 PedSector root_dir_sectors,
47 PedSector cluster_sectors,
48 PedSector* out_cluster_sectors,
49 FatCluster* out_cluster_count,
50 PedSector* out_fat_size);
51
52extern PedSector
54 const PedFileSystem* old_fs);
55
56extern int
58
59extern FatFragment
61
62extern FatCluster
64
65extern PedSector
67
68extern FatFragment
70
71extern PedSector
73
74extern FatCluster
76
77#endif /* PED_FAT_CALC_H */
PedSector fat_calc_align_sectors(const PedFileSystem *new_fs, const PedFileSystem *old_fs)
Definition: calc.c:318
FatCluster fat_min_cluster_count(FatType fat_type)
Definition: calc.c:74
PedSector fat_cluster_to_sector(const PedFileSystem *fs, FatCluster cluster)
Definition: calc.c:413
FatCluster fat_max_cluster_count(FatType fat_type)
Definition: calc.c:87
int fat_calc_resize_sizes(const PedGeometry *geom, PedSector align, FatType fat_type, PedSector root_dir_sectors, PedSector cluster_sectors, PedSector *out_cluster_sectors, FatCluster *out_cluster_count, PedSector *out_fat_size)
Definition: calc.c:283
PedSector fat_min_cluster_size(FatType fat_type)
Definition: calc.c:27
PedSector fat_max_cluster_size(FatType fat_type)
Definition: calc.c:63
FatFragment fat_sector_to_frag(const PedFileSystem *fs, PedSector sector)
Definition: calc.c:403
FatFragment fat_cluster_to_frag(const PedFileSystem *fs, FatCluster cluster)
Definition: calc.c:373
int fat_calc_sizes(PedSector size, PedSector align, FatType fat_type, PedSector root_dir_sectors, PedSector *out_cluster_sectors, FatCluster *out_cluster_count, PedSector *out_fat_size)
Definition: calc.c:229
FatCluster fat_sector_to_cluster(const PedFileSystem *fs, PedSector sector)
Definition: calc.c:424
int fat_is_sector_in_clusters(const PedFileSystem *fs, PedSector sector)
Definition: calc.c:363
int fat_check_resize_geometry(const PedFileSystem *fs, const PedGeometry *geom, PedSector new_cluster_sectors, FatCluster new_cluster_count)
Definition: calc.c:104
FatCluster fat_frag_to_cluster(const PedFileSystem *fs, FatFragment frag)
Definition: calc.c:383
PedSector fat_frag_to_sector(const PedFileSystem *fs, FatFragment frag)
Definition: calc.c:393
PedSector fat_min_reserved_sector_count(FatType fat_type)
Definition: calc.c:98
enum _FatType FatType
Definition: fat.h:49
int32_t FatFragment
Definition: fat.h:42
uint32_t FatCluster
Definition: fat.h:41
long long PedSector
We can address 2^63 sectors.
Definition: device.h:31
uint8_t sector
Definition: pc98.c:7
Structure describing file system.
Definition: filesys.h:68
Geometry of the partition.
Definition: geom.h:35