chiark / gitweb /
memfd: drop memfd_get_name() as it is unused
[elogind.git] / src / shared / memfd.h
index 6de045c1d77f94d28ca9fda8b11a9bcb67afe81d..cf588fe02f4fcf29ecaa707a19239fca739b2bdf 100644 (file)
@@ -1,7 +1,6 @@
 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
-#ifndef foosdmemfdhfoo
-#define foosdmemfdhfoo
+#pragma once
 
 /***
   This file is part of systemd.
 #include <sys/types.h>
 #include <stdio.h>
 
-#include "_sd-common.h"
+#include "macro.h"
+#include "util.h"
 
-_SD_BEGIN_DECLARATIONS;
+int memfd_new(const char *name);
+int memfd_new_and_map(const char *name, size_t sz, void **p);
 
-typedef struct sd_memfd sd_memfd;
+int memfd_map(int fd, uint64_t offset, size_t size, void **p);
 
-int sd_memfd_new(sd_memfd **m, const char *name);
-int sd_memfd_new_from_fd(sd_memfd **m, int fd);
-int sd_memfd_new_and_map(sd_memfd **m, const char *name, size_t sz, void **p);
+int memfd_set_sealed(int fd);
+int memfd_get_sealed(int fd);
 
-void sd_memfd_free(sd_memfd *m);
-
-int sd_memfd_get_fd(sd_memfd *m);
-int sd_memfd_dup_fd(sd_memfd *n);
-int sd_memfd_get_file(sd_memfd *m, FILE **f);
-
-int sd_memfd_map(sd_memfd *m, uint64_t offset, size_t size, void **p);
-
-int sd_memfd_set_sealed(sd_memfd *m);
-int sd_memfd_get_sealed(sd_memfd *m);
-
-int sd_memfd_get_size(sd_memfd *m, uint64_t *sz);
-int sd_memfd_set_size(sd_memfd *m, uint64_t sz);
-
-int sd_memfd_get_name(sd_memfd *m, char **name);
-
-_SD_END_DECLARATIONS;
-
-#endif
+int memfd_get_size(int fd, uint64_t *sz);
+int memfd_set_size(int fd, uint64_t sz);