chiark / gitweb /
b0e058b5e730649f5f9483fdf5f653339376e817
[elogind.git] / src / basic / memfd-util.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5   Copyright 2013 Lennart Poettering
6 ***/
7
8 #include <inttypes.h>
9 #include <stddef.h>
10 #include <stdint.h>
11 #include <sys/types.h>
12
13 int memfd_new(const char *name);
14 #if 0 /// UNNEEDED by elogind
15 int memfd_new_and_map(const char *name, size_t sz, void **p);
16
17 int memfd_map(int fd, uint64_t offset, size_t size, void **p);
18 #endif // 0
19
20 int memfd_set_sealed(int fd);
21 #if 0 /// UNNEEDED by elogind
22 int memfd_get_sealed(int fd);
23 #endif // 0
24
25 int memfd_get_size(int fd, uint64_t *sz);
26 int memfd_set_size(int fd, uint64_t sz);