Loading...
Searching...
No Matches
table.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_TABLE_H_INCLUDED
#define PED_FAT_TABLE_H_INCLUDED
typedef struct _FatTable FatTable;
#include "fat.h"
struct _FatTable {
void* table;
FatCluster size;
int raw_size;
FatType fat_type;
FatCluster cluster_count;
FatCluster free_cluster_count;
FatCluster bad_cluster_count;
FatCluster last_alloc;
};
extern FatTable* fat_table_new (FatType fat_type, FatCluster size);
extern FatTable* fat_table_duplicate (const FatTable* ft);
extern void fat_table_destroy (FatTable* ft);
extern void fat_table_clear (FatTable* ft);
extern int fat_table_set_cluster_count (FatTable* ft,
FatCluster new_cluster_count);
extern int fat_table_read (FatTable* ft, const PedFileSystem* fs,
int table_num);
extern int fat_table_write (const FatTable* ft, PedFileSystem* fs,
int table_num);
extern int fat_table_write_all (const FatTable* ft, PedFileSystem* fs);
extern int fat_table_compare (const FatTable* a, const FatTable* b);
extern int fat_table_count_stats (FatTable* ft);
extern FatCluster fat_table_get (const FatTable* ft, FatCluster cluster);
extern int fat_table_set (FatTable* ft, FatCluster cluster, FatCluster value);
extern FatCluster fat_table_alloc_cluster (FatTable* ft);
extern FatCluster fat_table_alloc_check_cluster (FatTable* ft,
PedFileSystem* fs);
extern int fat_table_is_bad (const FatTable* ft, FatCluster cluster);
extern int fat_table_is_eof (const FatTable* ft, FatCluster cluster);
extern int fat_table_is_empty (const FatTable* ft, FatCluster cluster);
extern int fat_table_is_available (const FatTable* ft, FatCluster cluster);
extern int fat_table_is_active (const FatTable* ft, FatCluster cluster);
extern int fat_table_set_eof (FatTable* ft, FatCluster cluster);
extern int fat_table_set_avail (FatTable* ft, FatCluster cluster);
extern int fat_table_set_bad (FatTable* ft, FatCluster cluster);
extern int fat_table_entry_size (FatType fat_type);
#endif /* PED_FAT_TABLE_H_INCLUDED */
FatTable
struct _FatTable FatTable
Definition fat.h:69
FatType
enum _FatType FatType
Definition fat.h:49
FatCluster
uint32_t FatCluster
Definition fat.h:41
PedFileSystem
struct _PedFileSystem PedFileSystem
Definition filesys.h:30
fat.h
_FatTable
Definition fat.h:57
_FatTable::bad_cluster_count
FatCluster bad_cluster_count
Definition fat.h:65
_FatTable::cluster_count
FatCluster cluster_count
Definition fat.h:63
_FatTable::table
void * table
Definition fat.h:58
_FatTable::size
FatCluster size
Definition fat.h:59
_FatTable::raw_size
int raw_size
Definition fat.h:60
_FatTable::last_alloc
FatCluster last_alloc
Definition fat.h:67
_FatTable::free_cluster_count
FatCluster free_cluster_count
Definition fat.h:64
_FatTable::fat_type
FatType fat_type
Definition fat.h:62
fat_table_clear
void fat_table_clear(FatTable *ft)
Definition table.c:78
fat_table_set_eof
int fat_table_set_eof(FatTable *ft, FatCluster cluster)
Definition table.c:414
fat_table_destroy
void fat_table_destroy(FatTable *ft)
Definition table.c:53
fat_table_set_cluster_count
int fat_table_set_cluster_count(FatTable *ft, FatCluster new_cluster_count)
Definition table.c:91
fat_table_is_bad
int fat_table_is_bad(const FatTable *ft, FatCluster cluster)
Definition table.c:367
fat_table_is_eof
int fat_table_is_eof(const FatTable *ft, FatCluster cluster)
Definition table.c:376
fat_table_set_avail
int fat_table_set_avail(FatTable *ft, FatCluster cluster)
Definition table.c:459
fat_table_get
FatCluster fat_table_get(const FatTable *ft, FatCluster cluster)
Definition table.c:296
fat_table_is_available
int fat_table_is_available(const FatTable *ft, FatCluster cluster)
Definition table.c:385
fat_table_compare
int fat_table_compare(const FatTable *a, const FatTable *b)
Definition table.c:186
fat_table_entry_size
int fat_table_entry_size(FatType fat_type)
Definition table.c:467
fat_table_write_all
int fat_table_write_all(const FatTable *ft, PedFileSystem *fs)
Definition table.c:172
fat_table_alloc_cluster
FatCluster fat_table_alloc_cluster(FatTable *ft)
Definition table.c:325
fat_table_count_stats
int fat_table_count_stats(FatTable *ft)
Definition table.c:100
fat_table_write
int fat_table_write(const FatTable *ft, PedFileSystem *fs, int table_num)
Definition table.c:154
fat_table_set
int fat_table_set(FatTable *ft, FatCluster cluster, FatCluster value)
Definition table.c:264
fat_table_read
int fat_table_read(FatTable *ft, const PedFileSystem *fs, int table_num)
Definition table.c:119
fat_table_duplicate
FatTable * fat_table_duplicate(const FatTable *ft)
Definition table.c:60
fat_table_is_empty
int fat_table_is_empty(const FatTable *ft, FatCluster cluster)
Definition table.c:394
fat_table_alloc_check_cluster
FatCluster fat_table_alloc_check_cluster(FatTable *ft, PedFileSystem *fs)
Definition table.c:348
fat_table_is_active
int fat_table_is_active(const FatTable *ft, FatCluster cluster)
Definition table.c:404
fat_table_new
FatTable * fat_table_new(FatType fat_type, FatCluster size)
Definition table.c:27
fat_table_set_bad
int fat_table_set_bad(FatTable *ft, FatCluster cluster)
Definition table.c:436