Loading...
Searching...
No Matches
calc.h
Go to the documentation of this file.
/*
libparted
Copyright (C) 1998-2000, 2007, 2009-2014, 2019-2023, 2026 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PED_FAT_CALC_H
#define PED_FAT_CALC_H
extern PedSector fat_min_cluster_size (FatType fat_type);
extern PedSector fat_max_cluster_size (FatType fat_type);
extern FatCluster fat_min_cluster_count (FatType fat_type);
extern FatCluster fat_max_cluster_count (FatType fat_type);
extern PedSector fat_min_reserved_sector_count (FatType fat_type);
extern int fat_check_resize_geometry (const PedFileSystem* fs,
const PedGeometry* geom,
PedSector new_cluster_sectors,
FatCluster new_cluster_count);
extern 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);
extern 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);
extern PedSector
fat_calc_align_sectors (const PedFileSystem* new_fs,
const PedFileSystem* old_fs);
extern int
fat_is_sector_in_clusters (const PedFileSystem* fs, PedSector sector);
extern FatFragment
fat_cluster_to_frag (const PedFileSystem* fs, FatCluster cluster);
extern FatCluster
fat_frag_to_cluster (const PedFileSystem* fs, FatFragment frag);
extern PedSector
fat_frag_to_sector (const PedFileSystem* fs, FatFragment frag);
extern FatFragment
fat_sector_to_frag (const PedFileSystem* fs, PedSector sector);
extern PedSector
fat_cluster_to_sector (const PedFileSystem* fs, FatCluster cluster);
extern FatCluster
fat_sector_to_cluster (const PedFileSystem* fs, PedSector sector);
#endif /* PED_FAT_CALC_H */
fat_calc_align_sectors
PedSector fat_calc_align_sectors(const PedFileSystem *new_fs, const PedFileSystem *old_fs)
Definition calc.c:318
fat_min_cluster_count
FatCluster fat_min_cluster_count(FatType fat_type)
Definition calc.c:74
fat_cluster_to_sector
PedSector fat_cluster_to_sector(const PedFileSystem *fs, FatCluster cluster)
Definition calc.c:413
fat_max_cluster_count
FatCluster fat_max_cluster_count(FatType fat_type)
Definition calc.c:87
fat_calc_resize_sizes
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
fat_min_cluster_size
PedSector fat_min_cluster_size(FatType fat_type)
Definition calc.c:27
fat_max_cluster_size
PedSector fat_max_cluster_size(FatType fat_type)
Definition calc.c:63
fat_sector_to_frag
FatFragment fat_sector_to_frag(const PedFileSystem *fs, PedSector sector)
Definition calc.c:403
fat_cluster_to_frag
FatFragment fat_cluster_to_frag(const PedFileSystem *fs, FatCluster cluster)
Definition calc.c:373
fat_calc_sizes
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
fat_sector_to_cluster
FatCluster fat_sector_to_cluster(const PedFileSystem *fs, PedSector sector)
Definition calc.c:424
fat_is_sector_in_clusters
int fat_is_sector_in_clusters(const PedFileSystem *fs, PedSector sector)
Definition calc.c:363
fat_check_resize_geometry
int fat_check_resize_geometry(const PedFileSystem *fs, const PedGeometry *geom, PedSector new_cluster_sectors, FatCluster new_cluster_count)
Definition calc.c:104
fat_frag_to_cluster
FatCluster fat_frag_to_cluster(const PedFileSystem *fs, FatFragment frag)
Definition calc.c:383
fat_frag_to_sector
PedSector fat_frag_to_sector(const PedFileSystem *fs, FatFragment frag)
Definition calc.c:393
fat_min_reserved_sector_count
PedSector fat_min_reserved_sector_count(FatType fat_type)
Definition calc.c:98
FatType
enum _FatType FatType
Definition fat.h:49
FatFragment
int32_t FatFragment
Definition fat.h:42
FatCluster
uint32_t FatCluster
Definition fat.h:41
PedSector
long long PedSector
We can address 2^63 sectors.
Definition device.h:31
PedFileSystem
struct _PedFileSystem PedFileSystem
Definition filesys.h:30
PedGeometry
struct _PedGeometry PedGeometry
Definition geom.h:30
sector
uint8_t sector
Definition pc98.c:7