/usr/include/blockdev/fs.h is in libblockdev-fs-dev 2.16-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | #include <glib.h>
#ifndef BD_FS
#define BD_FS
GQuark bd_fs_error_quark (void);
#define BD_FS_ERROR bd_fs_error_quark ()
typedef enum {
BD_FS_ERROR_INVAL,
BD_FS_ERROR_PARSE,
BD_FS_ERROR_FAIL,
BD_FS_ERROR_NOFS,
BD_FS_ERROR_PIPE,
BD_FS_ERROR_UNMOUNT_FAIL,
BD_FS_ERROR_NOT_SUPPORTED,
BD_FS_ERROR_NOT_MOUNTED,
BD_FS_ERROR_AUTH, // keep this entry last (XXX?)
BD_FS_ERROR_TECH_UNAVAIL,
} BDFsError;
/* XXX: where the file systems start at the enum of technologies */
#define BD_FS_OFFSET 2
#define BD_FS_LAST_FS 7
typedef enum {
BD_FS_TECH_GENERIC = 0,
BD_FS_TECH_MOUNT = 1,
BD_FS_TECH_EXT2 = 2,
BD_FS_TECH_EXT3 = 3,
BD_FS_TECH_EXT4 = 4,
BD_FS_TECH_XFS = 5,
BD_FS_TECH_VFAT = 6,
BD_FS_TECH_NTFS = 7,
} BDFSTech;
/* XXX: number of the highest bit of all modes */
#define BD_FS_MODE_LAST 6
typedef enum {
BD_FS_TECH_MODE_MKFS = 1 << 0,
BD_FS_TECH_MODE_WIPE = 1 << 1,
BD_FS_TECH_MODE_CHECK = 1 << 2,
BD_FS_TECH_MODE_REPAIR = 1 << 3,
BD_FS_TECH_MODE_SET_LABEL = 1 << 4,
BD_FS_TECH_MODE_QUERY = 1 << 5,
BD_FS_TECH_MODE_RESIZE = 1 << 6,
} BDFSTechMode;
/*
* If using the plugin as a standalone library, the following functions should
* be called to:
*
* check_deps() - check plugin's dependencies, returning TRUE if satisfied
* init() - initialize the plugin, returning TRUE on success
* close() - clean after the plugin at the end or if no longer used
*
*/
gboolean bd_fs_check_deps ();
gboolean bd_fs_init ();
void bd_fs_close ();
gboolean bd_fs_is_tech_avail (BDFSTech tech, guint64 mode, GError **error);
#endif /* BD_FS */
#include "fs/ext.h"
#include "fs/generic.h"
#include "fs/mount.h"
#include "fs/ntfs.h"
#include "fs/vfat.h"
#include "fs/xfs.h"
|