loop-util: introduce loop_device_open_full()
This commit is contained in:
@@ -25,7 +25,10 @@ struct LoopDevice {
|
||||
|
||||
int loop_device_make(int fd, int open_flags, uint64_t offset, uint64_t size, uint32_t loop_flags, int lock_op, LoopDevice **ret);
|
||||
int loop_device_make_by_path(const char *path, int open_flags, uint32_t loop_flags, int lock_op, LoopDevice **ret);
|
||||
int loop_device_open(const char *loop_path, int open_flags, int lock_op, LoopDevice **ret);
|
||||
int loop_device_open_full(const char *loop_path, int loop_fd, int open_flags, int lock_op, LoopDevice **ret);
|
||||
static inline int loop_device_open(const char *loop_path, int open_flags, int lock_op, LoopDevice **ret) {
|
||||
return loop_device_open_full(loop_path, -1, open_flags, lock_op, ret);
|
||||
}
|
||||
|
||||
LoopDevice* loop_device_unref(LoopDevice *d);
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(LoopDevice*, loop_device_unref);
|
||||
|
||||
Reference in New Issue
Block a user