xref: /openbmc/qemu/include/qemu/systemd.h (revision 293c76cb)
1 /*
2  * systemd socket activation support
3  *
4  * Copyright 2017 Red Hat, Inc. and/or its affiliates
5  *
6  * Authors:
7  *  Richard W.M. Jones <rjones@redhat.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2 or later.
10  * See the COPYING file in the top-level directory.
11  */
12 
13 #ifndef QEMU_SYSTEMD_H
14 #define QEMU_SYSTEMD_H
15 
16 #define FIRST_SOCKET_ACTIVATION_FD 3 /* defined by systemd ABI */
17 
18 /*
19  * Check if socket activation was requested via use of the
20  * LISTEN_FDS and LISTEN_PID environment variables.
21  *
22  * Returns 0 if no socket activation, or the number of FDs.
23  */
24 unsigned int check_socket_activation(void);
25 
26 #endif
27