Loading...
Searching...
No Matches
context.h
Go to the documentation of this file.
/*
libparted
Copyright (C) 1999-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_CONTEXT_H_INCLUDED
#define PED_FAT_CONTEXT_H_INCLUDED
#include "count.h"
enum _FatDirection {
FAT_DIR_FORWARD,
FAT_DIR_BACKWARD
};
typedef enum _FatDirection FatDirection;
struct _FatOpContext {
PedFileSystem* old_fs;
PedFileSystem* new_fs;
PedSector frag_sectors; /* should equal old_fs and
new_fs's frag_sectors */
FatDirection start_move_dir;
FatFragment start_move_delta;
FatFragment buffer_offset;
FatFragment buffer_frags;
FatFragment* buffer_map;
FatFragment frags_duped;
FatFragment* remap;
FatCluster new_root_dir [32];
};
typedef struct _FatOpContext FatOpContext;
extern FatOpContext* fat_op_context_new (PedFileSystem* new_fs,
PedFileSystem* old_fs);
extern void fat_op_context_destroy (FatOpContext* ctx);
extern FatFragment fat_op_context_map_static_fragment (const FatOpContext* ctx,
FatFragment frag);
extern FatCluster fat_op_context_map_static_cluster (const FatOpContext* ctx,
FatCluster clst);
extern FatFragment fat_op_context_map_fragment (const FatOpContext* ctx,
FatFragment frag);
extern FatCluster fat_op_context_map_cluster (const FatOpContext* ctx,
FatCluster clst);
extern int fat_op_context_create_initial_fat (FatOpContext* ctx);
#endif /* PED_FAT_CONTEXT_H_INCLUDED */
_FatDirection
_FatDirection
Definition context.h:25
FAT_DIR_FORWARD
@ FAT_DIR_FORWARD
Definition context.h:26
FAT_DIR_BACKWARD
@ FAT_DIR_BACKWARD
Definition context.h:27
fat_op_context_map_static_cluster
FatCluster fat_op_context_map_static_cluster(const FatOpContext *ctx, FatCluster clst)
Definition context.c:151
fat_op_context_map_fragment
FatFragment fat_op_context_map_fragment(const FatOpContext *ctx, FatFragment frag)
Definition context.c:164
fat_op_context_create_initial_fat
int fat_op_context_create_initial_fat(FatOpContext *ctx)
Definition context.c:198
FatDirection
enum _FatDirection FatDirection
Definition context.h:29
FatOpContext
struct _FatOpContext FatOpContext
Definition context.h:51
fat_op_context_new
FatOpContext * fat_op_context_new(PedFileSystem *new_fs, PedFileSystem *old_fs)
Definition context.c:76
fat_op_context_map_cluster
FatCluster fat_op_context_map_cluster(const FatOpContext *ctx, FatCluster clst)
Definition context.c:170
fat_op_context_destroy
void fat_op_context_destroy(FatOpContext *ctx)
Definition context.c:120
fat_op_context_map_static_fragment
FatFragment fat_op_context_map_static_fragment(const FatOpContext *ctx, FatFragment frag)
Definition context.c:128
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
count.h
_FatOpContext
Definition context.h:31
_FatOpContext::old_fs
PedFileSystem * old_fs
Definition context.h:32
_FatOpContext::buffer_offset
FatFragment buffer_offset
Definition context.h:41
_FatOpContext::new_root_dir
FatCluster new_root_dir[32]
Definition context.h:49
_FatOpContext::start_move_delta
FatFragment start_move_delta
Definition context.h:39
_FatOpContext::start_move_dir
FatDirection start_move_dir
Definition context.h:38
_FatOpContext::buffer_frags
FatFragment buffer_frags
Definition context.h:42
_FatOpContext::new_fs
PedFileSystem * new_fs
Definition context.h:33
_FatOpContext::frags_duped
FatFragment frags_duped
Definition context.h:45
_FatOpContext::remap
FatFragment * remap
Definition context.h:47
_FatOpContext::frag_sectors
PedSector frag_sectors
Definition context.h:35
_FatOpContext::buffer_map
FatFragment * buffer_map
Definition context.h:43