Don't expose generic kernel API via libsystemd, but keep the code internal
for our own usage.
src/shared/copy.h \
src/shared/base-filesystem.c \
src/shared/base-filesystem.h \
src/shared/copy.h \
src/shared/base-filesystem.c \
src/shared/base-filesystem.h \
+ src/shared/memfd.c \
+ src/shared/memfd.h \
src/shared/nss-util.h
nodist_libsystemd_shared_la_SOURCES = \
src/shared/nss-util.h
nodist_libsystemd_shared_la_SOURCES = \
src/systemd/sd-bus.h \
src/systemd/sd-bus-protocol.h \
src/systemd/sd-bus-vtable.h \
src/systemd/sd-bus.h \
src/systemd/sd-bus-protocol.h \
src/systemd/sd-bus-vtable.h \
- src/systemd/sd-memfd.h \
src/systemd/sd-utf8.h \
src/systemd/sd-event.h \
src/systemd/sd-rtnl.h \
src/systemd/sd-utf8.h \
src/systemd/sd-event.h \
src/systemd/sd-rtnl.h \
src/libsystemd/sd-bus/bus-slot.h \
src/libsystemd/sd-bus/bus-protocol.h \
src/libsystemd/sd-bus/kdbus.h \
src/libsystemd/sd-bus/bus-slot.h \
src/libsystemd/sd-bus/bus-protocol.h \
src/libsystemd/sd-bus/kdbus.h \
- src/libsystemd/sd-bus/sd-memfd.c \
src/libsystemd/sd-utf8/sd-utf8.c \
src/libsystemd/sd-event/sd-event.c \
src/libsystemd/sd-event/event-util.h \
src/libsystemd/sd-utf8/sd-utf8.c \
src/libsystemd/sd-event/sd-event.c \
src/libsystemd/sd-event/event-util.h \
src/systemd/sd-bus.h \
src/systemd/sd-bus-protocol.h \
src/systemd/sd-bus-vtable.h \
src/systemd/sd-bus.h \
src/systemd/sd-bus-protocol.h \
src/systemd/sd-bus-vtable.h \
- src/systemd/sd-memfd.h \
src/systemd/sd-utf8.h \
src/systemd/sd-event.h \
src/systemd/sd-rtnl.h \
src/systemd/sd-utf8.h \
src/systemd/sd-event.h \
src/systemd/sd-rtnl.h \
sd_bus_track_first;
sd_bus_track_next;
sd_bus_track_first;
sd_bus_track_next;
- /* sd-memfd */
- sd_memfd_new;
- sd_memfd_new_and_map;
- sd_memfd_free;
- sd_memfd_get_fd;
- sd_memfd_get_file;
- sd_memfd_dup_fd;
- sd_memfd_map;
- sd_memfd_set_sealed;
- sd_memfd_get_sealed;
- sd_memfd_get_size;
- sd_memfd_set_size;
- sd_memfd_get_name;
-
/* sd-event */
sd_event_default;
sd_event_new;
/* sd-event */
sd_event_default;
sd_event_new;
#include "util.h"
#include "log.h"
#include "util.h"
#include "log.h"
#include "bus-message.h"
#include "bus-error.h"
#include "bus-kernel.h"
#include "bus-message.h"
#include "bus-error.h"
#include "bus-kernel.h"
#include "util.h"
#include "bus-label.h"
#include "missing.h"
#include "util.h"
#include "bus-label.h"
#include "missing.h"
#include "sd-bus.h"
struct sd_memfd {
#include "sd-bus.h"
struct sd_memfd {
-_public_ int sd_memfd_new(sd_memfd **m, const char *name) {
+int sd_memfd_new(sd_memfd **m, const char *name) {
_cleanup_close_ int kdbus = -1;
_cleanup_free_ char *g = NULL;
_cleanup_close_ int kdbus = -1;
_cleanup_free_ char *g = NULL;
-_public_ int sd_memfd_new_from_fd(sd_memfd **m, int fd) {
+int sd_memfd_new_from_fd(sd_memfd **m, int fd) {
sd_memfd *n;
assert_return(m, -EINVAL);
sd_memfd *n;
assert_return(m, -EINVAL);
-_public_ void sd_memfd_free(sd_memfd *m) {
+void sd_memfd_free(sd_memfd *m) {
-_public_ int sd_memfd_get_fd(sd_memfd *m) {
+int sd_memfd_get_fd(sd_memfd *m) {
assert_return(m, -EINVAL);
return m->fd;
}
assert_return(m, -EINVAL);
return m->fd;
}
-_public_ int sd_memfd_get_file(sd_memfd *m, FILE **f) {
+int sd_memfd_get_file(sd_memfd *m, FILE **f) {
assert_return(m, -EINVAL);
assert_return(f, -EINVAL);
assert_return(m, -EINVAL);
assert_return(f, -EINVAL);
-_public_ int sd_memfd_dup_fd(sd_memfd *m) {
+int sd_memfd_dup_fd(sd_memfd *m) {
int fd;
assert_return(m, -EINVAL);
int fd;
assert_return(m, -EINVAL);
-_public_ int sd_memfd_map(sd_memfd *m, uint64_t offset, size_t size, void **p) {
+int sd_memfd_map(sd_memfd *m, uint64_t offset, size_t size, void **p) {
-_public_ int sd_memfd_set_sealed(sd_memfd *m) {
+int sd_memfd_set_sealed(sd_memfd *m) {
int r;
assert_return(m, -EINVAL);
int r;
assert_return(m, -EINVAL);
-_public_ int sd_memfd_get_sealed(sd_memfd *m) {
+int sd_memfd_get_sealed(sd_memfd *m) {
int r;
assert_return(m, -EINVAL);
int r;
assert_return(m, -EINVAL);
(F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE);
}
(F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE);
}
-_public_ int sd_memfd_get_size(sd_memfd *m, uint64_t *sz) {
+int sd_memfd_get_size(sd_memfd *m, uint64_t *sz) {
-_public_ int sd_memfd_set_size(sd_memfd *m, uint64_t sz) {
+int sd_memfd_set_size(sd_memfd *m, uint64_t sz) {
int r;
assert_return(m, -EINVAL);
int r;
assert_return(m, -EINVAL);
-_public_ int sd_memfd_new_and_map(sd_memfd **m, const char *name, size_t sz, void **p) {
+int sd_memfd_new_and_map(sd_memfd **m, const char *name, size_t sz, void **p) {
-_public_ int sd_memfd_get_name(sd_memfd *m, char **name) {
+int sd_memfd_get_name(sd_memfd *m, char **name) {
char path[sizeof("/proc/self/fd/") + DECIMAL_STR_MAX(int)], buf[FILENAME_MAX+1], *e;
const char *delim, *end;
_cleanup_free_ char *n = NULL;
char path[sizeof("/proc/self/fd/") + DECIMAL_STR_MAX(int)], buf[FILENAME_MAX+1], *e;
const char *delim, *end;
_cleanup_free_ char *n = NULL;
#include "sd-id128.h"
#include "sd-event.h"
#include "sd-id128.h"
#include "sd-event.h"
#include "_sd-common.h"
_SD_BEGIN_DECLARATIONS;
#include "_sd-common.h"
_SD_BEGIN_DECLARATIONS;