summaryrefslogtreecommitdiffstats
path: root/src/shared/data-fd-util.h
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-03-12 08:10:03 +0100
committerMike Yuan <me@yhndnzj.com>2024-03-12 09:42:48 +0100
commit7799e7d9f0d57966c4d1bf195b6caf04f8e426fa (patch)
tree0df767a55e1b33a1daff216c0d2e030af85a1316 /src/shared/data-fd-util.h
parentfileio,data-fd-util: use U64_* more (diff)
downloadsystemd-7799e7d9f0d57966c4d1bf195b6caf04f8e426fa.tar.xz
systemd-7799e7d9f0d57966c4d1bf195b6caf04f8e426fa.zip
data-fd-util: some modernization
Diffstat (limited to 'src/shared/data-fd-util.h')
-rw-r--r--src/shared/data-fd-util.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/data-fd-util.h b/src/shared/data-fd-util.h
index 6d99209421..2e073ee45e 100644
--- a/src/shared/data-fd-util.h
+++ b/src/shared/data-fd-util.h
@@ -3,14 +3,14 @@
#include <stddef.h>
-enum {
+typedef enum DataFDFlags {
ACQUIRE_NO_DEV_NULL = 1 << 0,
ACQUIRE_NO_MEMFD = 1 << 1,
ACQUIRE_NO_PIPE = 1 << 2,
ACQUIRE_NO_TMPFILE = 1 << 3,
ACQUIRE_NO_REGULAR = 1 << 4,
-};
+} DataFDFlags;
-int acquire_data_fd(const void *data, size_t size, unsigned flags);
+int acquire_data_fd(const void *data, size_t size, DataFDFlags flags);
int copy_data_fd(int fd);
int memfd_clone_fd(int fd, const char *name, int mode);