From: Sven Eden Date: Wed, 7 Mar 2018 16:35:44 +0000 (+0100) Subject: Some minor cleanups X-Git-Tag: v235.3~8 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=991f95c1b59f6d1dc6099e0368426763ab507ca8;p=elogind.git Some minor cleanups --- diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index cb60108ef..30bb4664f 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -1835,7 +1835,6 @@ int cg_path_get_owner_uid(const char *path, uid_t *uid) { return -ENXIO; *end = 0; - if (parse_uid(start, uid) < 0) return -ENXIO; #else diff --git a/src/core/cgroup.h b/src/core/cgroup.h index 14aa68cbf..be5103f6c 100644 --- a/src/core/cgroup.h +++ b/src/core/cgroup.h @@ -21,10 +21,10 @@ #include -//#include "list.h" -//#include "time-util.h" #include "cgroup-util.h" //#include "ip-address-access.h" +//#include "list.h" +//#include "time-util.h" #if 0 /// UNNEEDED by elogind typedef struct CGroupContext CGroupContext; diff --git a/src/libelogind/sd-daemon/sd-daemon.c b/src/libelogind/sd-daemon/sd-daemon.c index 719deb760..f50075ef5 100644 --- a/src/libelogind/sd-daemon/sd-daemon.c +++ b/src/libelogind/sd-daemon/sd-daemon.c @@ -633,6 +633,7 @@ _public_ int sd_booted(void) { /* We test whether the runtime unit file directory has been * created. This takes place in mount-setup.c, so is * guaranteed to happen very early during boot. */ + #if 0 /// elogind is always used without systemd running the show. (Well, it should...) return laccess("/run/systemd/system/", F_OK) >= 0; #else diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h index 0730f12e4..cff1e3343 100644 --- a/src/systemd/sd-bus.h +++ b/src/systemd/sd-bus.h @@ -147,7 +147,6 @@ int sd_bus_can_send(sd_bus *bus, char type); int sd_bus_get_creds_mask(sd_bus *bus, uint64_t *creds_mask); int sd_bus_set_allow_interactive_authorization(sd_bus *bus, int b); int sd_bus_get_allow_interactive_authorization(sd_bus *bus); - int sd_bus_set_exit_on_disconnect(sd_bus *bus, int b); int sd_bus_get_exit_on_disconnect(sd_bus *bus); diff --git a/src/systemd/sd-event.h b/src/systemd/sd-event.h index f0e83cc93..f8cb89566 100644 --- a/src/systemd/sd-event.h +++ b/src/systemd/sd-event.h @@ -102,59 +102,38 @@ int sd_event_get_fd(sd_event *e); int sd_event_get_state(sd_event *e); int sd_event_get_tid(sd_event *e, pid_t *tid); int sd_event_get_exit_code(sd_event *e, int *code); - int sd_event_set_watchdog(sd_event *e, int b); - int sd_event_get_watchdog(sd_event *e); - int sd_event_get_iteration(sd_event *e, uint64_t *ret); - sd_event_source* sd_event_source_ref(sd_event_source *s); - sd_event_source* sd_event_source_unref(sd_event_source *s); sd_event *sd_event_source_get_event(sd_event_source *s); - void* sd_event_source_get_userdata(sd_event_source *s); void* sd_event_source_set_userdata(sd_event_source *s, void *userdata); - int sd_event_source_set_description(sd_event_source *s, const char *description); - int sd_event_source_get_description(sd_event_source *s, const char **description); - int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t callback); - int sd_event_source_get_pending(sd_event_source *s); - int sd_event_source_get_priority(sd_event_source *s, int64_t *priority); int sd_event_source_set_priority(sd_event_source *s, int64_t priority); - int sd_event_source_get_enabled(sd_event_source *s, int *enabled); - int sd_event_source_set_enabled(sd_event_source *s, int enabled); - int sd_event_source_get_io_fd(sd_event_source *s); - int sd_event_source_set_io_fd(sd_event_source *s, int fd); - int sd_event_source_get_io_events(sd_event_source *s, uint32_t* events); - int sd_event_source_set_io_events(sd_event_source *s, uint32_t events); - int sd_event_source_get_io_revents(sd_event_source *s, uint32_t* revents); - int sd_event_source_get_time(sd_event_source *s, uint64_t *usec); int sd_event_source_set_time(sd_event_source *s, uint64_t usec); - int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *usec); int sd_event_source_set_time_accuracy(sd_event_source *s, uint64_t usec); int sd_event_source_get_time_clock(sd_event_source *s, clockid_t *clock); int sd_event_source_get_signal(sd_event_source *s); int sd_event_source_get_child_pid(sd_event_source *s, pid_t *pid); - /* Define helpers so that __attribute__((cleanup(sd_event_unrefp))) and similar may be used. */ _SD_DEFINE_POINTER_CLEANUP_FUNC(sd_event, sd_event_unref); _SD_DEFINE_POINTER_CLEANUP_FUNC(sd_event_source, sd_event_source_unref); diff --git a/src/test/meson.build b/src/test/meson.build index 77722de00..e6865a679 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -23,8 +23,8 @@ generate_sym_test_py = find_program('generate-sym-test.py') test_libelogind_sym_c = custom_target( 'test-libelogind-sym.c', - input : [libelogind_sym_path] + systemd_headers, output : 'test-libelogind-sym.c', + input : [libelogind_sym_path] + systemd_headers, command : [generate_sym_test_py, libelogind_sym_path] + systemd_headers, capture : true) diff --git a/tools/make-directive-index.py b/tools/make-directive-index.py index 7c5e9e392..06ef8f781 100755 --- a/tools/make-directive-index.py +++ b/tools/make-directive-index.py @@ -4,7 +4,6 @@ # This file is part of elogind. # # Copyright 2012-2013 Zbigniew Jędrzejewski-Szmek -# Copyright 2017 Sven Eden # # elogind is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by @@ -39,12 +38,6 @@ TEMPLATE = '''\ Jędrzejewski-Szmek zbyszek@in.waw.pl - - Developer - Sven - Eden - sven.eden@gmx.de - @@ -58,6 +51,24 @@ TEMPLATE = '''\ Index of configuration directives + + Unit directives + + Directives for configuring units, used in unit + files. + + + + + + Options on the kernel command line + + Kernel boot options for configuring the behaviour of the + elogind process. + + + + Environment variables @@ -67,6 +78,33 @@ TEMPLATE = '''\ + + UDEV directives + + Directives for configuring elogind units through the + udev database. + + + + + + Network directives + + Directives for configuring network links through the + net-setup-link udev builtin and networks through + elogind-networkd. + + + + + + Journal fields + + Fields in the journal events with a well known meaning. + + + + PAM configuration directives @@ -75,6 +113,25 @@ TEMPLATE = '''\ + + <filename>/etc/crypttab</filename> and + <filename>/etc/fstab</filename> options + + Options which influence mounted filesystems and + encrypted volumes. + + + + + + System manager directives + + Directives for configuring the behaviour of the + elogind process. + + + + command line options