missing.h revision 9388e99e208a6487b26dcbda86005ee9eba8d93d
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering This file is part of systemd.
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering Copyright 2010 Lennart Poettering
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering systemd is free software; you can redistribute it and/or modify it
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering under the terms of the GNU Lesser General Public License as published by
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering (at your option) any later version.
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering systemd is distributed in the hope that it will be useful, but
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering Lesser General Public License for more details.
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón You should have received a copy of the GNU Lesser General Public License
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón along with systemd; If not, see <http://www.gnu.org/licenses/>.
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón/* Missing glibc definitions to access certain kernel APIs */
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien Nocera#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
1c7dde3e475978c569a982d65fd86d4b4e3caad8Bastien Nocera#define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
86b2e20a5e5abf222fb81edcb5d58d012e35cbaaLennart Poettering#define AUDIT_SERVICE_START 1130 /* Service (daemon) start */
c1c02e07ed87e027a6364c4f4aa2468796ca1c56Dave Reisner#define AUDIT_SERVICE_STOP 1131 /* Service (daemon) stop */
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-Szmekstatic inline int pivot_root(const char *new_root, const char *put_old) {
fe1fed02c7637a2c18cd575f78be7fda27972148Zbigniew Jędrzejewski-Szmek return syscall(SYS_pivot_root, new_root, put_old);
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-Szmek# elif _MIPS_SIM == _MIPS_SIM_NABI32
732bfe09aeffc3cd78b80ee9e20c9c3babd944d6Zbigniew Jędrzejewski-Szmek# elif _MIPS_SIM == _MIPS_SIM_ABI64
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringstatic inline int fanotify_init(unsigned int flags, unsigned int event_f_flags) {
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering return syscall(__NR_fanotify_init, flags, event_f_flags);
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringstatic inline int fanotify_mark(int fanotify_fd, unsigned int flags, uint64_t mask,
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering#if defined _MIPS_SIM && _MIPS_SIM == _MIPS_SIM_ABI32 || defined __powerpc__ && !defined __powerpc64__
d200735e13c52dcfe36c0e066f9f6c2fbfb85a9cMichal Schmidt return syscall(__NR_fanotify_mark, fanotify_fd, flags,
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering _mask._32[0], _mask._32[1], dfd, pathname);
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering return syscall(__NR_fanotify_mark, fanotify_fd, flags, mask, dfd, pathname);
5a45a93627609451784a04366cfa1150d32611d1Lennart Poettering#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, struct btrfs_ioctl_vol_args)
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmekstatic inline pid_t gettid(void) {
c937e0d5c579863677e0fcb5508517f7714c332dZbigniew Jędrzejewski-Szmek return (pid_t) syscall(SYS_gettid);
a6c0b31d509f76023d8efbcd5e912863c8fb254cZbigniew Jędrzejewski-Szmek#define PR_SET_CHILD_SUBREAPER 36
fba1ea06bb5b653e9eb0cc1b6004af8da273a4abShawn Landden unsigned char f_handle[0];
85f19d825e7504676f3a80c78c1d9a7ec35a3b3fMichael Bieblstatic inline int name_to_handle_at(int fd, const char *name, struct file_handle *handle, int *mnt_id, int flags) {
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags);