2
libparted - a library for manipulating disk partitions
3
Copyright (C) 1999-2001, 2006-2007, 2009-2012 Free Software Foundation,
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.
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.
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/>.
21
* \addtogroup PedFileSystem
25
/** \file filesys.h */
27
#ifndef PED_FILESYS_H_INCLUDED
28
#define PED_FILESYS_H_INCLUDED
30
typedef struct _PedFileSystem PedFileSystem;
31
typedef struct _PedFileSystemType PedFileSystemType;
32
typedef struct _PedFileSystemAlias PedFileSystemAlias;
33
typedef const struct _PedFileSystemOps PedFileSystemOps;
35
#include <parted/geom.h>
36
#include <parted/constraint.h>
37
#include <parted/timer.h>
39
struct _PedFileSystemOps {
40
PedGeometry* (*probe) (PedGeometry* geom);
44
* Structure describing type of file system
46
struct _PedFileSystemType {
47
PedFileSystemType* next;
48
const char* const name; /**< name of the file system type */
49
const int* block_sizes;
50
PedFileSystemOps* const ops;
54
* Structure describing a file system alias. This is separate from
55
* PedFileSystemType because probing only looks through the list of types,
56
* and does not probe aliases separately.
58
struct _PedFileSystemAlias {
59
PedFileSystemAlias* next;
60
PedFileSystemType* fs_type;
67
* Structure describing file system
69
struct _PedFileSystem {
70
PedFileSystemType* type; /**< the file system type */
71
PedGeometry* geom; /**< where the file system actually is */
72
int checked; /**< 1 if the file system has been checked.
79
extern void ped_file_system_type_register (PedFileSystemType* type);
80
extern void ped_file_system_type_unregister (PedFileSystemType* type);
82
extern void ped_file_system_alias_register (PedFileSystemType* type,
83
const char* alias, int deprecated);
84
extern void ped_file_system_alias_unregister (PedFileSystemType* type,
87
extern PedFileSystemType* ped_file_system_type_get (const char* name);
88
extern PedFileSystemType*
89
ped_file_system_type_get_next (const PedFileSystemType* fs_type)
91
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
92
__attribute ((__pure__))
96
extern PedFileSystemAlias*
97
ped_file_system_alias_get_next (const PedFileSystemAlias* fs_alias)
99
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
100
__attribute ((__pure__))
104
extern PedFileSystemType* ped_file_system_probe (PedGeometry* geom);
105
extern PedGeometry* ped_file_system_probe_specific (
106
const PedFileSystemType* fs_type,
109
PedFileSystem *ped_file_system_open (PedGeometry *geom);
110
int ped_file_system_close (PedFileSystem *fs);
111
int ped_file_system_resize (PedFileSystem *fs, PedGeometry *geom,
113
PedConstraint *ped_file_system_get_resize_constraint (const PedFileSystem *fs);
115
#endif /* PED_FILESYS_H_INCLUDED */