Loading...
Searching...
No Matches
filesys.h
Go to the documentation of this file.
/*
libparted - a library for manipulating disk partitions
Copyright (C) 1999-2001, 2006-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_FILESYS_H_INCLUDED
#define PED_FILESYS_H_INCLUDED
typedef struct _PedFileSystem PedFileSystem;
typedef struct _PedFileSystemType PedFileSystemType;
typedef struct _PedFileSystemAlias PedFileSystemAlias;
typedef const struct _PedFileSystemOps PedFileSystemOps;
#include <parted/geom.h>
#include <parted/constraint.h>
#include <parted/timer.h>
struct _PedFileSystemOps {
PedGeometry* (*probe) (PedGeometry* geom);
};
struct _PedFileSystemType {
PedFileSystemType* next;
const char* const name;
PedFileSystemOps* const ops;
};
struct _PedFileSystemAlias {
PedFileSystemAlias* next;
PedFileSystemType* fs_type;
const char* alias;
int deprecated;
};
struct _PedFileSystem {
PedFileSystemType* type;
PedGeometry* geom;
int checked;
void* type_specific;
};
extern void ped_file_system_type_register (PedFileSystemType* type);
extern void ped_file_system_type_unregister (PedFileSystemType* type);
extern void ped_file_system_alias_register (PedFileSystemType* type,
const char* alias, int deprecated);
extern void ped_file_system_alias_unregister (PedFileSystemType* type,
const char* alias);
extern PedFileSystemType* ped_file_system_type_get (const char* name);
extern PedFileSystemType*
ped_file_system_type_get_next (const PedFileSystemType* fs_type)
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
__attribute ((__pure__))
#endif
;
extern PedFileSystemAlias*
ped_file_system_alias_get_next (const PedFileSystemAlias* fs_alias)
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
__attribute ((__pure__))
#endif
;
extern PedFileSystemType* ped_file_system_probe (PedGeometry* geom);
extern PedGeometry* ped_file_system_probe_specific (
const PedFileSystemType* fs_type,
PedGeometry* geom);
PedFileSystem *ped_file_system_open (PedGeometry *geom);
int ped_file_system_close (PedFileSystem *fs);
int ped_file_system_resize (PedFileSystem *fs, PedGeometry *geom,
PedTimer *timer);
PedConstraint *ped_file_system_get_resize_constraint (const PedFileSystem *fs);
#endif /* PED_FILESYS_H_INCLUDED */
constraint.h
PedConstraint
struct _PedConstraint PedConstraint
Definition constraint.h:23
type
uint8_t type
Definition dos.c:2
geom.h
ped_file_system_alias_unregister
void ped_file_system_alias_unregister(PedFileSystemType *type, const char *alias)
Definition filesys.c:98
PedFileSystemAlias
struct _PedFileSystemAlias PedFileSystemAlias
Definition filesys.h:32
ped_file_system_type_get_next
PedFileSystemType * ped_file_system_type_get_next(const PedFileSystemType *fs_type)
Get the next PedFileSystemType after fs_type.
Definition filesys.c:162
ped_file_system_open
PedFileSystem * ped_file_system_open(PedGeometry *geom)
This function opens the file system stored on geom, if it can find one.
Definition filesys.c:142
PedFileSystemOps
const struct _PedFileSystemOps PedFileSystemOps
Definition filesys.h:33
PedFileSystemType
struct _PedFileSystemType PedFileSystemType
Definition filesys.h:31
ped_file_system_get_resize_constraint
PedConstraint * ped_file_system_get_resize_constraint(const PedFileSystem *fs)
Return a constraint that represents all of the possible ways the file system fs can be resized with p...
Definition filesys.c:310
ped_file_system_type_get
PedFileSystemType * ped_file_system_type_get(const char *name)
Get a PedFileSystemType by its name.
Definition filesys.c:127
ped_file_system_type_register
void ped_file_system_type_register(PedFileSystemType *type)
Definition filesys.c:48
ped_file_system_alias_register
void ped_file_system_alias_register(PedFileSystemType *type, const char *alias, int deprecated)
Definition filesys.c:78
PedFileSystem
struct _PedFileSystem PedFileSystem
Definition filesys.h:30
ped_file_system_close
int ped_file_system_close(PedFileSystem *fs)
Close file system fs.
Definition filesys.c:197
ped_file_system_probe_specific
PedGeometry * ped_file_system_probe_specific(const PedFileSystemType *fs_type, PedGeometry *geom)
Attempt to find a file system and return the region it occupies.
Definition filesys.c:193
ped_file_system_resize
int ped_file_system_resize(PedFileSystem *fs, PedGeometry *geom, PedTimer *timer)
Resize fs to new geometry geom.
Definition filesys.c:277
ped_file_system_alias_get_next
PedFileSystemAlias * ped_file_system_alias_get_next(const PedFileSystemAlias *fs_alias)
Get the next PedFileSystemAlias after fs_alias.
Definition filesys.c:176
ped_file_system_probe
PedFileSystemType * ped_file_system_probe(PedGeometry *geom)
Attempt to detect a file system in region geom.
Definition filesys.c:258
ped_file_system_type_unregister
void ped_file_system_type_unregister(PedFileSystemType *type)
Definition filesys.c:59
PedGeometry
struct _PedGeometry PedGeometry
Definition geom.h:30
PedTimer
struct _PedTimer PedTimer
Definition timer.h:32
__attribute
#define __attribute(arg)
Definition parted.h:32
name
char name[16]
Definition pc98.c:13
_PedFileSystemAlias
Structure describing a file system alias.
Definition filesys.h:57
_PedFileSystemAlias::fs_type
PedFileSystemType * fs_type
Definition filesys.h:59
_PedFileSystemAlias::deprecated
int deprecated
Definition filesys.h:61
_PedFileSystemAlias::next
PedFileSystemAlias * next
Definition filesys.h:58
_PedFileSystemAlias::alias
const char * alias
Definition filesys.h:60
_PedFileSystemOps
Definition filesys.h:39
_PedFileSystemType
Structure describing type of file system.
Definition filesys.h:46
_PedFileSystemType::ops
PedFileSystemOps *const ops
Definition filesys.h:49
_PedFileSystemType::next
PedFileSystemType * next
Definition filesys.h:47
_PedFileSystemType::name
const char *const name
name of the file system type
Definition filesys.h:48
_PedFileSystem
Structure describing file system.
Definition filesys.h:68
_PedFileSystem::type_specific
void * type_specific
Definition filesys.h:74
_PedFileSystem::checked
int checked
1 if the file system has been checked.
Definition filesys.h:71
_PedFileSystem::geom
PedGeometry * geom
where the file system actually is
Definition filesys.h:70
_PedFileSystem::type
PedFileSystemType * type
the file system type
Definition filesys.h:69
timer.h