Top | ![]() |
![]() |
![]() |
![]() |
gboolean | bd_loop_check_deps () |
gboolean | bd_loop_init () |
void | bd_loop_close () |
GQuark | bd_loop_error_quark () |
gchar * | bd_loop_get_backing_file () |
gchar * | bd_loop_get_loop_name () |
gboolean | bd_loop_setup () |
gboolean | bd_loop_setup_from_fd () |
gboolean | bd_loop_teardown () |
gboolean | bd_loop_get_autoclear () |
gboolean | bd_loop_set_autoclear () |
A plugin for operations with loop devices. All sizes passed in/out to/from the functions are in bytes.
gboolean
bd_loop_init ();
Initializes the plugin. **This function is called automatically by the library's initialization functions.**
void
bd_loop_close ();
Cleans up after the plugin. **This function is called automatically by the library's functions that unload it.**
gchar * bd_loop_get_backing_file (const gchar *dev_name
,GError **error
);
gchar * bd_loop_get_loop_name (const gchar *file
,GError **error
);
gboolean bd_loop_setup (const gchar *file
,guint64 offset
,guint64 size
,gboolean read_only
,gboolean part_scan
,const gchar **loop_name
,GError **error
);
file |
file to setup as a loop device |
|
offset |
offset of the start of the device (in |
|
size |
maximum size of the device (or 0 to leave unspecified) |
|
read_only |
whether to setup as read-only ( |
|
part_scan |
whether to enforce partition scan on the newly created device or not |
|
loop_name |
if not |
[allow-none][out] |
error |
place to store error (if any). |
[out] |
gboolean bd_loop_setup_from_fd (gint fd
,guint64 offset
,guint64 size
,gboolean read_only
,gboolean part_scan
,const gchar **loop_name
,GError **error
);
fd |
file descriptor for a file to setup as a new loop device |
|
offset |
offset of the start of the device (in file given by |
|
size |
maximum size of the device (or 0 to leave unspecified) |
|
read_only |
whether to setup as read-only ( |
|
part_scan |
whether to enforce partition scan on the newly created device or not |
|
loop_name |
if not |
[allow-none][out] |
error |
place to store error (if any). |
[out] |
gboolean bd_loop_teardown (const gchar *loop
,GError **error
);