Top |
gboolean
bd_swap_init (void
);
Initializes the plugin. **This function is called automatically by the library's initialization functions.**
void
bd_swap_close (void
);
Cleans up after the plugin. **This function is called automatically by the library's functions that unload it.**
gboolean bd_swap_mkswap (const gchar *device
,const gchar *label
,const BDExtraArg **extra
,GError **error
);
device |
a device to create swap space on |
|
label |
a label for the swap space device. |
[nullable] |
extra |
extra options for the creation (right now passed to the 'mkswap' utility). |
[nullable][array zero-terminated=1] |
error |
place to store error (if any). |
[out][optional] |
whether the swap space was successfully created or not
Tech category: BD_SWAP_TECH_SWAP
-BD_SWAP_TECH_MODE_CREATE
gboolean bd_swap_swapon (const gchar *device
,gint priority
,GError **error
);
device |
swap device to activate |
|
priority |
priority of the activated device or -1 to use the default |
|
error |
place to store error (if any). |
[out][optional] |
whether the swap device was successfully activated or not
Tech category: BD_SWAP_TECH_SWAP
-BD_SWAP_TECH_MODE_ACTIVATE_DEACTIVATE
gboolean bd_swap_swapoff (const gchar *device
,GError **error
);
whether the swap device was successfully deactivated or not
Tech category: BD_SWAP_TECH_SWAP
-BD_SWAP_TECH_MODE_ACTIVATE_DEACTIVATE
gboolean bd_swap_swapstatus (const gchar *device
,GError **error
);
TRUE
if the swap device is active, FALSE
if not active or failed
to determine (error
) is set not a non-NULL value in such case)
Tech category: BD_SWAP_TECH_SWAP
-BD_SWAP_TECH_MODE_QUERY
gboolean bd_swap_set_label (const gchar *device
,const gchar *label
,GError **error
);
device |
a device to set label on |
|
label |
label that will be set |
|
error |
place to store error (if any). |
[out][optional] |
whether the label was successfully set or not
Tech category: BD_SWAP_TECH_SWAP
-BD_SWAP_TECH_MODE_SET_LABEL
gboolean bd_swap_is_tech_avail (BDSwapTech tech
,guint64 mode
,GError **error
);
tech |
the queried tech |
|
mode |
a bit mask of queried modes of operation (BDSwapTechMode) for |
|
error |
place to store error (details about why the |
[out][optional] |