${libsystemd_core_la_SOURCES:.c=.h} \
${libsystemd_daemon_la_SOURCES:.c=.h} \
src/macro.h \
+ src/def.h \
src/ioprio.h \
src/missing.h \
src/list.h \
#include <dirent.h>
#include "set.h"
-
-#define SYSTEMD_CGROUP_CONTROLLER "name=systemd"
+#include "def.h"
int cg_enumerate_processes(const char *controller, const char *path, FILE **_f);
int cg_enumerate_tasks(const char *controller, const char *path, FILE **_f);
#include "util.h"
#include "strv.h"
#include "ask-password-api.h"
+#include "def.h"
static const char *opt_type = NULL; /* LUKS1 or PLAIN */
static char *opt_cipher = NULL;
if (opt_readonly)
flags |= CRYPT_ACTIVATE_READONLY;
- until = now(CLOCK_MONOTONIC) + (opt_timeout > 0 ? opt_timeout : 60 * USEC_PER_SEC);
+ until = now(CLOCK_MONOTONIC) + (opt_timeout > 0 ? opt_timeout : DEFAULT_TIMEOUT_USEC);
opt_tries = opt_tries > 0 ? opt_tries : 3;
opt_key_size = (opt_key_size > 0 ? opt_key_size : 256);
#include "log.h"
#include "dbus-common.h"
#include "util.h"
+#include "def.h"
int bus_check_peercred(DBusConnection *c) {
int fd;
return 1;
}
-#define TIMEOUT_USEC (60*USEC_PER_SEC)
-
static int sync_auth(DBusConnection *bus, DBusError *error) {
usec_t begin, tstamp;
begin = tstamp = now(CLOCK_MONOTONIC);
for (;;) {
- if (tstamp > begin + TIMEOUT_USEC)
+ if (tstamp > begin + DEFAULT_TIMEOUT_USEC)
break;
if (dbus_connection_get_is_authenticated(bus))
break;
- if (!dbus_connection_read_write_dispatch(bus, ((begin + TIMEOUT_USEC - tstamp) + USEC_PER_MSEC - 1) / USEC_PER_MSEC))
+ if (!dbus_connection_read_write_dispatch(bus, ((begin + DEFAULT_TIMEOUT_USEC - tstamp) + USEC_PER_MSEC - 1) / USEC_PER_MSEC))
break;
tstamp = now(CLOCK_MONOTONIC);
--- /dev/null
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#ifndef foodefhfoo
+#define foodefhfoo
+
+/***
+ This file is part of systemd.
+
+ Copyright 2010 Lennart Poettering
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include "util.h"
+
+#define DEFAULT_TIMEOUT_USEC (3*USEC_PER_MINUTE)
+#define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC)
+
+#define SYSTEMD_CGROUP_CONTROLLER "name=systemd"
+
+#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
+#define SIGNALS_IGNORE SIGKILL,SIGPIPE
+
+#endif
#include "log.h"
#include "unit-name.h"
#include "dbus-device.h"
+#include "def.h"
static const UnitActiveState state_translation_table[_DEVICE_STATE_MAX] = {
[DEVICE_DEAD] = UNIT_INACTIVE,
#include "exit-status.h"
#include "missing.h"
#include "utmp-wtmp.h"
+#include "def.h"
/* This assumes there is a 'tty' group */
#define TTY_MODE 0620
/* Abstract namespace! */
#define LOGGER_SOCKET "/dev/.run/systemd/logger"
-/* This doesn't really belong here, but I couldn't find a better place to put this. */
-#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
-#define SIGNALS_IGNORE SIGKILL,SIGPIPE
-
typedef enum KillMode {
KILL_CONTROL_GROUP = 0,
KILL_PROCESS_GROUP,
#include "label.h"
#include "build.h"
#include "strv.h"
+#include "def.h"
static enum {
ACTION_RUN,
#include "special.h"
#include "bus-errors.h"
#include "exit-status.h"
+#include "def.h"
static const UnitActiveState state_translation_table[_MOUNT_STATE_MAX] = {
[MOUNT_DEAD] = UNIT_INACTIVE,
#include "special.h"
#include "bus-errors.h"
#include "exit-status.h"
-
-#define COMMENTS "#;\n"
-#define NEWLINES "\n\r"
+#include "def.h"
+#include "util.h"
#ifdef HAVE_SYSV_COMPAT
-#define DEFAULT_SYSV_TIMEOUT_USEC (3*USEC_PER_MINUTE)
+#define DEFAULT_SYSV_TIMEOUT_USEC (5*USEC_PER_MINUTE)
typedef enum RunlevelType {
RUNLEVEL_UP,
#include "bus-errors.h"
#include "label.h"
#include "exit-status.h"
+#include "def.h"
static const UnitActiveState state_translation_table[_SOCKET_STATE_MAX] = {
[SOCKET_DEAD] = UNIT_INACTIVE,
#include "special.h"
#include "bus-errors.h"
#include "exit-status.h"
+#include "def.h"
static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
[SWAP_DEAD] = UNIT_INACTIVE,
#include "execute.h"
#include "condition.h"
-#define DEFAULT_TIMEOUT_USEC (3*USEC_PER_MINUTE)
-#define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC)
-
enum UnitType {
UNIT_SERVICE = 0,
UNIT_SOCKET,