]> git.ipfire.org Git - thirdparty/systemd.git/commit
loop-util: Add loop_device_make_by_path_at() 26949/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 23 Mar 2023 13:42:35 +0000 (14:42 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 23 Mar 2023 16:36:17 +0000 (17:36 +0100)
commit972c8db589f1f031d1fbbe01d821ddb1795fe285
tree0cdbb576e106733593f3ffddb02a518f32073a99
parent06ca2db39dc959a5b40690b309417d66659061ad
loop-util: Add loop_device_make_by_path_at()

On top of taking a directory file descriptor, we use xopenat() so
that the function can also be used to work on existing file
descriptors to image files including all the logic to use O_DIRECT
and fallback to O_RDONLY if needed.
src/shared/loop-util.c
src/shared/loop-util.h