loop-util: add API to refresh loopback device size and opening existing loopback block devices

This commit is contained in:
Lennart Poettering
2019-12-02 10:05:38 +01:00
parent e08f94acf5
commit 9dabc4fda5
2 changed files with 53 additions and 0 deletions
+3
View File
@@ -16,8 +16,11 @@ struct LoopDevice {
int loop_device_make(int fd, int open_flags, uint32_t loop_flags, LoopDevice **ret);
int loop_device_make_by_path(const char *path, int open_flags, uint32_t loop_flags, LoopDevice **ret);
int loop_device_open(const char *loop_path, int open_flags, LoopDevice **ret);
LoopDevice* loop_device_unref(LoopDevice *d);
DEFINE_TRIVIAL_CLEANUP_FUNC(LoopDevice*, loop_device_unref);
void loop_device_relinquish(LoopDevice *d);
int loop_device_refresh_size(LoopDevice *d);