mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
memfd: internalize functions, drop sd_memfd type
Remove the sd_ prefix from internal functions and get rid of the sd_memfd type. As a memfd is now just a native file descriptor, we can get rid of our own wrapper type, and also use close() and dup() on them directly.
This commit is contained in:
parent
8a02decaf1
commit
fac9c0d508
|
@ -68,7 +68,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
<funcdef>int sd_bus_message_append_array_memfd</funcdef>
|
<funcdef>int sd_bus_message_append_array_memfd</funcdef>
|
||||||
<paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
|
<paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
|
||||||
<paramdef>char <parameter>type</parameter></paramdef>
|
<paramdef>char <parameter>type</parameter></paramdef>
|
||||||
<paramdef>sd_memfd *<parameter>memfd</parameter></paramdef>
|
<paramdef>int <parameter>memfd</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
|
|
|
@ -58,7 +58,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int sd_bus_message_append_string_memfd</funcdef>
|
<funcdef>int sd_bus_message_append_string_memfd</funcdef>
|
||||||
<paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
|
<paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
|
||||||
<paramdef>sd_memfd *<parameter>memfd</parameter></paramdef>
|
<paramdef>int <parameter>memfd</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
|
|
|
@ -2527,7 +2527,7 @@ _public_ int sd_bus_message_append_array_iovec(
|
||||||
|
|
||||||
_public_ int sd_bus_message_append_array_memfd(sd_bus_message *m,
|
_public_ int sd_bus_message_append_array_memfd(sd_bus_message *m,
|
||||||
char type,
|
char type,
|
||||||
sd_memfd *memfd) {
|
int memfd) {
|
||||||
_cleanup_close_ int copy_fd = -1;
|
_cleanup_close_ int copy_fd = -1;
|
||||||
struct bus_body_part *part;
|
struct bus_body_part *part;
|
||||||
ssize_t align, sz;
|
ssize_t align, sz;
|
||||||
|
@ -2537,7 +2537,7 @@ _public_ int sd_bus_message_append_array_memfd(sd_bus_message *m,
|
||||||
|
|
||||||
if (!m)
|
if (!m)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (!memfd)
|
if (memfd < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (m->sealed)
|
if (m->sealed)
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
@ -2546,15 +2546,15 @@ _public_ int sd_bus_message_append_array_memfd(sd_bus_message *m,
|
||||||
if (m->poisoned)
|
if (m->poisoned)
|
||||||
return -ESTALE;
|
return -ESTALE;
|
||||||
|
|
||||||
r = sd_memfd_set_sealed(memfd);
|
r = memfd_set_sealed(memfd);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
copy_fd = sd_memfd_dup_fd(memfd);
|
copy_fd = dup(memfd);
|
||||||
if (copy_fd < 0)
|
if (copy_fd < 0)
|
||||||
return copy_fd;
|
return copy_fd;
|
||||||
|
|
||||||
r = sd_memfd_get_size(memfd, &size);
|
r = memfd_get_size(memfd, &size);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
@ -2593,7 +2593,7 @@ _public_ int sd_bus_message_append_array_memfd(sd_bus_message *m,
|
||||||
return sd_bus_message_close_container(m);
|
return sd_bus_message_close_container(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
_public_ int sd_bus_message_append_string_memfd(sd_bus_message *m, sd_memfd *memfd) {
|
_public_ int sd_bus_message_append_string_memfd(sd_bus_message *m, int memfd) {
|
||||||
_cleanup_close_ int copy_fd = -1;
|
_cleanup_close_ int copy_fd = -1;
|
||||||
struct bus_body_part *part;
|
struct bus_body_part *part;
|
||||||
struct bus_container *c;
|
struct bus_container *c;
|
||||||
|
@ -2602,19 +2602,19 @@ _public_ int sd_bus_message_append_string_memfd(sd_bus_message *m, sd_memfd *mem
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
assert_return(m, -EINVAL);
|
assert_return(m, -EINVAL);
|
||||||
assert_return(memfd, -EINVAL);
|
assert_return(memfd >= 0, -EINVAL);
|
||||||
assert_return(!m->sealed, -EPERM);
|
assert_return(!m->sealed, -EPERM);
|
||||||
assert_return(!m->poisoned, -ESTALE);
|
assert_return(!m->poisoned, -ESTALE);
|
||||||
|
|
||||||
r = sd_memfd_set_sealed(memfd);
|
r = memfd_set_sealed(memfd);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
copy_fd = sd_memfd_dup_fd(memfd);
|
copy_fd = dup(memfd);
|
||||||
if (copy_fd < 0)
|
if (copy_fd < 0)
|
||||||
return copy_fd;
|
return copy_fd;
|
||||||
|
|
||||||
r = sd_memfd_get_size(memfd, &size);
|
r = memfd_get_size(memfd, &size);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ int main(int argc, char *argv[]) {
|
||||||
sd_bus *a, *b;
|
sd_bus *a, *b;
|
||||||
int r, bus_ref;
|
int r, bus_ref;
|
||||||
sd_bus_message *m;
|
sd_bus_message *m;
|
||||||
sd_memfd *f;
|
int f;
|
||||||
uint64_t sz;
|
uint64_t sz;
|
||||||
uint32_t u32;
|
uint32_t u32;
|
||||||
size_t i, l;
|
size_t i, l;
|
||||||
|
@ -93,7 +93,7 @@ int main(int argc, char *argv[]) {
|
||||||
memset(p+1, 'L', FIRST_ARRAY-2);
|
memset(p+1, 'L', FIRST_ARRAY-2);
|
||||||
p[FIRST_ARRAY-1] = '>';
|
p[FIRST_ARRAY-1] = '>';
|
||||||
|
|
||||||
r = sd_memfd_new_and_map(&f, NULL, STRING_SIZE, (void**) &s);
|
r = memfd_new_and_map(&f, NULL, STRING_SIZE, (void**) &s);
|
||||||
assert_se(r >= 0);
|
assert_se(r >= 0);
|
||||||
|
|
||||||
s[0] = '<';
|
s[0] = '<';
|
||||||
|
@ -103,16 +103,16 @@ int main(int argc, char *argv[]) {
|
||||||
s[STRING_SIZE-1] = 0;
|
s[STRING_SIZE-1] = 0;
|
||||||
munmap(s, STRING_SIZE);
|
munmap(s, STRING_SIZE);
|
||||||
|
|
||||||
r = sd_memfd_get_size(f, &sz);
|
r = memfd_get_size(f, &sz);
|
||||||
assert_se(r >= 0);
|
assert_se(r >= 0);
|
||||||
assert_se(sz == STRING_SIZE);
|
assert_se(sz == STRING_SIZE);
|
||||||
|
|
||||||
r = sd_bus_message_append_string_memfd(m, f);
|
r = sd_bus_message_append_string_memfd(m, f);
|
||||||
assert_se(r >= 0);
|
assert_se(r >= 0);
|
||||||
|
|
||||||
sd_memfd_free(f);
|
close(f);
|
||||||
|
|
||||||
r = sd_memfd_new_and_map(&f, NULL, SECOND_ARRAY, (void**) &p);
|
r = memfd_new_and_map(&f, NULL, SECOND_ARRAY, (void**) &p);
|
||||||
assert_se(r >= 0);
|
assert_se(r >= 0);
|
||||||
|
|
||||||
p[0] = '<';
|
p[0] = '<';
|
||||||
|
@ -120,14 +120,14 @@ int main(int argc, char *argv[]) {
|
||||||
p[SECOND_ARRAY-1] = '>';
|
p[SECOND_ARRAY-1] = '>';
|
||||||
munmap(p, SECOND_ARRAY);
|
munmap(p, SECOND_ARRAY);
|
||||||
|
|
||||||
r = sd_memfd_get_size(f, &sz);
|
r = memfd_get_size(f, &sz);
|
||||||
assert_se(r >= 0);
|
assert_se(r >= 0);
|
||||||
assert_se(sz == SECOND_ARRAY);
|
assert_se(sz == SECOND_ARRAY);
|
||||||
|
|
||||||
r = sd_bus_message_append_array_memfd(m, 'y', f);
|
r = sd_bus_message_append_array_memfd(m, 'y', f);
|
||||||
assert_se(r >= 0);
|
assert_se(r >= 0);
|
||||||
|
|
||||||
sd_memfd_free(f);
|
close(f);
|
||||||
|
|
||||||
r = sd_bus_message_close_container(m);
|
r = sd_bus_message_close_container(m);
|
||||||
assert_se(r >= 0);
|
assert_se(r >= 0);
|
||||||
|
|
|
@ -32,17 +32,12 @@
|
||||||
|
|
||||||
#include "sd-bus.h"
|
#include "sd-bus.h"
|
||||||
|
|
||||||
struct sd_memfd {
|
int memfd_new(int *fd, const char *name) {
|
||||||
int fd;
|
|
||||||
FILE *f;
|
|
||||||
};
|
|
||||||
|
|
||||||
int sd_memfd_new(sd_memfd **m, const char *name) {
|
|
||||||
|
|
||||||
_cleanup_free_ char *g = NULL;
|
_cleanup_free_ char *g = NULL;
|
||||||
sd_memfd *n;
|
int n;
|
||||||
|
|
||||||
assert_return(m, -EINVAL);
|
assert_return(fd, -EINVAL);
|
||||||
|
|
||||||
if (name) {
|
if (name) {
|
||||||
/* The kernel side is pretty picky about the character
|
/* The kernel side is pretty picky about the character
|
||||||
|
@ -81,105 +76,30 @@ int sd_memfd_new(sd_memfd **m, const char *name) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
n = new0(struct sd_memfd, 1);
|
n = memfd_create(name, MFD_ALLOW_SEALING);
|
||||||
if (!n)
|
if (n < 0)
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
n->fd = memfd_create(name, MFD_ALLOW_SEALING);
|
|
||||||
if (n->fd < 0) {
|
|
||||||
free(n);
|
|
||||||
return -errno;
|
|
||||||
}
|
|
||||||
|
|
||||||
*m = n;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int sd_memfd_new_from_fd(sd_memfd **m, int fd) {
|
|
||||||
sd_memfd *n;
|
|
||||||
int r;
|
|
||||||
|
|
||||||
assert_return(m, -EINVAL);
|
|
||||||
assert_return(fd >= 0, -EINVAL);
|
|
||||||
|
|
||||||
/* Check if this is a sealable fd. The kernel sets F_SEAL_SEAL on memfds
|
|
||||||
* that don't support sealing, so check for that, too. A file with
|
|
||||||
* *only* F_SEAL_SEAL set is the same as a random shmem file, so no
|
|
||||||
* reason to allow opening it as memfd. */
|
|
||||||
r = fcntl(fd, F_GET_SEALS);
|
|
||||||
if (r < 0 || r == F_SEAL_SEAL)
|
|
||||||
return -ENOTTY;
|
|
||||||
|
|
||||||
n = new0(struct sd_memfd, 1);
|
|
||||||
if (!n)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
n->fd = fd;
|
|
||||||
*m = n;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void sd_memfd_free(sd_memfd *m) {
|
|
||||||
if (!m)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (m->f)
|
|
||||||
fclose(m->f);
|
|
||||||
else
|
|
||||||
safe_close(m->fd);
|
|
||||||
|
|
||||||
free(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
int sd_memfd_get_fd(sd_memfd *m) {
|
|
||||||
assert_return(m, -EINVAL);
|
|
||||||
|
|
||||||
return m->fd;
|
|
||||||
}
|
|
||||||
|
|
||||||
int sd_memfd_get_file(sd_memfd *m, FILE **f) {
|
|
||||||
assert_return(m, -EINVAL);
|
|
||||||
assert_return(f, -EINVAL);
|
|
||||||
|
|
||||||
if (!m->f) {
|
|
||||||
m->f = fdopen(m->fd, "r+");
|
|
||||||
if (!m->f)
|
|
||||||
return -errno;
|
|
||||||
}
|
|
||||||
|
|
||||||
*f = m->f;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int sd_memfd_dup_fd(sd_memfd *m) {
|
|
||||||
int fd;
|
|
||||||
|
|
||||||
assert_return(m, -EINVAL);
|
|
||||||
|
|
||||||
fd = fcntl(m->fd, F_DUPFD_CLOEXEC, 3);
|
|
||||||
if (fd < 0)
|
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
return fd;
|
*fd = n;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sd_memfd_map(sd_memfd *m, uint64_t offset, size_t size, void **p) {
|
int memfd_map(int fd, uint64_t offset, size_t size, void **p) {
|
||||||
void *q;
|
void *q;
|
||||||
int sealed;
|
int sealed;
|
||||||
|
|
||||||
assert_return(m, -EINVAL);
|
assert_return(fd >= 0, -EINVAL);
|
||||||
assert_return(size > 0, -EINVAL);
|
assert_return(size > 0, -EINVAL);
|
||||||
assert_return(p, -EINVAL);
|
assert_return(p, -EINVAL);
|
||||||
|
|
||||||
sealed = sd_memfd_get_sealed(m);
|
sealed = memfd_get_sealed(fd);
|
||||||
if (sealed < 0)
|
if (sealed < 0)
|
||||||
return sealed;
|
return sealed;
|
||||||
|
|
||||||
if (sealed)
|
if (sealed)
|
||||||
q = mmap(NULL, size, PROT_READ, MAP_PRIVATE, m->fd, offset);
|
q = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, offset);
|
||||||
else
|
else
|
||||||
q = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, m->fd, offset);
|
q = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, offset);
|
||||||
|
|
||||||
if (q == MAP_FAILED)
|
if (q == MAP_FAILED)
|
||||||
return -errno;
|
return -errno;
|
||||||
|
@ -188,24 +108,24 @@ int sd_memfd_map(sd_memfd *m, uint64_t offset, size_t size, void **p) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sd_memfd_set_sealed(sd_memfd *m) {
|
int memfd_set_sealed(int fd) {
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
assert_return(m, -EINVAL);
|
assert_return(fd >= 0, -EINVAL);
|
||||||
|
|
||||||
r = fcntl(m->fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE);
|
r = fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sd_memfd_get_sealed(sd_memfd *m) {
|
int memfd_get_sealed(int fd) {
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
assert_return(m, -EINVAL);
|
assert_return(fd >= 0, -EINVAL);
|
||||||
|
|
||||||
r = fcntl(m->fd, F_GET_SEALS);
|
r = fcntl(fd, F_GET_SEALS);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
|
@ -213,14 +133,14 @@ int sd_memfd_get_sealed(sd_memfd *m) {
|
||||||
(F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE);
|
(F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int sd_memfd_get_size(sd_memfd *m, uint64_t *sz) {
|
int memfd_get_size(int fd, uint64_t *sz) {
|
||||||
int r;
|
int r;
|
||||||
struct stat stat;
|
struct stat stat;
|
||||||
|
|
||||||
assert_return(m, -EINVAL);
|
assert_return(fd >= 0, -EINVAL);
|
||||||
assert_return(sz, -EINVAL);
|
assert_return(sz, -EINVAL);
|
||||||
|
|
||||||
r = fstat(m->fd, &stat);
|
r = fstat(fd, &stat);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
|
@ -228,49 +148,49 @@ int sd_memfd_get_size(sd_memfd *m, uint64_t *sz) {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sd_memfd_set_size(sd_memfd *m, uint64_t sz) {
|
int memfd_set_size(int fd, uint64_t sz) {
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
assert_return(m, -EINVAL);
|
assert_return(fd >= 0, -EINVAL);
|
||||||
|
|
||||||
r = ftruncate(m->fd, sz);
|
r = ftruncate(fd, sz);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sd_memfd_new_and_map(sd_memfd **m, const char *name, size_t sz, void **p) {
|
int memfd_new_and_map(int *fd, const char *name, size_t sz, void **p) {
|
||||||
_cleanup_(sd_memfd_freep) sd_memfd *n = NULL;
|
_cleanup_close_ int n = -1;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
r = sd_memfd_new(&n, name);
|
r = memfd_new(&n, name);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
r = sd_memfd_set_size(n, sz);
|
r = memfd_set_size(n, sz);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
r = sd_memfd_map(n, 0, sz, p);
|
r = memfd_map(n, 0, sz, p);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
*m = n;
|
*fd = n;
|
||||||
n = NULL;
|
n = -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sd_memfd_get_name(sd_memfd *m, char **name) {
|
int memfd_get_name(int fd, char **name) {
|
||||||
char path[sizeof("/proc/self/fd/") + DECIMAL_STR_MAX(int)], buf[FILENAME_MAX+1], *e;
|
char path[sizeof("/proc/self/fd/") + DECIMAL_STR_MAX(int)], buf[FILENAME_MAX+1], *e;
|
||||||
const char *delim, *end;
|
const char *delim, *end;
|
||||||
_cleanup_free_ char *n = NULL;
|
_cleanup_free_ char *n = NULL;
|
||||||
ssize_t k;
|
ssize_t k;
|
||||||
|
|
||||||
assert_return(m, -EINVAL);
|
assert_return(fd >= 0, -EINVAL);
|
||||||
assert_return(name, -EINVAL);
|
assert_return(name, -EINVAL);
|
||||||
|
|
||||||
sprintf(path, "/proc/self/fd/%i", m->fd);
|
sprintf(path, "/proc/self/fd/%i", fd);
|
||||||
|
|
||||||
k = readlink(path, buf, sizeof(buf));
|
k = readlink(path, buf, sizeof(buf));
|
||||||
if (k < 0)
|
if (k < 0)
|
||||||
|
|
|
@ -27,26 +27,15 @@
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
typedef struct sd_memfd sd_memfd;
|
int memfd_new(int *fd, const char *name);
|
||||||
|
int memfd_new_and_map(int *fd, const char *name, size_t sz, void **p);
|
||||||
|
|
||||||
int sd_memfd_new(sd_memfd **m, const char *name);
|
int memfd_map(int fd, uint64_t offset, size_t size, void **p);
|
||||||
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);
|
|
||||||
|
|
||||||
void sd_memfd_free(sd_memfd *m);
|
int memfd_set_sealed(int fd);
|
||||||
|
int memfd_get_sealed(int fd);
|
||||||
|
|
||||||
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_memfd*, sd_memfd_free);
|
int memfd_get_size(int fd, uint64_t *sz);
|
||||||
|
int memfd_set_size(int fd, uint64_t sz);
|
||||||
|
|
||||||
int sd_memfd_get_fd(sd_memfd *m);
|
int memfd_get_name(int fd, char **name);
|
||||||
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);
|
|
||||||
|
|
|
@ -226,10 +226,10 @@ int sd_bus_message_append_basic(sd_bus_message *m, char type, const void *p);
|
||||||
int sd_bus_message_append_array(sd_bus_message *m, char type, const void *ptr, size_t size);
|
int sd_bus_message_append_array(sd_bus_message *m, char type, const void *ptr, size_t size);
|
||||||
int sd_bus_message_append_array_space(sd_bus_message *m, char type, size_t size, void **ptr);
|
int sd_bus_message_append_array_space(sd_bus_message *m, char type, size_t size, void **ptr);
|
||||||
int sd_bus_message_append_array_iovec(sd_bus_message *m, char type, const struct iovec *iov, unsigned n);
|
int sd_bus_message_append_array_iovec(sd_bus_message *m, char type, const struct iovec *iov, unsigned n);
|
||||||
int sd_bus_message_append_array_memfd(sd_bus_message *m, char type, sd_memfd *memfd);
|
int sd_bus_message_append_array_memfd(sd_bus_message *m, char type, int memfd);
|
||||||
int sd_bus_message_append_string_space(sd_bus_message *m, size_t size, char **s);
|
int sd_bus_message_append_string_space(sd_bus_message *m, size_t size, char **s);
|
||||||
int sd_bus_message_append_string_iovec(sd_bus_message *m, const struct iovec *iov, unsigned n);
|
int sd_bus_message_append_string_iovec(sd_bus_message *m, const struct iovec *iov, unsigned n);
|
||||||
int sd_bus_message_append_string_memfd(sd_bus_message *m, sd_memfd* memfd);
|
int sd_bus_message_append_string_memfd(sd_bus_message *m, int memfd);
|
||||||
int sd_bus_message_append_strv(sd_bus_message *m, char **l);
|
int sd_bus_message_append_strv(sd_bus_message *m, char **l);
|
||||||
int sd_bus_message_open_container(sd_bus_message *m, char type, const char *contents);
|
int sd_bus_message_open_container(sd_bus_message *m, char type, const char *contents);
|
||||||
int sd_bus_message_close_container(sd_bus_message *m);
|
int sd_bus_message_close_container(sd_bus_message *m);
|
||||||
|
|
Loading…
Reference in a new issue