| 1 |
#include <glib.h> |
| 2 |
|
| 3 |
#ifndef BD_FS |
| 4 |
#define BD_FS |
| 5 |
|
| 6 |
GQuark bd_fs_error_quark (void); |
| 7 |
#define BD_FS_ERROR bd_fs_error_quark () |
| 8 |
typedef enum { |
| 9 |
BD_FS_ERROR_TECH_UNAVAIL, |
| 10 |
BD_FS_ERROR_INVAL, |
| 11 |
BD_FS_ERROR_PARSE, |
| 12 |
BD_FS_ERROR_FAIL, |
| 13 |
BD_FS_ERROR_NOFS, |
| 14 |
BD_FS_ERROR_PIPE, |
| 15 |
BD_FS_ERROR_UNMOUNT_FAIL, |
| 16 |
BD_FS_ERROR_NOT_SUPPORTED, |
| 17 |
BD_FS_ERROR_NOT_MOUNTED, |
| 18 |
BD_FS_ERROR_AUTH, |
| 19 |
BD_FS_ERROR_LABEL_INVALID, |
| 20 |
BD_FS_ERROR_UUID_INVALID, |
| 21 |
BD_FS_ERROR_UNKNOWN_FS, |
| 22 |
} BDFSError; |
| 23 |
|
| 24 |
/* XXX: where the file systems start at the enum of technologies */ |
| 25 |
#define BD_FS_OFFSET 2 |
| 26 |
#define BD_FS_LAST_FS 13 |
| 27 |
typedef enum { |
| 28 |
BD_FS_TECH_GENERIC = 0, |
| 29 |
BD_FS_TECH_MOUNT = 1, |
| 30 |
BD_FS_TECH_EXT2 = 2, |
| 31 |
BD_FS_TECH_EXT3 = 3, |
| 32 |
BD_FS_TECH_EXT4 = 4, |
| 33 |
BD_FS_TECH_XFS = 5, |
| 34 |
BD_FS_TECH_VFAT = 6, |
| 35 |
BD_FS_TECH_NTFS = 7, |
| 36 |
BD_FS_TECH_F2FS = 8, |
| 37 |
BD_FS_TECH_NILFS2 = 9, |
| 38 |
BD_FS_TECH_EXFAT = 10, |
| 39 |
BD_FS_TECH_BTRFS = 11, |
| 40 |
BD_FS_TECH_UDF = 12, |
| 41 |
} BDFSTech; |
| 42 |
|
| 43 |
/* XXX: number of the highest bit of all modes */ |
| 44 |
#define BD_FS_MODE_LAST 7 |
| 45 |
typedef enum { |
| 46 |
BD_FS_TECH_MODE_MKFS = 1 << 0, |
| 47 |
BD_FS_TECH_MODE_WIPE = 1 << 1, |
| 48 |
BD_FS_TECH_MODE_CHECK = 1 << 2, |
| 49 |
BD_FS_TECH_MODE_REPAIR = 1 << 3, |
| 50 |
BD_FS_TECH_MODE_SET_LABEL = 1 << 4, |
| 51 |
BD_FS_TECH_MODE_QUERY = 1 << 5, |
| 52 |
BD_FS_TECH_MODE_RESIZE = 1 << 6, |
| 53 |
BD_FS_TECH_MODE_SET_UUID = 1 << 7, |
| 54 |
} BDFSTechMode; |
| 55 |
|
| 56 |
|
| 57 |
/* |
| 58 |
* If using the plugin as a standalone library, the following functions should |
| 59 |
* be called to: |
| 60 |
* |
| 61 |
* init() - initialize the plugin, returning TRUE on success |
| 62 |
* close() - clean after the plugin at the end or if no longer used |
| 63 |
* |
| 64 |
*/ |
| 65 |
gboolean bd_fs_init (void); |
| 66 |
void bd_fs_close (void); |
| 67 |
|
| 68 |
gboolean bd_fs_is_tech_avail (BDFSTech tech, guint64 mode, GError **error); |
| 69 |
|
| 70 |
#endif /* BD_FS */ |
| 71 |
|
| 72 |
#include "fs/ext.h" |
| 73 |
#include "fs/f2fs.h" |
| 74 |
#include "fs/generic.h" |
| 75 |
#include "fs/mount.h" |
| 76 |
#include "fs/ntfs.h" |
| 77 |
#include "fs/vfat.h" |
| 78 |
#include "fs/xfs.h" |
| 79 |
#include "fs/nilfs.h" |
| 80 |
#include "fs/exfat.h" |
| 81 |
#include "fs/btrfs.h" |
| 82 |
#include "fs/udf.h" |