FS

FS — plugin for operations with file systems

Functions

gboolean bd_fs_check_deps ()
gboolean bd_fs_init ()
void bd_fs_close ()
GQuark bd_fs_error_quark ()
gboolean bd_fs_wipe ()
gboolean bd_fs_clean ()
gchar * bd_fs_get_fstype ()
gboolean bd_fs_freeze ()
gboolean bd_fs_unfreeze ()
gboolean bd_fs_mount ()
gboolean bd_fs_unmount ()
gchar * bd_fs_get_mountpoint ()
gboolean bd_fs_is_mountpoint ()
gboolean bd_fs_resize ()
gboolean bd_fs_repair ()
gboolean bd_fs_check ()
gboolean bd_fs_set_label ()
guint64 bd_fs_get_size ()
guint64 bd_fs_get_free_space ()
gboolean bd_fs_can_resize ()
gboolean bd_fs_can_check ()
gboolean bd_fs_can_repair ()
gboolean bd_fs_can_set_label ()
gboolean bd_fs_can_get_size ()
gboolean bd_fs_can_get_free_space ()
gboolean bd_fs_can_free_space ()
gboolean bd_fs_can_set_uuid ()
gboolean bd_fs_set_uuid ()
gboolean bd_fs_ext2_check ()
BDFSExt2Info * bd_fs_ext2_get_info ()
BDFSExt2Info * bd_fs_ext2_info_copy ()
void bd_fs_ext2_info_free ()
gboolean bd_fs_ext2_mkfs ()
gboolean bd_fs_ext2_repair ()
gboolean bd_fs_ext2_resize ()
gboolean bd_fs_ext2_set_label ()
gboolean bd_fs_ext2_check_label ()
gboolean bd_fs_ext2_set_uuid ()
gboolean bd_fs_ext2_check_uuid ()
gboolean bd_fs_ext2_wipe ()
gboolean bd_fs_ext3_check ()
BDFSExt3Info * bd_fs_ext3_get_info ()
BDFSExt3Info * bd_fs_ext3_info_copy ()
void bd_fs_ext3_info_free ()
gboolean bd_fs_ext3_mkfs ()
gboolean bd_fs_ext3_repair ()
gboolean bd_fs_ext3_resize ()
gboolean bd_fs_ext3_set_label ()
gboolean bd_fs_ext3_check_label ()
gboolean bd_fs_ext3_set_uuid ()
gboolean bd_fs_ext3_check_uuid ()
gboolean bd_fs_ext3_wipe ()
gboolean bd_fs_ext4_check ()
BDFSExt4Info * bd_fs_ext4_get_info ()
BDFSExt4Info * bd_fs_ext4_info_copy ()
void bd_fs_ext4_info_free ()
gboolean bd_fs_ext4_mkfs ()
gboolean bd_fs_ext4_repair ()
gboolean bd_fs_ext4_resize ()
gboolean bd_fs_ext4_set_label ()
gboolean bd_fs_ext4_check_label ()
gboolean bd_fs_ext4_set_uuid ()
gboolean bd_fs_ext4_check_uuid ()
gboolean bd_fs_ext4_wipe ()
gboolean bd_fs_xfs_check ()
BDFSXfsInfo * bd_fs_xfs_get_info ()
BDFSXfsInfo * bd_fs_xfs_info_copy ()
void bd_fs_xfs_info_free ()
gboolean bd_fs_xfs_mkfs ()
gboolean bd_fs_xfs_repair ()
gboolean bd_fs_xfs_resize ()
gboolean bd_fs_xfs_set_label ()
gboolean bd_fs_xfs_check_label ()
gboolean bd_fs_xfs_set_uuid ()
gboolean bd_fs_xfs_check_uuid ()
gboolean bd_fs_xfs_wipe ()
gboolean bd_fs_vfat_check ()
BDFSVfatInfo * bd_fs_vfat_get_info ()
BDFSVfatInfo * bd_fs_vfat_info_copy ()
void bd_fs_vfat_info_free ()
gboolean bd_fs_vfat_mkfs ()
gboolean bd_fs_vfat_repair ()
gboolean bd_fs_vfat_resize ()
gboolean bd_fs_vfat_set_label ()
gboolean bd_fs_vfat_check_label ()
gboolean bd_fs_vfat_wipe ()
gboolean bd_fs_is_tech_avail ()
gboolean bd_fs_ntfs_check ()
BDFSNtfsInfo * bd_fs_ntfs_get_info ()
gboolean bd_fs_ntfs_mkfs ()
gboolean bd_fs_ntfs_repair ()
gboolean bd_fs_ntfs_resize ()
gboolean bd_fs_ntfs_set_label ()
gboolean bd_fs_ntfs_check_label ()
gboolean bd_fs_ntfs_wipe ()
BDFSNtfsInfo * bd_fs_ntfs_info_copy ()
void bd_fs_ntfs_info_free ()
gboolean bd_fs_ntfs_set_uuid ()
gboolean bd_fs_ntfs_check_uuid ()
BDFSF2FSInfo * bd_fs_f2fs_info_copy ()
void bd_fs_f2fs_info_free ()
gboolean bd_fs_f2fs_mkfs ()
gboolean bd_fs_f2fs_wipe ()
gboolean bd_fs_f2fs_check ()
gboolean bd_fs_f2fs_repair ()
BDFSF2FSInfo * bd_fs_f2fs_get_info ()
gboolean bd_fs_f2fs_resize ()
gboolean bd_fs_reiserfs_check ()
BDFSReiserFSInfo * bd_fs_reiserfs_get_info ()
BDFSReiserFSInfo * bd_fs_reiserfs_info_copy ()
void bd_fs_reiserfs_info_free ()
gboolean bd_fs_reiserfs_mkfs ()
gboolean bd_fs_reiserfs_repair ()
gboolean bd_fs_reiserfs_resize ()
gboolean bd_fs_reiserfs_set_label ()
gboolean bd_fs_reiserfs_check_label ()
gboolean bd_fs_reiserfs_set_uuid ()
gboolean bd_fs_reiserfs_check_uuid ()
gboolean bd_fs_reiserfs_wipe ()
BDFSNILFS2Info * bd_fs_nilfs2_get_info ()
BDFSNILFS2Info * bd_fs_nilfs2_info_copy ()
void bd_fs_nilfs2_info_free ()
gboolean bd_fs_nilfs2_mkfs ()
gboolean bd_fs_nilfs2_resize ()
gboolean bd_fs_nilfs2_set_label ()
gboolean bd_fs_nilfs2_check_label ()
gboolean bd_fs_nilfs2_set_uuid ()
gboolean bd_fs_nilfs2_check_uuid ()
gboolean bd_fs_nilfs2_wipe ()

Types and Values

Includes

#include <fs.h>

Description

A plugin for operations with file systems

Functions

bd_fs_check_deps ()

gboolean
bd_fs_check_deps (void);

Returns

whether the plugin's runtime dependencies are satisfied or not

Function checking plugin's runtime dependencies.


bd_fs_init ()

gboolean
bd_fs_init (void);

Initializes the plugin. **This function is called automatically by the library's initialization functions.**


bd_fs_close ()

void
bd_fs_close (void);

Cleans up after the plugin. **This function is called automatically by the library's functions that unload it.**


bd_fs_error_quark ()

GQuark
bd_fs_error_quark (void);

[skip]


bd_fs_wipe ()

gboolean
bd_fs_wipe (const gchar *device,
            gboolean all,
            GError **error);

Parameters

device

the device to wipe signatures from

 

all

whether to wipe all (TRUE) signatures or just the first (FALSE) one

 

error

place to store error (if any).

[out]

Returns

whether signatures were successfully wiped on device or not

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_WIPE


bd_fs_clean ()

gboolean
bd_fs_clean (const gchar *device,
             GError **error);

Clean all signatures from device . Difference between this and bd_fs_wipe() is that this function doesn't return error if device is already empty. This will also always remove all signatures from device , not only the first one.

Parameters

device

the device to clean

 

error

place to store error (if any).

[out]

Returns

whether device was successfully cleaned or not

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_WIPE


bd_fs_get_fstype ()

gchar *
bd_fs_get_fstype (const gchar *device,
                  GError **error);

Get first signature on device as a string.

Parameters

device

the device to probe

 

error

place to store error (if any).

[out]

Returns

type of filesystem found on device , NULL in case no signature has been detected or in case of error (error is set in this case)

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY.

[transfer full]


bd_fs_freeze ()

gboolean
bd_fs_freeze (const gchar *mountpoint,
              GError **error);

Freezes filesystem mounted on mountpoint . The filesystem must support freezing.

Parameters

mountpoint

mountpoint of the device (filesystem) to freeze

 

error

place to store error (if any).

[out]

Returns

whether mountpoint was successfully freezed or not


bd_fs_unfreeze ()

gboolean
bd_fs_unfreeze (const gchar *mountpoint,
                GError **error);

Un-freezes filesystem mounted on mountpoint . The filesystem must support freezing.

Parameters

mountpoint

mountpoint of the device (filesystem) to un-freeze

 

error

place to store error (if any).

[out]

Returns

whether mountpoint was successfully unfreezed or not


bd_fs_mount ()

gboolean
bd_fs_mount (const gchar *device,
             const gchar *mountpoint,
             const gchar *fstype,
             const gchar *options,
             const BDExtraArg **extra,
             GError **error);

Parameters

device

device to mount, if not specified mountpoint entry from fstab will be used.

[allow-none]

mountpoint

mountpoint for device , if not specified device entry from fstab will be used.

[allow-none]

fstype

filesystem type.

[allow-none]

options

comma delimited options for mount.

[allow-none]

extra

extra options for the unmount currently only 'run_as_uid' and 'run_as_gid' are supported value must be a valid non zero uid (gid).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether device (or mountpoint ) was successfully mounted or not

Tech category: BD_FS_TECH_MOUNT (no mode, ignored)


bd_fs_unmount ()

gboolean
bd_fs_unmount (const gchar *spec,
               gboolean lazy,
               gboolean force,
               const BDExtraArg **extra,
               GError **error);

Parameters

spec

mount point or device to unmount

 

lazy

enable/disable lazy unmount

 

force

enable/disable force unmount

 

extra

extra options for the unmount currently only 'run_as_uid' and 'run_as_gid' are supported value must be a valid non zero uid (gid).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether spec was successfully unmounted or not

Tech category: BD_FS_TECH_MOUNT (no mode, ignored)


bd_fs_get_mountpoint ()

gchar *
bd_fs_get_mountpoint (const gchar *device,
                      GError **error);

Get mountpoint for device . If device is mounted multiple times only one mountpoint will be returned.

Parameters

device

device to find mountpoint for

 

error

place to store error (if any).

[out]

Returns

mountpoint for device , NULL in case device is not mounted or in case of an error (error is set in this case)

Tech category: BD_FS_TECH_MOUNT (no mode, ignored).

[transfer full]


bd_fs_is_mountpoint ()

gboolean
bd_fs_is_mountpoint (const gchar *path,
                     GError **error);

Parameters

path

path (folder) to check

 

error

place to store error (if any).

[out]

Returns

whether path is a mountpoint or not

Tech category: BD_FS_TECH_MOUNT (no mode, ignored)


bd_fs_resize ()

gboolean
bd_fs_resize (const gchar *device,
              guint64 new_size,
              GError **error);

Parameters

device

the device the file system of which to resize

 

new_size

new requested size for the file system (if 0, the file system is adapted to the underlying block device)

 

error

place to store error (if any).

[out]

Returns

whether the file system on device was successfully resized or not

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_RESIZE


bd_fs_repair ()

gboolean
bd_fs_repair (const gchar *device,
              GError **error);

Repair filesystem on device . This calls other fs repair functions from this plugin based on detected filesystem (e.g. bd_fs_xfs_repair for XFS). This function will return an error for unknown/unsupported filesystems.

Parameters

device

the device the file system of which to repair

 

error

place to store error (if any).

[out]

Returns

whether the file system on device was successfully repaired or not

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_REPAIR


bd_fs_check ()

gboolean
bd_fs_check (const gchar *device,
             GError **error);

Check filesystem on device . This calls other fs check functions from this plugin based on detected filesystem (e.g. bd_fs_xfs_check for XFS). This function will return an error for unknown/unsupported filesystems.

Parameters

device

the device the file system of which to check

 

error

place to store error (if any).

[out]

Returns

whether the file system on device passed the consistency check or not

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_CHECK


bd_fs_set_label ()

gboolean
bd_fs_set_label (const gchar *device,
                 const gchar *label,
                 GError **error);

Set label for filesystem on device . This calls other fs label functions from this plugin based on detected filesystem (e.g. bd_fs_xfs_set_label for XFS). This function will return an error for unknown/unsupported filesystems.

Parameters

device

the device with file system to set the label for

 

label

label to set

 

error

place to store error (if any).

[out]

Returns

whether the file system on device was successfully relabeled or not

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_SET_LABEL


bd_fs_get_size ()

guint64
bd_fs_get_size (const gchar *device,
                GError **error);

Get size for filesystem on device . This calls other fs info functions from this plugin based on detected filesystem (e.g. bd_fs_xfs_get_info for XFS). This function will return an error for unknown/unsupported filesystems.

Parameters

device

the device with file system to get size for

 

error

place to store error (if any).

[out]

Returns

size of filesystem on device , 0 in case of error.

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY


bd_fs_get_free_space ()

guint64
bd_fs_get_free_space (const gchar *device,
                      GError **error);

Get free space for filesystem on device . This calls other fs info functions from this plugin based on detected filesystem (e.g. bd_fs_ext4_get_info for ext4). This function will return an error for unknown/unsupported filesystems.

Parameters

device

the device with file system to get free space for

 

error

place to store error (if any).

[out]

Returns

free space of filesystem on device , 0 in case of error.

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY


bd_fs_can_resize ()

gboolean
bd_fs_can_resize (const gchar *type,
                  BDFsResizeFlags *mode,
                  gchar **required_utility,
                  GError **error);

Searches for the required utility to resize the given filesystem and returns whether it is installed. The mode flags indicate if growing and/or shrinking resize is available if mounted/unmounted. Unknown filesystems or filesystems which do not support resizing result in errors.

Parameters

type

the filesystem type to be tested for installed resize support

 

mode

flags for allowed resizing (i.e. growing/shrinking support for online/offline).

[out]

required_utility

the utility binary which is required for resizing (if missing i.e. returns FALSE but no error).

[out][transfer full]

error

place to store error (if any).

[out]

Returns

whether filesystem resize is available

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY


bd_fs_can_check ()

gboolean
bd_fs_can_check (const gchar *type,
                 gchar **required_utility,
                 GError **error);

Searches for the required utility to check the given filesystem and returns whether it is installed. Unknown filesystems or filesystems which do not support checking result in errors.

Parameters

type

the filesystem type to be tested for installed consistency check support

 

required_utility

the utility binary which is required for checking (if missing i.e. returns FALSE but no error).

[out][transfer full]

error

place to store error (if any).

[out]

Returns

whether filesystem check is available

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY


bd_fs_can_repair ()

gboolean
bd_fs_can_repair (const gchar *type,
                  gchar **required_utility,
                  GError **error);

Searches for the required utility to repair the given filesystem and returns whether it is installed. Unknown filesystems or filesystems which do not support reparing result in errors.

Parameters

type

the filesystem type to be tested for installed repair support

 

required_utility

the utility binary which is required for repairing (if missing i.e. return FALSE but no error).

[out][transfer full]

error

place to store error (if any).

[out]

Returns

whether filesystem repair is available

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY


bd_fs_can_set_label ()

gboolean
bd_fs_can_set_label (const gchar *type,
                     gchar **required_utility,
                     GError **error);

Searches for the required utility to set the label of the given filesystem and returns whether it is installed. Unknown filesystems or filesystems which do not support setting the label result in errors.

Parameters

type

the filesystem type to be tested for installed label support

 

required_utility

the utility binary which is required for relabeling (if missing i.e. return FALSE but no error).

[out][transfer full]

error

place to store error (if any).

[out]

Returns

whether setting filesystem label is available

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY


bd_fs_can_get_size ()

gboolean
bd_fs_can_get_size (const gchar *type,
                    gchar **required_utility,
                    GError **error);

Searches for the required utility to get size of the given filesystem and returns whether it is installed. Unknown filesystems or filesystems which do not support size querying result in errors.

Parameters

type

the filesystem type to be tested for installed size querying support

 

required_utility

the utility binary which is required for size querying (if missing i.e. return FALSE but no error).

[out][transfer full]

error

place to store error (if any).

[out]

Returns

whether getting filesystem size is available

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY


bd_fs_can_get_free_space ()

gboolean
bd_fs_can_get_free_space (const gchar *type,
                          gchar **required_utility,
                          GError **error);

Searches for the required utility to get free space of the given filesystem and returns whether it is installed. Unknown filesystems or filesystems which do not support free space querying result in errors.

Parameters

type

the filesystem type to be tested for installed free space querying support

 

required_utility

the utility binary which is required for free space querying (if missing i.e. return FALSE but no error).

[out][transfer full]

error

place to store error (if any).

[out]

Returns

whether getting filesystem free space is available

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY


bd_fs_can_free_space ()

gboolean
bd_fs_can_free_space (const gchar *type,
                      gchar **required_utility,
                      GError **error);

bd_fs_can_set_uuid ()

gboolean
bd_fs_can_set_uuid (const gchar *type,
                    gchar **required_utility,
                    GError **error);

Searches for the required utility to set the UUID of the given filesystem and returns whether it is installed. Unknown filesystems or filesystems which do not support setting the UUID result in errors.

Parameters

type

the filesystem type to be tested for installed UUID support

 

required_utility

the utility binary which is required for setting UUID (if missing i.e. return FALSE but no error).

[out][transfer full]

error

place to store error (if any).

[out]

Returns

whether setting filesystem UUID is available

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_QUERY


bd_fs_set_uuid ()

gboolean
bd_fs_set_uuid (const gchar *device,
                const gchar *uuid,
                GError **error);

Set UUID for filesystem on device . This calls other fs UUID functions from this plugin based on detected filesystem (e.g. bd_fs_xfs_set_uuid for XFS). This function will return an error for unknown/unsupported filesystems.

Parameters

device

the device with file system to set the UUID for

 

uuid

UUID to set or NULL to generate a new one.

[allow-none]

error

place to store error (if any).

[out]

Returns

whether the UUID on the file system on device was successfully changed or not

Tech category: BD_FS_TECH_GENERIC-BD_FS_TECH_MODE_SET_UUID


bd_fs_ext2_check ()

gboolean
bd_fs_ext2_check (const gchar *device,
                  const BDExtraArg **extra,
                  GError **error);

Parameters

device

the device the file system on which to check

 

extra

extra options for the check (right now passed to the 'e2fsck' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether an ext2 file system on the device is clean or not

Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_CHECK


bd_fs_ext2_get_info ()

BDFSExt2Info *
bd_fs_ext2_get_info (const gchar *device,
                     GError **error);

Parameters

device

the device the file system of which to get info for

 

error

place to store error (if any).

[out]

Returns

information about the file system on device or NULL in case of error

Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_QUERY.

[transfer full]


bd_fs_ext2_info_copy ()

BDFSExt2Info *
bd_fs_ext2_info_copy (BDFSExt2Info *data);

Creates a new copy of data .

[skip]

Parameters

data

BDFSExt2Info to copy.

[allow-none]

bd_fs_ext2_info_free ()

void
bd_fs_ext2_info_free (BDFSExt2Info *data);

Frees data .

[skip]

Parameters

data

BDFSExt2Info to free.

[allow-none]

bd_fs_ext2_mkfs ()

gboolean
bd_fs_ext2_mkfs (const gchar *device,
                 const BDExtraArg **extra,
                 GError **error);

Parameters

device

the device to create a new ext2 fs on

 

extra

extra options for the creation (right now passed to the 'mke2fs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether a new ext2 fs was successfully created on device or not

Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_MKFS


bd_fs_ext2_repair ()

gboolean
bd_fs_ext2_repair (const gchar *device,
                   gboolean unsafe,
                   const BDExtraArg **extra,
                   GError **error);

Parameters

device

the device the file system on which to repair

 

unsafe

whether to do unsafe operations too

 

extra

extra options for the repair (right now passed to the 'e2fsck' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether an ext2 file system on the device was successfully repaired (if needed) or not (error is set in that case)

Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_REPAIR


bd_fs_ext2_resize ()

gboolean
bd_fs_ext2_resize (const gchar *device,
                   guint64 new_size,
                   const BDExtraArg **extra,
                   GError **error);

Parameters

device

the device the file system of which to resize

 

new_size

new requested size for the file system (if 0, the file system is adapted to the underlying block device)

 

extra

extra options for the resize (right now passed to the 'resize2fs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether the file system on device was successfully resized or not

Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_RESIZE


bd_fs_ext2_set_label ()

gboolean
bd_fs_ext2_set_label (const gchar *device,
                      const gchar *label,
                      GError **error);

Parameters

device

the device the file system on which to set label for

 

label

label to set

 

error

place to store error (if any).

[out]

Returns

whether the label of ext2 file system on the device was successfully set or not

Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_SET_LABEL


bd_fs_ext2_check_label ()

gboolean
bd_fs_ext2_check_label (const gchar *label,
                        GError **error);

Parameters

label

label to check

 

error

place to store error.

[out][allow-none]

Returns

whether label is a valid label for the ext2 file system or not (reason is provided in error )

Tech category: always available


bd_fs_ext2_set_uuid ()

gboolean
bd_fs_ext2_set_uuid (const gchar *device,
                     const gchar *uuid,
                     GError **error);

Parameters

device

the device the file system on which to set UUID for

 

uuid

UUID to set NULL to generate a new one UUID can also be one of "clear", "random" and "time" to clear, generate a new random/time-based UUID.

[allow-none]

error

place to store error (if any).

[out]

Returns

whether the UUID of ext2 file system on the device was successfully set or not

Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_SET_UUID


bd_fs_ext2_check_uuid ()

gboolean
bd_fs_ext2_check_uuid (const gchar *uuid,
                       GError **error);

Parameters

uuid

UUID to check

 

error

place to store error.

[out][allow-none]

Returns

whether uuid is a valid UUID for the ext2 file system or not (reason is provided in error )

Tech category: always available


bd_fs_ext2_wipe ()

gboolean
bd_fs_ext2_wipe (const gchar *device,
                 GError **error);

Parameters

device

the device to wipe an ext2 signature from

 

error

place to store error (if any).

[out]

Returns

whether an ext2 signature was successfully wiped from the device or not

Tech category: BD_FS_TECH_EXT2-BD_FS_TECH_MODE_WIPE


bd_fs_ext3_check ()

gboolean
bd_fs_ext3_check (const gchar *device,
                  const BDExtraArg **extra,
                  GError **error);

Parameters

device

the device the file system on which to check

 

extra

extra options for the check (right now passed to the 'e2fsck' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether an ext3 file system on the device is clean or not

Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_CHECK


bd_fs_ext3_get_info ()

BDFSExt3Info *
bd_fs_ext3_get_info (const gchar *device,
                     GError **error);

Parameters

device

the device the file system of which to get info for

 

error

place to store error (if any).

[out]

Returns

information about the file system on device or NULL in case of error

Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_QUERY.

[transfer full]


bd_fs_ext3_info_copy ()

BDFSExt3Info *
bd_fs_ext3_info_copy (BDFSExt3Info *data);

Creates a new copy of data .

[skip]

Parameters

data

BDFSExt3Info to copy.

[allow-none]

bd_fs_ext3_info_free ()

void
bd_fs_ext3_info_free (BDFSExt3Info *data);

Frees data .

[skip]

Parameters

data

BDFSExt3Info to free.

[allow-none]

bd_fs_ext3_mkfs ()

gboolean
bd_fs_ext3_mkfs (const gchar *device,
                 const BDExtraArg **extra,
                 GError **error);

Parameters

device

the device to create a new ext3 fs on

 

extra

extra options for the creation (right now passed to the 'mke2fs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether a new ext3 fs was successfully created on device or not

Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_MKFS


bd_fs_ext3_repair ()

gboolean
bd_fs_ext3_repair (const gchar *device,
                   gboolean unsafe,
                   const BDExtraArg **extra,
                   GError **error);

Parameters

device

the device the file system on which to repair

 

unsafe

whether to do unsafe operations too

 

extra

extra options for the repair (right now passed to the 'e2fsck' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether an ext3 file system on the device was successfully repaired (if needed) or not (error is set in that case)

Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_REPAIR


bd_fs_ext3_resize ()

gboolean
bd_fs_ext3_resize (const gchar *device,
                   guint64 new_size,
                   const BDExtraArg **extra,
                   GError **error);

Parameters

device

the device the file system of which to resize

 

new_size

new requested size for the file system (if 0, the file system is adapted to the underlying block device)

 

extra

extra options for the resize (right now passed to the 'resize2fs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether the file system on device was successfully resized or not

Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_RESIZE


bd_fs_ext3_set_label ()

gboolean
bd_fs_ext3_set_label (const gchar *device,
                      const gchar *label,
                      GError **error);

Parameters

device

the device the file system on which to set label for

 

label

label to set

 

error

place to store error (if any).

[out]

Returns

whether the label of ext3 file system on the device was successfully set or not

Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_SET_LABEL


bd_fs_ext3_check_label ()

gboolean
bd_fs_ext3_check_label (const gchar *label,
                        GError **error);

Parameters

label

label to check

 

error

place to store error (if any).

[out][allow-none]

Returns

whether label is a valid label for the ext3 file system or not (reason is provided in error )

Tech category: always available


bd_fs_ext3_set_uuid ()

gboolean
bd_fs_ext3_set_uuid (const gchar *device,
                     const gchar *uuid,
                     GError **error);

Parameters

device

the device the file system on which to set UUID for

 

uuid

UUID to set NULL to generate a new one UUID can also be one of "clear", "random" and "time" to clear, generate a new random/time-based UUID.

[allow-none]

error

place to store error (if any).

[out]

Returns

whether the UUID of ext3 file system on the device was successfully set or not

Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_SET_UUID


bd_fs_ext3_check_uuid ()

gboolean
bd_fs_ext3_check_uuid (const gchar *uuid,
                       GError **error);

Parameters

uuid

UUID to check

 

error

place to store error.

[out][allow-none]

Returns

whether uuid is a valid UUID for the ext3 file system or not (reason is provided in error )

Tech category: always available


bd_fs_ext3_wipe ()

gboolean
bd_fs_ext3_wipe (const gchar *device,
                 GError **error);

Parameters

device

the device to wipe an ext3 signature from

 

error

place to store error (if any).

[out]

Returns

whether an ext3 signature was successfully wiped from the device or not

Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_WIPE


bd_fs_ext4_check ()

gboolean
bd_fs_ext4_check (const gchar *device,
                  const BDExtraArg **extra,
                  GError **error);

Parameters

device

the device the file system on which to check

 

extra

extra options for the check (right now passed to the 'e2fsck' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether an ext4 file system on the device is clean or not

Tech category: BD_FS_TECH_EXT4-BD_FS_TECH_MODE_CHECK


bd_fs_ext4_get_info ()

BDFSExt4Info *
bd_fs_ext4_get_info (const gchar *device,
                     GError **error);

Parameters

device

the device the file system of which to get info for

 

error

place to store error (if any).

[out]

Returns

information about the file system on device or NULL in case of error

Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_QUERY.

[transfer full]


bd_fs_ext4_info_copy ()

BDFSExt4Info *
bd_fs_ext4_info_copy (BDFSExt4Info *data);

Creates a new copy of data .

[skip]

Parameters

data

BDFSExt4Info to copy.

[allow-none]

bd_fs_ext4_info_free ()

void
bd_fs_ext4_info_free (BDFSExt4Info *data);

Frees data .

[skip]

Parameters

data

BDFSExt4Info to free.

[allow-none]

bd_fs_ext4_mkfs ()

gboolean
bd_fs_ext4_mkfs (const gchar *device,
                 const BDExtraArg **extra,
                 GError **error);

Parameters

device

the device to create a new ext4 fs on

 

extra

extra options for the creation (right now passed to the 'mkfs.ext4' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether a new ext4 fs was successfully created on device or not

Tech category: BD_FS_TECH_EXT4-BD_FS_TECH_MODE_MKFS


bd_fs_ext4_repair ()

gboolean
bd_fs_ext4_repair (const gchar *device,
                   gboolean unsafe,
                   const BDExtraArg **extra,
                   GError **error);

Parameters

device

the device the file system on which to repair

 

unsafe

whether to do unsafe operations too

 

extra

extra options for the repair (right now passed to the 'e2fsck' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether an ext4 file system on the device was successfully repaired (if needed) or not (error is set in that case)

Tech category: BD_FS_TECH_EXT4-BD_FS_TECH_MODE_REPAIR


bd_fs_ext4_resize ()

gboolean
bd_fs_ext4_resize (const gchar *device,
                   guint64 new_size,
                   const BDExtraArg **extra,
                   GError **error);

Parameters

device

the device the file system of which to resize

 

new_size

new requested size for the file system (if 0, the file system is adapted to the underlying block device)

 

extra

extra options for the resize (right now passed to the 'resize2fs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether the file system on device was successfully resized or not

Tech category: BD_FS_TECH_EXT4-BD_FS_TECH_MODE_RESIZE


bd_fs_ext4_set_label ()

gboolean
bd_fs_ext4_set_label (const gchar *device,
                      const gchar *label,
                      GError **error);

Parameters

device

the device the file system on which to set label for

 

label

label to set

 

error

place to store error (if any).

[out]

Returns

whether the label of ext4 file system on the device was successfully set or not

Tech category: BD_FS_TECH_EXT3-BD_FS_TECH_MODE_SET_LABEL


bd_fs_ext4_check_label ()

gboolean
bd_fs_ext4_check_label (const gchar *label,
                        GError **error);

Parameters

label

label to check

 

error

place to store error (if any).

[out][allow-none]

Returns

whether label is a valid label for the ext4 file system or not (reason is provided in error )

Tech category: always available


bd_fs_ext4_set_uuid ()

gboolean
bd_fs_ext4_set_uuid (const gchar *device,
                     const gchar *uuid,
                     GError **error);

Parameters

device

the device the file system on which to set UUID for

 

uuid

UUID to set NULL to generate a new one UUID can also be one of "clear", "random" and "time" to clear, generate a new random/time-based UUID.

[allow-none]

error

place to store error (if any).

[out]

Returns

whether the UUID of ext4 file system on the device was successfully set or not

Tech category: BD_FS_TECH_EXT4-BD_FS_TECH_MODE_SET_UUID


bd_fs_ext4_check_uuid ()

gboolean
bd_fs_ext4_check_uuid (const gchar *uuid,
                       GError **error);

Parameters

uuid

UUID to check

 

error

place to store error.

[out][allow-none]

Returns

whether uuid is a valid UUID for the ext4 file system or not (reason is provided in error )

Tech category: always available


bd_fs_ext4_wipe ()

gboolean
bd_fs_ext4_wipe (const gchar *device,
                 GError **error);

Parameters

device

the device to wipe an ext4 signature from

 

error

place to store error (if any).

[out]

Returns

whether an ext4 signature was successfully wiped from the device or not

Tech category: BD_FS_TECH_EXT4-BD_FS_TECH_MODE_WIPE


bd_fs_xfs_check ()

gboolean
bd_fs_xfs_check (const gchar *device,
                 GError **error);

Parameters

device

the device containing the file system to check

 

error

place to store error (if any).

[out]

Returns

whether an xfs file system on the device is clean or not

Note: If the file system is mounted RW, it will always be reported as not clean!

Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_CHECK


bd_fs_xfs_get_info ()

BDFSXfsInfo *
bd_fs_xfs_get_info (const gchar *device,
                    GError **error);

Parameters

device

the device containing the file system to get info for (device must be mounted, trying to get info for an unmounted device will result in an error)

 

error

place to store error (if any).

[out]

Returns

information about the file system on device or NULL in case of error

Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_QUERY.

[transfer full]


bd_fs_xfs_info_copy ()

BDFSXfsInfo *
bd_fs_xfs_info_copy (BDFSXfsInfo *data);

Creates a new copy of data .

[skip]

Parameters

data

BDFSXfsInfo to copy.

[allow-none]

bd_fs_xfs_info_free ()

void
bd_fs_xfs_info_free (BDFSXfsInfo *data);

Frees data .

[skip]

Parameters

data

BDFSXfsInfo to free.

[allow-none]

bd_fs_xfs_mkfs ()

gboolean
bd_fs_xfs_mkfs (const gchar *device,
                const BDExtraArg **extra,
                GError **error);

Parameters

device

the device to create a new xfs fs on

 

extra

extra options for the creation (right now passed to the 'mkfs.xfs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether a new xfs fs was successfully created on device or not

Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_MKFS


bd_fs_xfs_repair ()

gboolean
bd_fs_xfs_repair (const gchar *device,
                  const BDExtraArg **extra,
                  GError **error);

Parameters

device

the device containing the file system to repair

 

extra

extra options for the repair (right now passed to the 'xfs_repair' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether an xfs file system on the device was successfully repaired (if needed) or not (error is set in that case)

Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_REPAIR


bd_fs_xfs_resize ()

gboolean
bd_fs_xfs_resize (const gchar *mpoint,
                  guint64 new_size,
                  const BDExtraArg **extra,
                  GError **error);

Parameters

mpoint

the mount point of the file system to resize

 

new_size

new requested size for the file system *in file system blocks* (see bd_fs_xfs_get_info()) (if 0, the file system is adapted to the underlying block device)

 

extra

extra options for the resize (right now passed to the 'xfs_growfs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether the file system mounted on mpoint was successfully resized or not

Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_RESIZE


bd_fs_xfs_set_label ()

gboolean
bd_fs_xfs_set_label (const gchar *device,
                     const gchar *label,
                     GError **error);

Parameters

device

the device containing the file system to set label for

 

label

label to set

 

error

place to store error (if any).

[out]

Returns

whether the label of xfs file system on the device was successfully set or not

Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_SET_LABEL


bd_fs_xfs_check_label ()

gboolean
bd_fs_xfs_check_label (const gchar *label,
                       GError **error);

Parameters

label

label to check

 

error

place to store error.

[out][allow-none]

Returns

whether label is a valid label for the xfs file system or not (reason is provided in error )

Tech category: always available


bd_fs_xfs_set_uuid ()

gboolean
bd_fs_xfs_set_uuid (const gchar *device,
                    const gchar *uuid,
                    GError **error);

Parameters

device

the device containing the file system to set uuid for

 

uuid

UUID to set NULL to generate a new one UUID can also be one of "nil" and "generate" to clear or generate a new UUID.

[allow-none]

error

place to store error (if any).

[out]

Returns

whether the UUID of xfs file system on the device was successfully set or not

Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_SET_UUID


bd_fs_xfs_check_uuid ()

gboolean
bd_fs_xfs_check_uuid (const gchar *uuid,
                      GError **error);

Parameters

uuid

UUID to check

 

error

place to store error.

[out][allow-none]

Returns

whether uuid is a valid UUID for the xfs file system or not (reason is provided in error )

Tech category: always available


bd_fs_xfs_wipe ()

gboolean
bd_fs_xfs_wipe (const gchar *device,
                GError **error);

Parameters

device

the device to wipe an xfs signature from

 

error

place to store error (if any).

[out]

Returns

whether an xfs signature was successfully wiped from the device or not

Tech category: BD_FS_TECH_XFS-BD_FS_TECH_MODE_WIPE


bd_fs_vfat_check ()

gboolean
bd_fs_vfat_check (const gchar *device,
                  const BDExtraArg **extra,
                  GError **error);

Parameters

device

the device containing the file system to check

 

extra

extra options for the repair (right now passed to the 'fsck.vfat' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether an vfat file system on the device is clean or not

Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_CHECK


bd_fs_vfat_get_info ()

BDFSVfatInfo *
bd_fs_vfat_get_info (const gchar *device,
                     GError **error);

Parameters

device

the device containing the file system to get info for

 

error

place to store error (if any).

[out]

Returns

information about the file system on device or NULL in case of error

Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_QUERY.

[transfer full]


bd_fs_vfat_info_copy ()

BDFSVfatInfo *
bd_fs_vfat_info_copy (BDFSVfatInfo *data);

Creates a new copy of data .

[skip]

Parameters

data

BDFSVfatInfo to copy.

[allow-none]

bd_fs_vfat_info_free ()

void
bd_fs_vfat_info_free (BDFSVfatInfo *data);

Frees data .

[skip]

Parameters

data

BDFSVfatInfo to free.

[allow-none]

bd_fs_vfat_mkfs ()

gboolean
bd_fs_vfat_mkfs (const gchar *device,
                 const BDExtraArg **extra,
                 GError **error);

Parameters

device

the device to create a new vfat fs on

 

extra

extra options for the creation (right now passed to the 'mkfs.vfat' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether a new vfat fs was successfully created on device or not

Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_MKFS


bd_fs_vfat_repair ()

gboolean
bd_fs_vfat_repair (const gchar *device,
                   const BDExtraArg **extra,
                   GError **error);

Parameters

device

the device containing the file system to repair

 

extra

extra options for the repair (right now passed to the 'fsck.vfat' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether an vfat file system on the device was successfully repaired (if needed) or not (error is set in that case)

Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_REPAIR


bd_fs_vfat_resize ()

gboolean
bd_fs_vfat_resize (const gchar *device,
                   guint64 new_size,
                   GError **error);

Parameters

device

the device the file system of which to resize

 

new_size

new requested size for the file system (if 0, the file system is adapted to the underlying block device)

 

error

place to store error (if any).

[out]

Returns

whether the file system on device was successfully resized or not

Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_RESIZE


bd_fs_vfat_set_label ()

gboolean
bd_fs_vfat_set_label (const gchar *device,
                      const gchar *label,
                      GError **error);

Parameters

device

the device containing the file system to set label for

 

label

label to set

 

error

place to store error (if any).

[out]

Returns

whether the label of vfat file system on the device was successfully set or not

Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_SET_LABEL


bd_fs_vfat_check_label ()

gboolean
bd_fs_vfat_check_label (const gchar *label,
                        GError **error);

Parameters

label

label to check

 

error

place to store error.

[out][allow-none]

Returns

whether label is a valid label for the vfat file system or not (reason is provided in error )

Tech category: always available


bd_fs_vfat_wipe ()

gboolean
bd_fs_vfat_wipe (const gchar *device,
                 GError **error);

Parameters

device

the device to wipe an vfat signature from

 

error

place to store error (if any).

[out]

Returns

whether an vfat signature was successfully wiped from the device or not

Tech category: BD_FS_TECH_VFAT-BD_FS_TECH_MODE_WIPE


bd_fs_is_tech_avail ()

gboolean
bd_fs_is_tech_avail (BDFSTech tech,
                     guint64 mode,
                     GError **error);

Parameters

tech

the queried tech

 

mode

a bit mask of queried modes of operation (BDFSTechMode) for tech

 

error

place to store error (details about why the tech -mode combination is not available).

[out]

Returns

whether the tech -mode combination is available -- supported by the plugin implementation and having all the runtime dependencies available


bd_fs_ntfs_check ()

gboolean
bd_fs_ntfs_check (const gchar *device,
                  GError **error);

Parameters

device

the device containing the file system to check

 

error

place to store error (if any).

[out]

Returns

whether an ntfs file system on the device is clean or not

Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_CHECK


bd_fs_ntfs_get_info ()

BDFSNtfsInfo *
bd_fs_ntfs_get_info (const gchar *device,
                     GError **error);

Parameters

device

the device containing the file system to get info for (device must not be mounted, trying to get info for a mounted device will result in an error)

 

error

place to store error (if any).

[out]

Returns

information about the file system on device or NULL in case of error

Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_QUERY.

[transfer full]


bd_fs_ntfs_mkfs ()

gboolean
bd_fs_ntfs_mkfs (const gchar *device,
                 const BDExtraArg **extra,
                 GError **error);

Parameters

device

the device to create a new ntfs fs on

 

extra

extra options for the creation (right now passed to the 'mkntfs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether a new NTFS fs was successfully created on device or not

Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_MKFS


bd_fs_ntfs_repair ()

gboolean
bd_fs_ntfs_repair (const gchar *device,
                   GError **error);

Parameters

device

the device containing the file system to repair

 

error

place to store error (if any).

[out]

Returns

whether an NTFS file system on the device was successfully repaired (if needed) or not (error is set in that case)

Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_REPAIR


bd_fs_ntfs_resize ()

gboolean
bd_fs_ntfs_resize (const gchar *device,
                   guint64 new_size,
                   GError **error);

Parameters

device

the device the file system of which to resize

 

new_size

new requested size for the file system in bytes (if 0, the file system is adapted to the underlying block device)

 

error

place to store error (if any).

[out]

Returns

whether the file system on device was successfully resized or not

Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_RESIZE


bd_fs_ntfs_set_label ()

gboolean
bd_fs_ntfs_set_label (const gchar *device,
                      const gchar *label,
                      GError **error);

Parameters

device

the device containing the file system to set the label for

 

label

label to set

 

error

place to store error (if any).

[out]

Returns

whether the label of the NTFS file system on the device was successfully set or not

Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_SET_LABEL


bd_fs_ntfs_check_label ()

gboolean
bd_fs_ntfs_check_label (const gchar *label,
                        GError **error);

Parameters

label

label to check

 

error

place to store error.

[out][allow-none]

Returns

whether label is a valid label for the ntfs file system or not (reason is provided in error )

Tech category: always available


bd_fs_ntfs_wipe ()

gboolean
bd_fs_ntfs_wipe (const gchar *device,
                 GError **error);

Parameters

device

the device to wipe an ntfs signature from

 

error

place to store error (if any).

[out]

Returns

whether an ntfs signature was successfully wiped from the device or not

Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_WIPE


bd_fs_ntfs_info_copy ()

BDFSNtfsInfo *
bd_fs_ntfs_info_copy (BDFSNtfsInfo *data);

Creates a new copy of data .

[skip]

Parameters

data

BDFSNtfsInfo to copy.

[allow-none]

bd_fs_ntfs_info_free ()

void
bd_fs_ntfs_info_free (BDFSNtfsInfo *data);

Frees data .

[skip]

Parameters

data

BDFSNtfsInfo to free.

[allow-none]

bd_fs_ntfs_set_uuid ()

gboolean
bd_fs_ntfs_set_uuid (const gchar *device,
                     const gchar *uuid,
                     GError **error);

Parameters

device

the device containing the file system to set the UUID (serial number) for

 

uuid

UUID to set or NULL to generate a new one.

[allow-none]

error

place to store error (if any).

[out]

Returns

whether the UUID of the NTFS file system on the device was successfully set or not

Tech category: BD_FS_TECH_NTFS-BD_FS_TECH_MODE_SET_UUID


bd_fs_ntfs_check_uuid ()

gboolean
bd_fs_ntfs_check_uuid (const gchar *uuid,
                       GError **error);

Parameters

uuid

UUID to check

 

error

place to store error.

[out][allow-none]

Returns

whether uuid is a valid UUID for the ntfs file system or not (reason is provided in error )

Tech category: always available


bd_fs_f2fs_info_copy ()

BDFSF2FSInfo *
bd_fs_f2fs_info_copy (BDFSF2FSInfo *data);

Creates a new copy of data .

[skip]

Parameters

data

BDFSF2FSInfo to copy.

[allow-none]

bd_fs_f2fs_info_free ()

void
bd_fs_f2fs_info_free (BDFSF2FSInfo *data);

Frees data .

[skip]

Parameters

data

BDFSF2FSInfo to free.

[allow-none]

bd_fs_f2fs_mkfs ()

gboolean
bd_fs_f2fs_mkfs (const gchar *device,
                 const BDExtraArg **extra,
                 GError **error);

Parameters

device

the device to create a new f2fs fs on

 

extra

extra options for the creation (right now passed to the 'mkfs.f2fs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether a new f2fs fs was successfully created on device or not

Tech category: BD_FS_TECH_F2FS-BD_FS_TECH_MODE_MKFS


bd_fs_f2fs_wipe ()

gboolean
bd_fs_f2fs_wipe (const gchar *device,
                 GError **error);

Parameters

device

the device to wipe an f2fs signature from

 

error

place to store error (if any).

[out]

Returns

whether an f2fs signature was successfully wiped from the device or not

Tech category: BD_FS_TECH_F2FS-BD_FS_TECH_MODE_WIPE


bd_fs_f2fs_check ()

gboolean
bd_fs_f2fs_check (const gchar *device,
                  const BDExtraArg **extra,
                  GError **error);

Parameters

device

the device containing the file system to check

 

extra

extra options for the repair (right now passed to the 'fsck.f2fs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether an f2fs file system on the device is clean or not

Tech category: BD_FS_TECH_F2FS-BD_FS_TECH_MODE_CHECK


bd_fs_f2fs_repair ()

gboolean
bd_fs_f2fs_repair (const gchar *device,
                   const BDExtraArg **extra,
                   GError **error);

Parameters

device

the device containing the file system to repair

 

extra

extra options for the repair (right now passed to the 'fsck.f2fs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether an f2fs file system on the device was successfully repaired (if needed) or not (error is set in that case)

Tech category: BD_FS_TECH_F2FS-BD_FS_TECH_MODE_REPAIR


bd_fs_f2fs_get_info ()

BDFSF2FSInfo *
bd_fs_f2fs_get_info (const gchar *device,
                     GError **error);

Parameters

device

the device containing the file system to get info for

 

error

place to store error (if any).

[out]

Returns

information about the file system on device or NULL in case of error

Tech category: BD_FS_TECH_F2FS-BD_FS_TECH_MODE_QUERY.

[transfer full]


bd_fs_f2fs_resize ()

gboolean
bd_fs_f2fs_resize (const gchar *device,
                   guint64 new_size,
                   gboolean safe,
                   const BDExtraArg **extra,
                   GError **error);

Parameters

device

the device containing the file system to resize

 

new_size

new requested size for the file system *in file system sectors* (see bd_fs_f2fs_get_info()) (if 0, the file system is adapted to the underlying block device)

 

safe

whether to perform safe resize or not (does not resize metadata)

 

extra

extra options for the resize (right now passed to the 'resize.f2fs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether the file system on device was successfully resized or not

Tech category: BD_FS_TECH_F2FS-BD_FS_TECH_MODE_RESIZE


bd_fs_reiserfs_check ()

gboolean
bd_fs_reiserfs_check (const gchar *device,
                      const BDExtraArg **extra,
                      GError **error);

Parameters

device

the device containing the file system to check

 

extra

extra options for the repair (right now passed to the 'reiserfsck' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether the reiserfs file system on the device is clean or not

Tech category: BD_FS_TECH_REISERFS-BD_FS_TECH_MODE_CHECK


bd_fs_reiserfs_get_info ()

BDFSReiserFSInfo *
bd_fs_reiserfs_get_info (const gchar *device,
                         GError **error);

Parameters

device

the device containing the file system to get info for

 

error

place to store error (if any).

[out]

Returns

information about the file system on device or NULL in case of error

Tech category: BD_FS_TECH_REISERFS-BD_FS_TECH_MODE_QUERY.

[transfer full]


bd_fs_reiserfs_info_copy ()

BDFSReiserFSInfo *
bd_fs_reiserfs_info_copy (BDFSReiserFSInfo *data);

Creates a new copy of data .

[skip]

Parameters

data

BDFSReiserFSInfo to copy.

[allow-none]

bd_fs_reiserfs_info_free ()

void
bd_fs_reiserfs_info_free (BDFSReiserFSInfo *data);

Frees data .

[skip]

Parameters

data

BDFSReiserFSInfo to free.

[allow-none]

bd_fs_reiserfs_mkfs ()

gboolean
bd_fs_reiserfs_mkfs (const gchar *device,
                     const BDExtraArg **extra,
                     GError **error);

Parameters

device

the device to create a new reiserfs fs on

 

extra

extra options for the creation (right now passed to the 'mkreiserfs' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether a new reiserfs fs was successfully created on device or not

Tech category: BD_FS_TECH_REISERFS-BD_FS_TECH_MODE_MKFS


bd_fs_reiserfs_repair ()

gboolean
bd_fs_reiserfs_repair (const gchar *device,
                       const BDExtraArg **extra,
                       GError **error);

Parameters

device

the device containing the file system to repair

 

extra

extra options for the repair (right now passed to the 'reiserfsck' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether the reiserfs file system on the device was successfully repaired (if needed) or not (error is set in that case)

Tech category: BD_FS_TECH_REISERFS-BD_FS_TECH_MODE_REPAIR


bd_fs_reiserfs_resize ()

gboolean
bd_fs_reiserfs_resize (const gchar *device,
                       guint64 new_size,
                       GError **error);

Parameters

device

the device the file system of which to resize

 

new_size

new requested size for the file system (if 0, the file system is adapted to the underlying block device)

 

error

place to store error (if any).

[out]

Returns

whether the file system on device was successfully resized or not

Tech category: BD_FS_TECH_REISERFS-BD_FS_TECH_MODE_RESIZE


bd_fs_reiserfs_set_label ()

gboolean
bd_fs_reiserfs_set_label (const gchar *device,
                          const gchar *label,
                          GError **error);

Parameters

device

the device containing the file system to set label for

 

label

label to set

 

error

place to store error (if any).

[out]

Returns

whether the label of reiserfs file system on the device was successfully set or not

Tech category: BD_FS_TECH_REISERFS-BD_FS_TECH_MODE_SET_LABEL


bd_fs_reiserfs_check_label ()

gboolean
bd_fs_reiserfs_check_label (const gchar *label,
                            GError **error);

Parameters

label

label to check

 

error

place to store error.

[out][allow-none]

Returns

whether label is a valid label for the reiserfs file system or not (reason is provided in error )

Tech category: always available


bd_fs_reiserfs_set_uuid ()

gboolean
bd_fs_reiserfs_set_uuid (const gchar *device,
                         const gchar *uuid,
                         GError **error);

Parameters

device

the device containing the file system to set UUID for

 

uuid

UUID to set or NULL to generate a new one.

[allow-none]

error

place to store error (if any).

[out]

Returns

whether the uuid of reiserfs file system on the device was successfully set or not

Tech category: BD_FS_TECH_REISERFS-BD_FS_TECH_MODE_SET_UUID


bd_fs_reiserfs_check_uuid ()

gboolean
bd_fs_reiserfs_check_uuid (const gchar *uuid,
                           GError **error);

Parameters

uuid

UUID to check

 

error

place to store error.

[out][allow-none]

Returns

whether uuid is a valid UUID for the ReiserFS file system or not (reason is provided in error )

Tech category: always available


bd_fs_reiserfs_wipe ()

gboolean
bd_fs_reiserfs_wipe (const gchar *device,
                     GError **error);

Parameters

device

the device to wipe a reiserfs signature from

 

error

place to store error (if any).

[out]

Returns

whether the reiserfs signature was successfully wiped from the device or not

Tech category: BD_FS_TECH_REISERFS-BD_FS_TECH_MODE_WIPE


bd_fs_nilfs2_get_info ()

BDFSNILFS2Info *
bd_fs_nilfs2_get_info (const gchar *device,
                       GError **error);

Parameters

device

the device containing the file system to get info for

 

error

place to store error (if any).

[out]

Returns

information about the file system on device or NULL in case of error

Tech category: BD_FS_TECH_NILFS2-BD_FS_TECH_MODE_QUERY.

[transfer full]


bd_fs_nilfs2_info_copy ()

BDFSNILFS2Info *
bd_fs_nilfs2_info_copy (BDFSNILFS2Info *data);

Creates a new copy of data .

[skip]

Parameters

data

BDFSNILFS2Info to copy.

[allow-none]

bd_fs_nilfs2_info_free ()

void
bd_fs_nilfs2_info_free (BDFSNILFS2Info *data);

Frees data .

[skip]

Parameters

data

BDFSNILFS2Info to free.

[allow-none]

bd_fs_nilfs2_mkfs ()

gboolean
bd_fs_nilfs2_mkfs (const gchar *device,
                   const BDExtraArg **extra,
                   GError **error);

Parameters

device

the device to create a new nilfs fs on

 

extra

extra options for the creation (right now passed to the 'mkfs.nilfs2' utility).

[allow-none][array zero-terminated=1]

error

place to store error (if any).

[out]

Returns

whether a new nilfs fs was successfully created on device or not

Tech category: BD_FS_TECH_NILFS2-BD_FS_TECH_MODE_MKFS


bd_fs_nilfs2_resize ()

gboolean
bd_fs_nilfs2_resize (const gchar *device,
                     guint64 new_size,
                     GError **error);

Parameters

device

the device the file system of which to resize

 

new_size

new requested size for the file system (if 0, the file system is adapted to the underlying block device)

 

error

place to store error (if any).

[out]

Returns

whether the file system on device was successfully resized or not

Tech category: BD_FS_TECH_NILFS2-BD_FS_TECH_MODE_RESIZE


bd_fs_nilfs2_set_label ()

gboolean
bd_fs_nilfs2_set_label (const gchar *device,
                        const gchar *label,
                        GError **error);

Parameters

device

the device containing the file system to set label for

 

label

label to set

 

error

place to store error (if any).

[out]

Returns

whether the label of nilfs file system on the device was successfully set or not

Tech category: BD_FS_TECH_NILFS2-BD_FS_TECH_MODE_SET_LABEL


bd_fs_nilfs2_check_label ()

gboolean
bd_fs_nilfs2_check_label (const gchar *label,
                          GError **error);

Parameters

label

label to check

 

error

place to store error.

[out][allow-none]

Returns

whether label is a valid label for the nilfs2 file system or not (reason is provided in error )

Tech category: always available


bd_fs_nilfs2_set_uuid ()

gboolean
bd_fs_nilfs2_set_uuid (const gchar *device,
                       const gchar *uuid,
                       GError **error);

Parameters

device

the device containing the file system to set UUID for

 

uuid

UUID to set or NULL to generate a new one.

[allow-none]

error

place to store error (if any).

[out]

Returns

whether the uuid of nilfs file system on the device was successfully set or not

Tech category: BD_FS_TECH_NILFS2-BD_FS_TECH_MODE_SET_UUID


bd_fs_nilfs2_check_uuid ()

gboolean
bd_fs_nilfs2_check_uuid (const gchar *uuid,
                         GError **error);

Parameters

uuid

UUID to check

 

error

place to store error.

[out][allow-none]

Returns

whether uuid is a valid UUID for the nilfs file system or not (reason is provided in error )

Tech category: always available


bd_fs_nilfs2_wipe ()

gboolean
bd_fs_nilfs2_wipe (const gchar *device,
                   GError **error);

Parameters

device

the device to wipe a nilfs signature from

 

error

place to store error (if any).

[out]

Returns

whether the nilfs signature was successfully wiped from the device or not

Tech category: BD_FS_TECH_NILFS2-BD_FS_TECH_MODE_WIPE

Types and Values

BDFSExt2Info


BDFSExt3Info


BDFSExt4Info


enum BDFsError

Members

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

   

BD_FS_ERROR_TECH_UNAVAIL

   

BD_FS_ERROR_LABEL_INVALID

   

BD_FS_ERROR_UUID_INVALID

   

BD_FS_ERROR

#define             BD_FS_ERROR

BDFSXfsInfo

typedef struct {
    gchar *label;
    gchar *uuid;
    guint64 block_size;
    guint64 block_count;
} BDFSXfsInfo;

Members

gchar *label;

label of the filesystem

 

gchar *uuid;

uuid of the filesystem

 

guint64 block_size;

block size used by the filesystem

 

guint64 block_count;

number of blocks in the filesystem

 

BDFSVfatInfo

typedef struct {
    gchar *label;
    gchar *uuid;
    guint64 cluster_size;
    guint64 cluster_count;
    guint64 free_cluster_count;
} BDFSVfatInfo;

Members

gchar *label;

label of the filesystem

 

gchar *uuid;

uuid of the filesystem

 

guint64 cluster_size;

cluster size used by the filesystem

 

guint64 cluster_count;

number of clusters in the filesystem

 

guint64 free_cluster_count;

number of free clusters in the filesystem

 

enum BDFSTech

Members

BD_FS_TECH_GENERIC

   

BD_FS_TECH_MOUNT

   

BD_FS_TECH_EXT2

   

BD_FS_TECH_EXT3

   

BD_FS_TECH_EXT4

   

BD_FS_TECH_XFS

   

BD_FS_TECH_VFAT

   

BD_FS_TECH_NTFS

   

BD_FS_TECH_F2FS

   

BD_FS_TECH_REISERFS

   

BD_FS_TECH_NILFS2

   

enum BDFSTechMode

Members

BD_FS_TECH_MODE_MKFS

   

BD_FS_TECH_MODE_WIPE

   

BD_FS_TECH_MODE_CHECK

   

BD_FS_TECH_MODE_REPAIR

   

BD_FS_TECH_MODE_SET_LABEL

   

BD_FS_TECH_MODE_QUERY

   

BD_FS_TECH_MODE_RESIZE

   

BD_FS_TECH_MODE_SET_UUID

   

enum BDFsResizeFlags

Members

BD_FS_OFFLINE_SHRINK

   

BD_FS_OFFLINE_GROW

   

BD_FS_ONLINE_SHRINK

   

BD_FS_ONLINE_GROW

   

BDFSNtfsInfo

typedef struct {
    gchar *label;
    gchar *uuid;
    guint64 size;
    guint64 free_space;
} BDFSNtfsInfo;

Members

gchar *label;

label of the filesystem

 

gchar *uuid;

uuid of the filesystem

 

guint64 size;

size of the filesystem in bytes

 

guint64 free_space;

number of free space in the filesystem in bytes

 

BDFSF2FSInfo

typedef struct {
    gchar *label;
    gchar *uuid;
    guint64 sector_size;
    guint64 sector_count;
    guint64 features;
} BDFSF2FSInfo;

Members

gchar *label;

label of the filesystem

 

gchar *uuid;

uuid of the filesystem

 

guint64 sector_size;

sector size used by the filesystem

 

guint64 sector_count;

number of sectors in the filesystem

 

guint64 features;

features enabled for this filesystem, see BDFSF2FSFeature

 

enum BDFSF2FSFeature

Members

BD_FS_F2FS_FEATURE_ENCRYPT

   

BD_FS_F2FS_FEATURE_BLKZONED

   

BD_FS_F2FS_FEATURE_ATOMIC_WRITE

   

BD_FS_F2FS_FEATURE_EXTRA_ATTR

   

BD_FS_F2FS_FEATURE_PRJQUOTA

   

BD_FS_F2FS_FEATURE_INODE_CHKSUM

   

BD_FS_F2FS_FEATURE_FLEXIBLE_INLINE_XATTR

   

BD_FS_F2FS_FEATURE_QUOTA_INO

   

BD_FS_F2FS_FEATURE_INODE_CRTIME

   

BD_FS_F2FS_FEATURE_LOST_FOUND

   

BD_FS_F2FS_FEATURE_VERITY

   

BD_FS_F2FS_FEATURE_SB_CHKSUM

   

BDFSReiserFSInfo

typedef struct {
    gchar *label;
    gchar *uuid;
    guint64 block_size;
    guint64 block_count;
    guint64 free_blocks;
} BDFSReiserFSInfo;

Members

gchar *label;

label of the filesystem

 

gchar *uuid;

uuid of the filesystem

 

guint64 block_size;

block size used by the filesystem

 

guint64 block_count;

number of blocks in the filesystem

 

guint64 free_blocks;

number of free blocks in the filesystem

 

BDFSNILFS2Info

typedef struct {
    gchar *label;
    gchar *uuid;
    guint64 size;
    guint64 block_size;
    guint64 free_blocks;
} BDFSNILFS2Info;

Members

gchar *label;

label of the filesystem

 

gchar *uuid;

uuid of the filesystem

 

guint64 size;

size of the filesystem

 

guint64 block_size;

block size used by the filesystem

 

guint64 free_blocks;

number of free blocks in the filesystem