| 1 |
#include <glib.h> |
| 2 |
#include <blockdev/utils.h> |
| 3 |
|
| 4 |
#ifndef BD_FS_F2FS |
| 5 |
#define BD_FS_F2FS |
| 6 |
|
| 7 |
/* this is taken from f2fs_fs.h */ |
| 8 |
typedef enum { |
| 9 |
BD_FS_F2FS_FEATURE_ENCRYPT = 1 << 0, |
| 10 |
BD_FS_F2FS_FEATURE_BLKZONED = 1 << 1, |
| 11 |
BD_FS_F2FS_FEATURE_ATOMIC_WRITE = 1 << 2, |
| 12 |
BD_FS_F2FS_FEATURE_EXTRA_ATTR = 1 << 3, |
| 13 |
BD_FS_F2FS_FEATURE_PRJQUOTA = 1 << 4, |
| 14 |
BD_FS_F2FS_FEATURE_INODE_CHKSUM = 1 << 5, |
| 15 |
BD_FS_F2FS_FEATURE_FLEXIBLE_INLINE_XATTR = 1 << 6, |
| 16 |
BD_FS_F2FS_FEATURE_QUOTA_INO = 1 << 7, |
| 17 |
BD_FS_F2FS_FEATURE_INODE_CRTIME = 1 << 8, |
| 18 |
BD_FS_F2FS_FEATURE_LOST_FOUND = 1 << 9, |
| 19 |
BD_FS_F2FS_FEATURE_VERITY = 1 << 10, |
| 20 |
BD_FS_F2FS_FEATURE_SB_CHKSUM = 1 << 11, |
| 21 |
} BDFSF2FSFeature; |
| 22 |
|
| 23 |
typedef struct BDFSF2FSInfo { |
| 24 |
gchar *label; |
| 25 |
gchar *uuid; |
| 26 |
guint64 sector_size; |
| 27 |
guint64 sector_count; |
| 28 |
guint64 features; |
| 29 |
} BDFSF2FSInfo; |
| 30 |
|
| 31 |
BDFSF2FSInfo* bd_fs_f2fs_info_copy (BDFSF2FSInfo *data); |
| 32 |
void bd_fs_f2fs_info_free (BDFSF2FSInfo *data); |
| 33 |
|
| 34 |
gboolean bd_fs_f2fs_mkfs (const gchar *device, const BDExtraArg **extra, GError **error); |
| 35 |
gboolean bd_fs_f2fs_check (const gchar *device, const BDExtraArg **extra, GError **error); |
| 36 |
gboolean bd_fs_f2fs_repair (const gchar *device, const BDExtraArg **extra, GError **error); |
| 37 |
BDFSF2FSInfo* bd_fs_f2fs_get_info (const gchar *device, GError **error); |
| 38 |
gboolean bd_fs_f2fs_resize (const gchar *device, guint64 new_size, gboolean safe, const BDExtraArg **extra, GError **error); |
| 39 |
gboolean bd_fs_f2fs_check_label (const gchar *label, GError **error); |
| 40 |
|
| 41 |
#endif /* BD_FS_F2FS */ |