![]() |
![]() |
![]() |
libblockdev Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <swap.h> gboolean bd_swap_check_deps (); gboolean bd_swap_init (); void bd_swap_close (); GQuark bd_swap_error_quark (void
); #define BD_SWAP_ERROR enum BDSwapError; gboolean bd_swap_mkswap (const gchar *device
,const gchar *label
,const BDExtraArg **extra
,GError **error
); gboolean bd_swap_swapon (const gchar *device
,gint priority
,GError **error
); gboolean bd_swap_swapoff (const gchar *device
,GError **error
); gboolean bd_swap_swapstatus (const gchar *device
,GError **error
);
gboolean bd_swap_check_deps ();
Returns : |
whether the plugin's runtime dependencies are satisfied or not Function checking plugin's runtime dependencies. |
gboolean bd_swap_init ();
Initializes the plugin. **This function is called automatically by the library's initialization functions.**
void bd_swap_close ();
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
);
|
a device to create swap space on |
|
a label for the swap space device. [allow-none] |
|
extra options for the creation (right now passed to the 'mkswap' utility). [allow-none][array zero-terminated=1] |
|
place to store error (if any). [out] |
Returns : |
whether the swap space was successfully created or not |
gboolean bd_swap_swapon (const gchar *device
,gint priority
,GError **error
);
|
swap device to activate |
|
priority of the activated device or -1 to use the default |
|
place to store error (if any). [out] |
Returns : |
whether the swap device was successfully activated or not |
gboolean bd_swap_swapoff (const gchar *device
,GError **error
);
|
swap device to deactivate |
|
place to store error (if any). [out] |
Returns : |
whether the swap device was successfully deactivated or not |
gboolean bd_swap_swapstatus (const gchar *device
,GError **error
);
|
swap device to get status of |
|
place to store error (if any). [out] |
Returns : |
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) |