data-fd-util: add new memfd_clone_fd() helper

This adds a new helper for cloning any file's contents (or block device contents) into a new memfd.
This commit is contained in:
Lennart Poettering
2022-12-08 12:47:01 +01:00
parent 0254e4d66a
commit 6bea3d8e0f
2 changed files with 53 additions and 0 deletions
+1
View File
@@ -5,3 +5,4 @@
int acquire_data_fd(const void *data, size_t size, unsigned flags);
int copy_data_fd(int fd);
int memfd_clone_fd(int fd, const char *name, int mode);