2013-05-10 14:34:57 +02:00
|
|
|
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
|
|
|
|
2014-08-18 12:57:03 +02:00
|
|
|
#pragma once
|
2013-05-10 14:34:57 +02:00
|
|
|
|
|
|
|
/***
|
|
|
|
This file is part of systemd.
|
|
|
|
|
|
|
|
Copyright 2013 Lennart Poettering
|
|
|
|
|
|
|
|
systemd is free software; you can redistribute it and/or modify it
|
|
|
|
under the terms of the GNU Lesser General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2.1 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
systemd is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
|
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
***/
|
|
|
|
|
2015-10-25 13:14:12 +01:00
|
|
|
#include <inttypes.h>
|
2015-11-30 21:43:37 +01:00
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
2015-11-18 22:46:33 +01:00
|
|
|
#include <sys/types.h>
|
2013-05-10 14:34:57 +02:00
|
|
|
|
2014-08-19 19:39:16 +02:00
|
|
|
int memfd_new(const char *name);
|
|
|
|
int memfd_new_and_map(const char *name, size_t sz, void **p);
|
2013-05-10 14:34:57 +02:00
|
|
|
|
2014-08-18 13:28:43 +02:00
|
|
|
int memfd_map(int fd, uint64_t offset, size_t size, void **p);
|
2013-05-10 14:34:57 +02:00
|
|
|
|
2014-08-18 13:28:43 +02:00
|
|
|
int memfd_set_sealed(int fd);
|
|
|
|
int memfd_get_sealed(int fd);
|
2013-05-10 14:34:57 +02:00
|
|
|
|
2014-08-18 13:28:43 +02:00
|
|
|
int memfd_get_size(int fd, uint64_t *sz);
|
|
|
|
int memfd_set_size(int fd, uint64_t sz);
|