![]() |
![]() |
![]() |
libblockdev Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <loop.h> GQuark bd_loop_error_quark (void
); #define BD_LOOP_ERROR enum BDLoopError; gchar * bd_loop_get_backing_file (gchar *dev_name
,GError **error
); gchar * bd_loop_get_loop_name (gchar *file
,GError **error
); gboolean bd_loop_setup (gchar *file
,gchar **loop_name
,GError **error
); gboolean bd_loop_teardown (gchar *loop
,GError **error
);
A plugin for operations with loop devices. All sizes passed in/out to/from the functions are in bytes.
gchar * bd_loop_get_backing_file (gchar *dev_name
,GError **error
);
|
name of the loop device to get backing file for (e.g. "loop0") |
|
place to store error (if any). [out] |
Returns : |
path of the device's backing file or NULL if none
is found. [transfer full]
|
gchar * bd_loop_get_loop_name (gchar *file
,GError **error
);
|
path of the backing file to get loop name for |
|
place to store error (if any). [out] |
Returns : |
name of the loop device associated with the given file . [transfer full]
|
gboolean bd_loop_setup (gchar *file
,gchar **loop_name
,GError **error
);
|
file to setup as a loop device |
|
if not NULL , it is used to store the name of the loop device. [out]
|
|
place to store error (if any). [out] |
Returns : |
whether the file was successfully setup as a loop device or not |