summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-04-06 18:58:55 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commit9d1ff89d622fd4d8b3be210996cfa73943d81e03 (patch)
tree102f525976d4d49adff59adba7ca7c0d9e825a14 /src
parent5642683e0db55c457dcd03df1290334a238194e2 (diff)
tree-wide: drop license boilerplate
Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
Diffstat (limited to 'src')
-rw-r--r--src/basic/alloc-util.c13
-rw-r--r--src/basic/alloc-util.h13
-rw-r--r--src/basic/audit-util.c20
-rw-r--r--src/basic/audit-util.h13
-rw-r--r--src/basic/build.h13
-rw-r--r--src/basic/bus-label.c13
-rw-r--r--src/basic/bus-label.h13
-rw-r--r--src/basic/cap-list.c13
-rw-r--r--src/basic/cap-list.h13
-rw-r--r--src/basic/capability-util.c13
-rw-r--r--src/basic/capability-util.h13
-rw-r--r--src/basic/cgroup-util.c13
-rw-r--r--src/basic/cgroup-util.h13
-rw-r--r--src/basic/conf-files.c13
-rw-r--r--src/basic/conf-files.h13
-rw-r--r--src/basic/copy.c13
-rw-r--r--src/basic/copy.h13
-rw-r--r--src/basic/def.h13
-rw-r--r--src/basic/dirent-util.c13
-rw-r--r--src/basic/dirent-util.h13
-rw-r--r--src/basic/env-util.c19
-rw-r--r--src/basic/env-util.h13
-rw-r--r--src/basic/errno-list.c13
-rw-r--r--src/basic/errno-list.h13
-rw-r--r--src/basic/escape.c13
-rw-r--r--src/basic/escape.h13
-rw-r--r--src/basic/exec-util.c13
-rw-r--r--src/basic/exec-util.h13
-rw-r--r--src/basic/extract-word.c13
-rw-r--r--src/basic/extract-word.h13
-rw-r--r--src/basic/fd-util.c13
-rw-r--r--src/basic/fd-util.h15
-rw-r--r--src/basic/fileio-label.c13
-rw-r--r--src/basic/fileio-label.h13
-rw-r--r--src/basic/fileio.c13
-rw-r--r--src/basic/fileio.h13
-rw-r--r--src/basic/format-util.h13
-rw-r--r--src/basic/fs-util.c13
-rw-r--r--src/basic/fs-util.h13
-rw-r--r--src/basic/hash-funcs.c13
-rw-r--r--src/basic/hash-funcs.h13
-rw-r--r--src/basic/hashmap.c13
-rw-r--r--src/basic/hashmap.h13
-rw-r--r--src/basic/hexdecoct.c13
-rw-r--r--src/basic/hexdecoct.h13
-rw-r--r--src/basic/hostname-util.c13
-rw-r--r--src/basic/hostname-util.h13
-rw-r--r--src/basic/io-util.c13
-rw-r--r--src/basic/io-util.h13
-rw-r--r--src/basic/khash.c13
-rw-r--r--src/basic/khash.h13
-rw-r--r--src/basic/label.c13
-rw-r--r--src/basic/label.h13
-rw-r--r--src/basic/list.h13
-rw-r--r--src/basic/locale-util.c13
-rw-r--r--src/basic/locale-util.h13
-rw-r--r--src/basic/log.c32
-rw-r--r--src/basic/log.h13
-rw-r--r--src/basic/login-util.c13
-rw-r--r--src/basic/login-util.h13
-rw-r--r--src/basic/macro.h13
-rw-r--r--src/basic/memfd-util.c13
-rw-r--r--src/basic/memfd-util.h13
-rw-r--r--src/basic/mempool.c13
-rw-r--r--src/basic/mempool.h13
-rw-r--r--src/basic/meson.build13
-rw-r--r--src/basic/missing.h17
-rw-r--r--src/basic/missing_syscall.h21
-rw-r--r--src/basic/mkdir-label.c13
-rw-r--r--src/basic/mkdir.c13
-rw-r--r--src/basic/mkdir.h13
-rw-r--r--src/basic/mount-util.c22
-rw-r--r--src/basic/mount-util.h13
-rw-r--r--src/basic/parse-util.c16
-rw-r--r--src/basic/parse-util.h13
-rw-r--r--src/basic/path-util.c13
-rw-r--r--src/basic/path-util.h13
-rw-r--r--src/basic/prioq.c13
-rw-r--r--src/basic/prioq.h13
-rw-r--r--src/basic/proc-cmdline.c13
-rw-r--r--src/basic/proc-cmdline.h13
-rw-r--r--src/basic/process-util.c13
-rw-r--r--src/basic/process-util.h13
-rw-r--r--src/basic/random-util.c13
-rw-r--r--src/basic/random-util.h13
-rw-r--r--src/basic/raw-clone.h12
-rw-r--r--src/basic/refcnt.h13
-rw-r--r--src/basic/rm-rf.c13
-rw-r--r--src/basic/rm-rf.h13
-rw-r--r--src/basic/selinux-util.c13
-rw-r--r--src/basic/selinux-util.h13
-rw-r--r--src/basic/set.h13
-rw-r--r--src/basic/sigbus.c13
-rw-r--r--src/basic/sigbus.h13
-rw-r--r--src/basic/signal-util.c13
-rw-r--r--src/basic/signal-util.h13
-rw-r--r--src/basic/smack-util.c13
-rw-r--r--src/basic/smack-util.h13
-rw-r--r--src/basic/socket-util.c13
-rw-r--r--src/basic/socket-util.h13
-rw-r--r--src/basic/special.h13
-rw-r--r--src/basic/stat-util.c13
-rw-r--r--src/basic/stat-util.h13
-rw-r--r--src/basic/stdio-util.h13
-rw-r--r--src/basic/string-table.c13
-rw-r--r--src/basic/string-table.h22
-rw-r--r--src/basic/string-util.c13
-rw-r--r--src/basic/string-util.h13
-rw-r--r--src/basic/strv.c13
-rw-r--r--src/basic/strv.h13
-rw-r--r--src/basic/syslog-util.c13
-rw-r--r--src/basic/syslog-util.h13
-rw-r--r--src/basic/terminal-util.c13
-rw-r--r--src/basic/terminal-util.h20
-rw-r--r--src/basic/time-util.c13
-rw-r--r--src/basic/time-util.h13
-rw-r--r--src/basic/umask-util.h13
-rw-r--r--src/basic/unaligned.h13
-rw-r--r--src/basic/unit-def.c13
-rw-r--r--src/basic/unit-def.h13
-rw-r--r--src/basic/unit-name.c13
-rw-r--r--src/basic/unit-name.h13
-rw-r--r--src/basic/user-util.c13
-rw-r--r--src/basic/user-util.h13
-rw-r--r--src/basic/utf8.c13
-rw-r--r--src/basic/utf8.h13
-rw-r--r--src/basic/util.c13
-rw-r--r--src/basic/util.h13
-rw-r--r--src/basic/verbs.c13
-rw-r--r--src/basic/verbs.h13
-rw-r--r--src/basic/virt.c13
-rw-r--r--src/basic/virt.h13
-rw-r--r--src/basic/xattr-util.c13
-rw-r--r--src/basic/xattr-util.h13
-rw-r--r--src/cgroups-agent/cgroups-agent.c13
-rw-r--r--src/core/cgroup.c13
-rw-r--r--src/core/cgroup.h13
-rw-r--r--src/core/meson.build13
-rw-r--r--src/core/mount-setup.c13
-rw-r--r--src/core/mount-setup.h13
-rw-r--r--src/libelogind/meson.build13
-rw-r--r--src/libelogind/sd-bus/bus-common-errors.c13
-rw-r--r--src/libelogind/sd-bus/bus-common-errors.h13
-rw-r--r--src/libelogind/sd-bus/bus-container.c13
-rw-r--r--src/libelogind/sd-bus/bus-container.h13
-rw-r--r--src/libelogind/sd-bus/bus-control.c13
-rw-r--r--src/libelogind/sd-bus/bus-control.h13
-rw-r--r--src/libelogind/sd-bus/bus-convenience.c13
-rw-r--r--src/libelogind/sd-bus/bus-creds.c13
-rw-r--r--src/libelogind/sd-bus/bus-creds.h13
-rw-r--r--src/libelogind/sd-bus/bus-error.c15
-rw-r--r--src/libelogind/sd-bus/bus-error.h13
-rw-r--r--src/libelogind/sd-bus/bus-gvariant.c13
-rw-r--r--src/libelogind/sd-bus/bus-gvariant.h13
-rw-r--r--src/libelogind/sd-bus/bus-internal.c13
-rw-r--r--src/libelogind/sd-bus/bus-internal.h13
-rw-r--r--src/libelogind/sd-bus/bus-introspect.c13
-rw-r--r--src/libelogind/sd-bus/bus-introspect.h13
-rw-r--r--src/libelogind/sd-bus/bus-kernel.c13
-rw-r--r--src/libelogind/sd-bus/bus-kernel.h13
-rw-r--r--src/libelogind/sd-bus/bus-match.c13
-rw-r--r--src/libelogind/sd-bus/bus-match.h13
-rw-r--r--src/libelogind/sd-bus/bus-message.c13
-rw-r--r--src/libelogind/sd-bus/bus-message.h13
-rw-r--r--src/libelogind/sd-bus/bus-objects.c13
-rw-r--r--src/libelogind/sd-bus/bus-objects.h13
-rw-r--r--src/libelogind/sd-bus/bus-protocol.h13
-rw-r--r--src/libelogind/sd-bus/bus-signature.c13
-rw-r--r--src/libelogind/sd-bus/bus-signature.h13
-rw-r--r--src/libelogind/sd-bus/bus-slot.c13
-rw-r--r--src/libelogind/sd-bus/bus-slot.h13
-rw-r--r--src/libelogind/sd-bus/bus-socket.c13
-rw-r--r--src/libelogind/sd-bus/bus-socket.h13
-rw-r--r--src/libelogind/sd-bus/bus-track.c13
-rw-r--r--src/libelogind/sd-bus/bus-track.h13
-rw-r--r--src/libelogind/sd-bus/bus-type.c13
-rw-r--r--src/libelogind/sd-bus/bus-type.h13
-rw-r--r--src/libelogind/sd-bus/sd-bus.c13
-rw-r--r--src/libelogind/sd-bus/test-bus-error.c13
-rw-r--r--src/libelogind/sd-bus/test-bus-introspect.c13
-rw-r--r--src/libelogind/sd-bus/test-bus-match.c13
-rw-r--r--src/libelogind/sd-bus/test-bus-server.c13
-rw-r--r--src/libelogind/sd-bus/test-bus-signature.c13
-rw-r--r--src/libelogind/sd-daemon/sd-daemon.c13
-rw-r--r--src/libelogind/sd-event/sd-event.c37
-rw-r--r--src/libelogind/sd-event/test-event.c13
-rw-r--r--src/libelogind/sd-id128/id128-util.c13
-rw-r--r--src/libelogind/sd-id128/id128-util.h13
-rw-r--r--src/libelogind/sd-id128/sd-id128.c13
-rw-r--r--src/libelogind/sd-login/sd-login.c13
-rw-r--r--src/libelogind/sd-login/test-login.c13
-rw-r--r--src/login/inhibit.c13
-rw-r--r--src/login/loginctl.c13
-rw-r--r--src/login/logind-acl.c13
-rw-r--r--src/login/logind-acl.h13
-rw-r--r--src/login/logind-action.c13
-rw-r--r--src/login/logind-action.h13
-rw-r--r--src/login/logind-button.c13
-rw-r--r--src/login/logind-button.h13
-rw-r--r--src/login/logind-core.c20
-rw-r--r--src/login/logind-dbus.c13
-rw-r--r--src/login/logind-device.c13
-rw-r--r--src/login/logind-device.h13
-rw-r--r--src/login/logind-inhibit.c13
-rw-r--r--src/login/logind-inhibit.h13
-rw-r--r--src/login/logind-seat-dbus.c13
-rw-r--r--src/login/logind-seat.c16
-rw-r--r--src/login/logind-seat.h13
-rw-r--r--src/login/logind-session-dbus.c13
-rw-r--r--src/login/logind-session-device.c75
-rw-r--r--src/login/logind-session-device.h13
-rw-r--r--src/login/logind-session.c13
-rw-r--r--src/login/logind-session.h13
-rw-r--r--src/login/logind-user-dbus.c13
-rw-r--r--src/login/logind-user.c13
-rw-r--r--src/login/logind-user.h13
-rw-r--r--src/login/logind-utmp.c13
-rw-r--r--src/login/logind.c13
-rw-r--r--src/login/logind.h13
-rw-r--r--src/login/meson.build13
-rw-r--r--src/login/pam_elogind.c13
-rw-r--r--src/login/sysfs-show.c13
-rw-r--r--src/login/sysfs-show.h13
-rw-r--r--src/login/test-inhibit.c13
-rw-r--r--src/login/test-login-shared.c13
-rw-r--r--src/login/test-login-tables.c13
-rw-r--r--src/shared/acl-util.c13
-rw-r--r--src/shared/acl-util.h13
-rw-r--r--src/shared/bus-util.c13
-rw-r--r--src/shared/bus-util.h13
-rw-r--r--src/shared/clean-ipc.c13
-rw-r--r--src/shared/clean-ipc.h13
-rw-r--r--src/shared/conf-parser.c13
-rw-r--r--src/shared/conf-parser.h20
-rw-r--r--src/shared/meson.build13
-rw-r--r--src/shared/nsflags.c13
-rw-r--r--src/shared/nsflags.h13
-rw-r--r--src/shared/output-mode.c13
-rw-r--r--src/shared/output-mode.h13
-rw-r--r--src/shared/sleep-config.c128
-rw-r--r--src/shared/sleep-config.h16
-rw-r--r--src/shared/spawn-polkit-agent.c13
-rw-r--r--src/shared/spawn-polkit-agent.h13
-rw-r--r--src/shared/test-tables.h13
-rw-r--r--src/shared/udev-util.c13
-rw-r--r--src/shared/udev-util.h13
-rw-r--r--src/shared/utmp-wtmp.c13
-rw-r--r--src/shared/utmp-wtmp.h13
-rw-r--r--src/sleep/sleep.c94
-rw-r--r--src/systemd/meson.build13
-rw-r--r--src/test/meson.build13
-rw-r--r--src/test/test-alloc-util.c13
-rw-r--r--src/test/test-cgroup.c13
-rw-r--r--src/test/test-conf-files.c13
-rw-r--r--src/test/test-conf-parser.c33
-rw-r--r--src/test/test-copy.c13
-rw-r--r--src/test/test-dlopen.c13
-rw-r--r--src/test/test-ellipsize.c13
-rw-r--r--src/test/test-escape.c13
-rw-r--r--src/test/test-exec-util.c13
-rw-r--r--src/test/test-extract-word.c13
-rw-r--r--src/test/test-fd-util.c13
-rw-r--r--src/test/test-fs-util.c13
-rw-r--r--src/test/test-hash.c13
-rw-r--r--src/test/test-hashmap-plain.c13
-rw-r--r--src/test/test-hashmap.c13
-rw-r--r--src/test/test-helper.h13
-rw-r--r--src/test/test-hexdecoct.c13
-rw-r--r--src/test/test-id128.c13
-rw-r--r--src/test/test-io-util.c13
-rw-r--r--src/test/test-ipcrm.c13
-rw-r--r--src/test/test-list.c13
-rw-r--r--src/test/test-locale-util.c13
-rw-r--r--src/test/test-log.c13
-rw-r--r--src/test/test-parse-util.c13
-rw-r--r--src/test/test-path-util.c13
-rw-r--r--src/test/test-prioq.c13
-rw-r--r--src/test/test-proc-cmdline.c13
-rw-r--r--src/test/test-process-util.c41
-rw-r--r--src/test/test-random-util.c13
-rw-r--r--src/test/test-selinux.c13
-rw-r--r--src/test/test-set.c13
-rw-r--r--src/test/test-signal-util.c25
-rw-r--r--src/test/test-siphash24.c13
-rw-r--r--src/test/test-sizeof.c13
-rw-r--r--src/test/test-stat-util.c13
-rw-r--r--src/test/test-string-util.c13
-rw-r--r--src/test/test-strip-tab-ansi.c13
-rw-r--r--src/test/test-unaligned.c13
-rw-r--r--src/test/test-user-util.c13
-rw-r--r--src/test/test-utf8.c13
-rw-r--r--src/test/test-util.c13
-rw-r--r--src/test/test-verbs.c13
-rw-r--r--src/update-utmp/update-utmp.c14
294 files changed, 169 insertions, 4091 deletions
diff --git a/src/basic/alloc-util.c b/src/basic/alloc-util.c
index cdde4f285..eceff4f24 100644
--- a/src/basic/alloc-util.c
+++ b/src/basic/alloc-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <stdint.h>
diff --git a/src/basic/alloc-util.h b/src/basic/alloc-util.h
index b1e0edbb7..88cd6b0bc 100644
--- a/src/basic/alloc-util.h
+++ b/src/basic/alloc-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <alloca.h>
diff --git a/src/basic/audit-util.c b/src/basic/audit-util.c
index a0a0ab06c..3f158caee 100644
--- a/src/basic/audit-util.c
+++ b/src/basic/audit-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
@@ -96,9 +83,10 @@ bool use_audit(void) {
fd = socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, NETLINK_AUDIT);
if (fd < 0) {
cached_use = !IN_SET(errno, EAFNOSUPPORT, EPROTONOSUPPORT, EPERM);
- if (!cached_use)
- log_debug_errno(errno, "Won't talk to audit: %m");
- } else {
+ if (errno == EPERM)
+ log_debug_errno(errno, "Audit access prohibited, won't talk to audit");
+ }
+ else {
cached_use = true;
safe_close(fd);
}
diff --git a/src/basic/audit-util.h b/src/basic/audit-util.h
index f6ca071b7..d8cfafe23 100644
--- a/src/basic/audit-util.h
+++ b/src/basic/audit-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/build.h b/src/basic/build.h
index 88c45e1bc..b0ac77e8f 100644
--- a/src/basic/build.h
+++ b/src/basic/build.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#if HAVE_PAM
diff --git a/src/basic/bus-label.c b/src/basic/bus-label.c
index a072d0ad5..fee38b505 100644
--- a/src/basic/bus-label.c
+++ b/src/basic/bus-label.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <stdlib.h>
diff --git a/src/basic/bus-label.h b/src/basic/bus-label.h
index 5c6bc1f26..0df46f86b 100644
--- a/src/basic/bus-label.h
+++ b/src/basic/bus-label.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <stddef.h>
diff --git a/src/basic/cap-list.c b/src/basic/cap-list.c
index 9416391a5..01f163b60 100644
--- a/src/basic/cap-list.c
+++ b/src/basic/cap-list.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
#include <errno.h>
diff --git a/src/basic/cap-list.h b/src/basic/cap-list.h
index ca9f4aa97..db65d5f0e 100644
--- a/src/basic/cap-list.h
+++ b/src/basic/cap-list.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
const char *capability_to_name(int id);
diff --git a/src/basic/capability-util.c b/src/basic/capability-util.c
index dae4dbc5b..bfee89eab 100644
--- a/src/basic/capability-util.c
+++ b/src/basic/capability-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/capability-util.h b/src/basic/capability-util.h
index 97a797b19..f1e6560fd 100644
--- a/src/basic/capability-util.h
+++ b/src/basic/capability-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index d9c5fdc9a..443d65ff4 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <dirent.h>
diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h
index b6f427bda..d8ddff95a 100644
--- a/src/basic/cgroup-util.h
+++ b/src/basic/cgroup-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <dirent.h>
diff --git a/src/basic/conf-files.c b/src/basic/conf-files.c
index 8b4129e1c..8e0fb06ad 100644
--- a/src/basic/conf-files.c
+++ b/src/basic/conf-files.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <dirent.h>
diff --git a/src/basic/conf-files.h b/src/basic/conf-files.h
index 5dc83578e..b902c3a3b 100644
--- a/src/basic/conf-files.h
+++ b/src/basic/conf-files.h
@@ -6,19 +6,6 @@
Copyright 2010-2012 Lennart Poettering
Copyright 2010-2012 Kay Sievers
-
- 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/>.
***/
enum {
diff --git a/src/basic/copy.c b/src/basic/copy.c
index d1ca6f268..ff53f8394 100644
--- a/src/basic/copy.c
+++ b/src/basic/copy.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
//#include <dirent.h>
diff --git a/src/basic/copy.h b/src/basic/copy.h
index f22242ed8..d8cb00c67 100644
--- a/src/basic/copy.h
+++ b/src/basic/copy.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
#include <inttypes.h>
diff --git a/src/basic/def.h b/src/basic/def.h
index 11b9a7cca..727746df7 100644
--- a/src/basic/def.h
+++ b/src/basic/def.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include "util.h"
diff --git a/src/basic/dirent-util.c b/src/basic/dirent-util.c
index e2b093bad..e093a3bba 100644
--- a/src/basic/dirent-util.c
+++ b/src/basic/dirent-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010-2012 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/>.
***/
#include <fcntl.h>
diff --git a/src/basic/dirent-util.h b/src/basic/dirent-util.h
index 94d5ee81a..00d061b63 100644
--- a/src/basic/dirent-util.h
+++ b/src/basic/dirent-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <dirent.h>
diff --git a/src/basic/env-util.c b/src/basic/env-util.c
index dd93023b5..b5de520d4 100644
--- a/src/basic/env-util.c
+++ b/src/basic/env-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
#include <errno.h>
@@ -84,9 +71,9 @@ bool env_value_is_valid(const char *e) {
if (!utf8_is_valid(e))
return false;
- /* bash allows tabs in environment variables, and so should
- * we */
- if (string_has_cc(e, "\t"))
+ /* bash allows tabs and newlines in environment variables, and so
+ * should we */
+ if (string_has_cc(e, "\t\n"))
return false;
/* POSIX says the overall size of the environment block cannot
diff --git a/src/basic/env-util.h b/src/basic/env-util.h
index 056878f9a..95b59db3d 100644
--- a/src/basic/env-util.h
+++ b/src/basic/env-util.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/errno-list.c b/src/basic/errno-list.c
index b72dce3cf..e6fc0baeb 100644
--- a/src/basic/errno-list.c
+++ b/src/basic/errno-list.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <errno.h>
diff --git a/src/basic/errno-list.h b/src/basic/errno-list.h
index 38beaf96d..6725ae9ad 100644
--- a/src/basic/errno-list.h
+++ b/src/basic/errno-list.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/escape.c b/src/basic/escape.c
index fda015fcb..905428f6c 100644
--- a/src/basic/escape.c
+++ b/src/basic/escape.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/escape.h b/src/basic/escape.h
index 5dcc24fb8..19a5bed90 100644
--- a/src/basic/escape.h
+++ b/src/basic/escape.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <inttypes.h>
diff --git a/src/basic/exec-util.c b/src/basic/exec-util.c
index 73330c278..e7b0e0fc0 100644
--- a/src/basic/exec-util.c
+++ b/src/basic/exec-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <dirent.h>
diff --git a/src/basic/exec-util.h b/src/basic/exec-util.h
index b1ef16e5d..9ebeab96a 100644
--- a/src/basic/exec-util.h
+++ b/src/basic/exec-util.h
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2017 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/extract-word.c b/src/basic/extract-word.c
index 4bbd78ac5..e2d4eb4aa 100644
--- a/src/basic/extract-word.c
+++ b/src/basic/extract-word.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/extract-word.h b/src/basic/extract-word.h
index fbabf7a20..be21521d6 100644
--- a/src/basic/extract-word.h
+++ b/src/basic/extract-word.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include "macro.h"
diff --git a/src/basic/fd-util.c b/src/basic/fd-util.c
index 21c9d8b87..f4e861dd6 100644
--- a/src/basic/fd-util.c
+++ b/src/basic/fd-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h
index db259e6d1..588eefd50 100644
--- a/src/basic/fd-util.h
+++ b/src/basic/fd-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <dirent.h>
@@ -121,3 +108,5 @@ static inline int make_null_stdio(void) {
(fd) = -1; \
_fd_; \
})
+
+int fd_reopen(int fd, int flags);
diff --git a/src/basic/fileio-label.c b/src/basic/fileio-label.c
index 0baa6a2fd..69b58b7b9 100644
--- a/src/basic/fileio-label.c
+++ b/src/basic/fileio-label.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2010 Harald Hoyer
-
- 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/>.
***/
#include <sys/stat.h>
diff --git a/src/basic/fileio-label.h b/src/basic/fileio-label.h
index f77ea4330..2bfffbfa7 100644
--- a/src/basic/fileio-label.h
+++ b/src/basic/fileio-label.h
@@ -6,19 +6,6 @@
Copyright 2010 Lennart Poettering
Copyright 2010 Harald Hoyer
-
- 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/>.
***/
#include <stdio.h>
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index 855f9a780..a145fd4d4 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/fileio.h b/src/basic/fileio.h
index 4462056d7..8ee246c57 100644
--- a/src/basic/fileio.h
+++ b/src/basic/fileio.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <dirent.h>
diff --git a/src/basic/format-util.h b/src/basic/format-util.h
index d9a78f781..c9e81192b 100644
--- a/src/basic/format-util.h
+++ b/src/basic/format-util.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2015 Ronny Chevalier
-
- 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/>.
***/
#include <inttypes.h>
diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c
index fe8554842..858441c94 100644
--- a/src/basic/fs-util.c
+++ b/src/basic/fs-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
index d04b467d5..83de65083 100644
--- a/src/basic/fs-util.h
+++ b/src/basic/fs-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
//#include <dirent.h>
diff --git a/src/basic/hash-funcs.c b/src/basic/hash-funcs.c
index 947bcfd58..b62f2bd87 100644
--- a/src/basic/hash-funcs.c
+++ b/src/basic/hash-funcs.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2014 Michal Schmidt
-
- 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/>.
***/
#include <string.h>
diff --git a/src/basic/hash-funcs.h b/src/basic/hash-funcs.h
index 945b4c251..0c963af8e 100644
--- a/src/basic/hash-funcs.h
+++ b/src/basic/hash-funcs.h
@@ -6,19 +6,6 @@
Copyright 2010 Lennart Poettering
Copyright 2014 Michal Schmidt
-
- 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/>.
***/
#include "macro.h"
diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c
index 03ed3b8df..a70fd667c 100644
--- a/src/basic/hashmap.c
+++ b/src/basic/hashmap.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2014 Michal Schmidt
-
- 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/>.
***/
#include <errno.h>
diff --git a/src/basic/hashmap.h b/src/basic/hashmap.h
index b67491039..701eecbdb 100644
--- a/src/basic/hashmap.h
+++ b/src/basic/hashmap.h
@@ -6,19 +6,6 @@
Copyright 2010 Lennart Poettering
Copyright 2014 Michal Schmidt
-
- 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/>.
***/
#include <limits.h>
diff --git a/src/basic/hexdecoct.c b/src/basic/hexdecoct.c
index 7f8a74acf..7ab5c5f70 100644
--- a/src/basic/hexdecoct.c
+++ b/src/basic/hexdecoct.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <ctype.h>
diff --git a/src/basic/hexdecoct.h b/src/basic/hexdecoct.h
index 08d0a5227..c2f11013e 100644
--- a/src/basic/hexdecoct.h
+++ b/src/basic/hexdecoct.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/hostname-util.c b/src/basic/hostname-util.c
index f5435d523..022aaba0f 100644
--- a/src/basic/hostname-util.c
+++ b/src/basic/hostname-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2015 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/>.
***/
#include <errno.h>
diff --git a/src/basic/hostname-util.h b/src/basic/hostname-util.h
index 37fb56004..439b12e64 100644
--- a/src/basic/hostname-util.h
+++ b/src/basic/hostname-util.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2010-2015 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/io-util.c b/src/basic/io-util.c
index a6e34cb76..593db66da 100644
--- a/src/basic/io-util.c
+++ b/src/basic/io-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/io-util.h b/src/basic/io-util.h
index d81610ad2..c34d97c65 100644
--- a/src/basic/io-util.h
+++ b/src/basic/io-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/khash.c b/src/basic/khash.c
index b3e1dc444..c66e9faee 100644
--- a/src/basic/khash.c
+++ b/src/basic/khash.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2016 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/>.
***/
#include <linux/if_alg.h>
diff --git a/src/basic/khash.h b/src/basic/khash.h
index e9c41a3f2..3fa867e37 100644
--- a/src/basic/khash.h
+++ b/src/basic/khash.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2016 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/>.
***/
#include <inttypes.h>
diff --git a/src/basic/label.c b/src/basic/label.c
index d988dae04..1641a6918 100644
--- a/src/basic/label.c
+++ b/src/basic/label.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/label.h b/src/basic/label.h
index cad224ce7..43cc21477 100644
--- a/src/basic/label.h
+++ b/src/basic/label.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/list.h b/src/basic/list.h
index 7006c3e27..3ec7e73fc 100644
--- a/src/basic/list.h
+++ b/src/basic/list.h
@@ -5,19 +5,6 @@
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 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/>.
***/
/* The head of the linked list. Use this in the structure that shall
diff --git a/src/basic/locale-util.c b/src/basic/locale-util.c
index 2080be24b..01ab44d9a 100644
--- a/src/basic/locale-util.c
+++ b/src/basic/locale-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
#include <dirent.h>
diff --git a/src/basic/locale-util.h b/src/basic/locale-util.h
index f75dcbc3d..510064232 100644
--- a/src/basic/locale-util.h
+++ b/src/basic/locale-util.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
#include <libintl.h>
diff --git a/src/basic/log.c b/src/basic/log.c
index a874ab58b..5ac652867 100644
--- a/src/basic/log.c
+++ b/src/basic/log.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
@@ -715,8 +702,9 @@ int log_internalv_realm(
if (_likely_(LOG_PRI(level) > log_max_level[realm]))
return -error;
- /* Make sure that %m maps to the specified error (or "Success"). */
- errno = error;
+ /* Make sure that %m maps to the specified error */
+ if (error != 0)
+ errno = error;
(void) vsnprintf(buffer, sizeof buffer, format, ap);
@@ -764,8 +752,9 @@ static int log_object_internalv(
if (_likely_(LOG_PRI(level) > log_max_level[LOG_REALM_SYSTEMD]))
return -error;
- /* Make sure that %m maps to the specified error (or "Success"). */
- errno = error;
+ /* Make sure that %m maps to the specified error */
+ if (error != 0)
+ errno = error;
/* Prepend the object name before the message */
if (object) {
@@ -888,7 +877,8 @@ int log_format_iovec(
* since vasprintf() leaves it afterwards at
* an undefined location */
- errno = error;
+ if (error != 0)
+ errno = error;
va_copy(aq, ap);
r = vasprintf(&m, format, aq);
@@ -991,7 +981,8 @@ int log_struct_internal(
while (format) {
va_list aq;
- errno = error;
+ if (error != 0)
+ errno = error;
va_copy(aq, ap);
(void) vsnprintf(buf, sizeof buf, format, aq);
@@ -1293,7 +1284,8 @@ int log_syntax_internal(
if (log_target == LOG_TARGET_NULL)
return -error;
- errno = error;
+ if (error != 0)
+ errno = error;
va_start(ap, format);
(void) vsnprintf(buffer, sizeof buffer, format, ap);
diff --git a/src/basic/log.h b/src/basic/log.h
index 8094a8556..a2d625368 100644
--- a/src/basic/log.h
+++ b/src/basic/log.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdarg.h>
diff --git a/src/basic/login-util.c b/src/basic/login-util.c
index af4539453..d69b413e6 100644
--- a/src/basic/login-util.c
+++ b/src/basic/login-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2013 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include <string.h>
diff --git a/src/basic/login-util.h b/src/basic/login-util.h
index 1c558bfe2..ed454bd67 100644
--- a/src/basic/login-util.h
+++ b/src/basic/login-util.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2013 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/macro.h b/src/basic/macro.h
index 8e61ff068..6b3c3d04d 100644
--- a/src/basic/macro.h
+++ b/src/basic/macro.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <inttypes.h>
diff --git a/src/basic/memfd-util.c b/src/basic/memfd-util.c
index 75141c0a2..17e8acf6a 100644
--- a/src/basic/memfd-util.c
+++ b/src/basic/memfd-util.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <errno.h>
diff --git a/src/basic/memfd-util.h b/src/basic/memfd-util.h
index 79a20a888..c9920f7c1 100644
--- a/src/basic/memfd-util.h
+++ b/src/basic/memfd-util.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <inttypes.h>
diff --git a/src/basic/mempool.c b/src/basic/mempool.c
index 0da8e1f77..de04215ee 100644
--- a/src/basic/mempool.c
+++ b/src/basic/mempool.c
@@ -4,19 +4,6 @@
Copyright 2010-2014 Lennart Poettering
Copyright 2014 Michal Schmidt
-
- 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/>.
***/
#include <stdint.h>
diff --git a/src/basic/mempool.h b/src/basic/mempool.h
index c9235c836..5322fd480 100644
--- a/src/basic/mempool.h
+++ b/src/basic/mempool.h
@@ -6,19 +6,6 @@
Copyright 2011-2014 Lennart Poettering
Copyright 2014 Michal Schmidt
-
- 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/>.
***/
#include <stddef.h>
diff --git a/src/basic/meson.build b/src/basic/meson.build
index 40e4eb9f4..01f8f7397 100644
--- a/src/basic/meson.build
+++ b/src/basic/meson.build
@@ -1,19 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright 2017 Zbigniew Jędrzejewski-Szmek
-#
-# 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
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
#if 0 /// elogind has a shorter list
# basic_sources = files('''
diff --git a/src/basic/missing.h b/src/basic/missing.h
index 3708742c2..87ebd0c80 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
@@ -5,19 +5,6 @@
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 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/>.
***/
/* Missing glibc definitions to access certain kernel APIs */
@@ -1063,6 +1050,10 @@ struct input_mask {
#define RTAX_QUICKACK 15
#endif
+#ifndef RTA_EXPIRES
+#define RTA_EXPIRES 23
+#endif
+
#ifndef IPV6_UNICAST_IF
#define IPV6_UNICAST_IF 76
#endif
diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
index 38e9e263e..b6083fa31 100644
--- a/src/basic/missing_syscall.h
+++ b/src/basic/missing_syscall.h
@@ -6,19 +6,6 @@
Copyright 2010 Lennart Poettering
Copyright 2016 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
/* Missing glibc definitions to access certain kernel APIs */
@@ -418,14 +405,8 @@ static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
#if !HAVE_STATX
# ifndef __NR_statx
-# if defined __aarch64__ || defined __arm__
-# define __NR_statx 397
-# elif defined __alpha__
-# define __NR_statx 522
-# elif defined __i386__ || defined __powerpc64__
+# if defined __i386__
# define __NR_statx 383
-# elif defined __sparc__
-# define __NR_statx 360
# elif defined __x86_64__
# define __NR_statx 332
# else
diff --git a/src/basic/mkdir-label.c b/src/basic/mkdir-label.c
index 6b4656669..c723c4e69 100644
--- a/src/basic/mkdir-label.c
+++ b/src/basic/mkdir-label.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2013 Kay Sievers
-
- 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/>.
***/
#include <stdio.h>
diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
index ac127b9dc..12d8e377d 100644
--- a/src/basic/mkdir.c
+++ b/src/basic/mkdir.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/mkdir.h b/src/basic/mkdir.h
index 07d271980..c0e08fcfb 100644
--- a/src/basic/mkdir.h
+++ b/src/basic/mkdir.h
@@ -6,19 +6,6 @@
Copyright 2010 Lennart Poettering
Copyright 2013 Kay Sievers
-
- 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/>.
***/
#include <sys/types.h>
diff --git a/src/basic/mount-util.c b/src/basic/mount-util.c
index 751702d33..b3817c03c 100644
--- a/src/basic/mount-util.c
+++ b/src/basic/mount-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
@@ -81,10 +68,8 @@ int name_to_handle_at_loop(
if (name_to_handle_at(fd, path, h, &mnt_id, flags) >= 0) {
- if (ret_handle) {
- *ret_handle = h;
- h = NULL;
- }
+ if (ret_handle)
+ *ret_handle = TAKE_PTR(h);
if (ret_mnt_id)
*ret_mnt_id = mnt_id;
@@ -956,8 +941,7 @@ int mount_option_mangle(
}
*ret_mount_flags = mount_flags;
- *ret_remaining_options = ret;
- ret = NULL;
+ *ret_remaining_options = TAKE_PTR(ret);
return 0;
}
diff --git a/src/basic/mount-util.h b/src/basic/mount-util.h
index c213e5788..d02976d89 100644
--- a/src/basic/mount-util.h
+++ b/src/basic/mount-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <fcntl.h>
diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
index 911447941..5999c8140 100644
--- a/src/basic/parse-util.c
+++ b/src/basic/parse-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
@@ -329,8 +316,7 @@ int parse_syscall_and_errno(const char *in, char **name, int *error) {
return -EINVAL;
*error = e;
- *name = n;
- n = NULL;
+ *name = TAKE_PTR(n);
return 0;
}
diff --git a/src/basic/parse-util.h b/src/basic/parse-util.h
index 954f00c4c..dfc50f50b 100644
--- a/src/basic/parse-util.h
+++ b/src/basic/parse-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <inttypes.h>
diff --git a/src/basic/path-util.c b/src/basic/path-util.c
index aca5f486d..4c5f984bd 100644
--- a/src/basic/path-util.c
+++ b/src/basic/path-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010-2012 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/>.
***/
#include <errno.h>
diff --git a/src/basic/path-util.h b/src/basic/path-util.h
index 38cd89e32..7415248ae 100644
--- a/src/basic/path-util.h
+++ b/src/basic/path-util.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2010-2012 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/>.
***/
#include <alloca.h>
diff --git a/src/basic/prioq.c b/src/basic/prioq.c
index 2a1f1af87..1db2d9efc 100644
--- a/src/basic/prioq.c
+++ b/src/basic/prioq.c
@@ -3,19 +3,6 @@
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/>.
***/
/*
diff --git a/src/basic/prioq.h b/src/basic/prioq.h
index a222955df..e348c6464 100644
--- a/src/basic/prioq.h
+++ b/src/basic/prioq.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
index 1d1226b28..723683100 100644
--- a/src/basic/proc-cmdline.c
+++ b/src/basic/proc-cmdline.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/proc-cmdline.h b/src/basic/proc-cmdline.h
index a80567b15..35a75b499 100644
--- a/src/basic/proc-cmdline.h
+++ b/src/basic/proc-cmdline.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/process-util.c b/src/basic/process-util.c
index b90272e97..a811d3dc6 100644
--- a/src/basic/process-util.c
+++ b/src/basic/process-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <ctype.h>
diff --git a/src/basic/process-util.h b/src/basic/process-util.h
index b17aef8bd..eff42d053 100644
--- a/src/basic/process-util.h
+++ b/src/basic/process-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <alloca.h>
diff --git a/src/basic/random-util.c b/src/basic/random-util.c
index 13b033ff8..803ca790f 100644
--- a/src/basic/random-util.c
+++ b/src/basic/random-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <elf.h>
diff --git a/src/basic/random-util.h b/src/basic/random-util.h
index dd8701515..723917057 100644
--- a/src/basic/random-util.h
+++ b/src/basic/random-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/raw-clone.h b/src/basic/raw-clone.h
index 8c9538030..d8a686631 100644
--- a/src/basic/raw-clone.h
+++ b/src/basic/raw-clone.h
@@ -6,18 +6,6 @@
Copyright 2010 Lennart Poettering
Copyright 2016 Michael Karcher
- 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/>.
***/
#include <sched.h>
diff --git a/src/basic/refcnt.h b/src/basic/refcnt.h
index ae2e446d6..0d5b3f4e1 100644
--- a/src/basic/refcnt.h
+++ b/src/basic/refcnt.h
@@ -5,19 +5,6 @@
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/>.
***/
/* A type-safe atomic refcounter.
diff --git a/src/basic/rm-rf.c b/src/basic/rm-rf.c
index 4bca7dc01..5165fcea3 100644
--- a/src/basic/rm-rf.c
+++ b/src/basic/rm-rf.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2015 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/>.
***/
#include <errno.h>
diff --git a/src/basic/rm-rf.h b/src/basic/rm-rf.h
index 6e63d3fea..53d8485a4 100644
--- a/src/basic/rm-rf.h
+++ b/src/basic/rm-rf.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2015 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/>.
***/
#include <sys/stat.h>
diff --git a/src/basic/selinux-util.c b/src/basic/selinux-util.c
index 955b8def7..518a6f5a4 100644
--- a/src/basic/selinux-util.c
+++ b/src/basic/selinux-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/selinux-util.h b/src/basic/selinux-util.h
index ea7386cdf..1509b1cc3 100644
--- a/src/basic/selinux-util.h
+++ b/src/basic/selinux-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/set.h b/src/basic/set.h
index 4ea0d96df..e85a6b221 100644
--- a/src/basic/set.h
+++ b/src/basic/set.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include "extract-word.h"
diff --git a/src/basic/sigbus.c b/src/basic/sigbus.c
index 2416929e3..d7db5b56a 100644
--- a/src/basic/sigbus.c
+++ b/src/basic/sigbus.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
#include <errno.h>
diff --git a/src/basic/sigbus.h b/src/basic/sigbus.h
index 90b0c9632..9c0c66a77 100644
--- a/src/basic/sigbus.h
+++ b/src/basic/sigbus.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
void sigbus_install(void);
diff --git a/src/basic/signal-util.c b/src/basic/signal-util.c
index fbaea0355..ce1c00bf3 100644
--- a/src/basic/signal-util.c
+++ b/src/basic/signal-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2015 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/>.
***/
#include <errno.h>
diff --git a/src/basic/signal-util.h b/src/basic/signal-util.h
index a66699179..daf8f404d 100644
--- a/src/basic/signal-util.h
+++ b/src/basic/signal-util.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2010-2015 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/>.
***/
#include <signal.h>
diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c
index d59b412f9..d292b6afb 100644
--- a/src/basic/smack-util.c
+++ b/src/basic/smack-util.c
@@ -5,19 +5,6 @@
Copyright 2013 Intel Corporation
Author: Auke Kok <auke-jan.h.kok@intel.com>
-
- 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/>.
***/
#include <errno.h>
diff --git a/src/basic/smack-util.h b/src/basic/smack-util.h
index 6f8e3ea0c..6821d4245 100644
--- a/src/basic/smack-util.h
+++ b/src/basic/smack-util.h
@@ -7,19 +7,6 @@
Copyright 2013 Intel Corporation
Author: Auke Kok <auke-jan.h.kok@intel.com>
-
- 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
index dcfa0e0d8..983a7b423 100644
--- a/src/basic/socket-util.c
+++ b/src/basic/socket-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <arpa/inet.h>
diff --git a/src/basic/socket-util.h b/src/basic/socket-util.h
index 75218755b..e9aa17f4d 100644
--- a/src/basic/socket-util.h
+++ b/src/basic/socket-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <netinet/ether.h>
diff --git a/src/basic/special.h b/src/basic/special.h
index 808d8896a..136a5b2da 100644
--- a/src/basic/special.h
+++ b/src/basic/special.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#define SPECIAL_DEFAULT_TARGET "default.target"
diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c
index 703368528..a1628efd9 100644
--- a/src/basic/stat-util.c
+++ b/src/basic/stat-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010-2012 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/>.
***/
#include <dirent.h>
diff --git a/src/basic/stat-util.h b/src/basic/stat-util.h
index cc21ba2aa..0a30c510a 100644
--- a/src/basic/stat-util.h
+++ b/src/basic/stat-util.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2010-2012 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
index f818a208a..87d8917a5 100644
--- a/src/basic/stdio-util.h
+++ b/src/basic/stdio-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#if 0 /// elogind is musl-libc compatible and does not directly include printf.h
diff --git a/src/basic/string-table.c b/src/basic/string-table.c
index d4b7c69bd..6857202f8 100644
--- a/src/basic/string-table.c
+++ b/src/basic/string-table.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include "string-table.h"
diff --git a/src/basic/string-table.h b/src/basic/string-table.h
index 4306b90f4..a39206fb9 100644
--- a/src/basic/string-table.h
+++ b/src/basic/string-table.h
@@ -6,19 +6,6 @@
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 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/>.
***/
#include <errno.h>
@@ -93,13 +80,11 @@ ssize_t string_table_lookup(const char * const *table, size_t len, const char *k
#define _DEFINE_STRING_TABLE_LOOKUP(name,type,scope) \
_DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,scope) \
- _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING(name,type,scope) \
- struct __useless_struct_to_allow_trailing_semicolon__
+ _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING(name,type,scope)
#define _DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(name,type,yes,scope) \
_DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,scope) \
- _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING_WITH_BOOLEAN(name,type,yes,scope) \
- struct __useless_struct_to_allow_trailing_semicolon__
+ _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING_WITH_BOOLEAN(name,type,yes,scope)
#define DEFINE_STRING_TABLE_LOOKUP(name,type) _DEFINE_STRING_TABLE_LOOKUP(name,type,)
#define DEFINE_PRIVATE_STRING_TABLE_LOOKUP(name,type) _DEFINE_STRING_TABLE_LOOKUP(name,type,static)
@@ -111,8 +96,7 @@ ssize_t string_table_lookup(const char * const *table, size_t len, const char *k
/* For string conversions where numbers are also acceptable */
#define DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(name,type,max) \
_DEFINE_STRING_TABLE_LOOKUP_TO_STRING_FALLBACK(name,type,max,) \
- _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING_FALLBACK(name,type,max,) \
- struct __useless_struct_to_allow_trailing_semicolon__
+ _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING_FALLBACK(name,type,max,)
#define DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING_FALLBACK(name,type,max) \
_DEFINE_STRING_TABLE_LOOKUP_TO_STRING_FALLBACK(name,type,max,static)
diff --git a/src/basic/string-util.c b/src/basic/string-util.c
index b4d351736..cb55f15e3 100644
--- a/src/basic/string-util.c
+++ b/src/basic/string-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/string-util.h b/src/basic/string-util.h
index dbdfe1383..ea5f453f2 100644
--- a/src/basic/string-util.h
+++ b/src/basic/string-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <alloca.h>
diff --git a/src/basic/strv.c b/src/basic/strv.c
index 2c635b951..067c7ec4f 100644
--- a/src/basic/strv.c
+++ b/src/basic/strv.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/strv.h b/src/basic/strv.h
index 7e921be18..c1261269f 100644
--- a/src/basic/strv.h
+++ b/src/basic/strv.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <fnmatch.h>
diff --git a/src/basic/syslog-util.c b/src/basic/syslog-util.c
index 6ce6ab2be..c3b91bfb6 100644
--- a/src/basic/syslog-util.c
+++ b/src/basic/syslog-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <string.h>
diff --git a/src/basic/syslog-util.h b/src/basic/syslog-util.h
index 75bf3b4ab..02778affb 100644
--- a/src/basic/syslog-util.h
+++ b/src/basic/syslog-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c
index cbc903aaf..a0ebb86cd 100644
--- a/src/basic/terminal-util.c
+++ b/src/basic/terminal-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/terminal-util.h b/src/basic/terminal-util.h
index 5aa0fc32f..1aa5ccc72 100644
--- a/src/basic/terminal-util.h
+++ b/src/basic/terminal-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdarg.h>
@@ -149,16 +136,13 @@ bool dev_console_colors_enabled(void);
#define DEFINE_ANSI_FUNC(name, NAME) \
static inline const char *ansi_##name(void) { \
return colors_enabled() ? ANSI_##NAME : ""; \
- } \
- struct __useless_struct_to_allow_trailing_semicolon__
+ }
#define DEFINE_ANSI_FUNC_UNDERLINE(name, NAME, REPLACEMENT) \
static inline const char *ansi_##name(void) { \
return underline_enabled() ? ANSI_##NAME : \
colors_enabled() ? ANSI_##REPLACEMENT : ""; \
- } \
- struct __useless_struct_to_allow_trailing_semicolon__
-
+ }
DEFINE_ANSI_FUNC(highlight, HIGHLIGHT);
DEFINE_ANSI_FUNC(highlight_red, HIGHLIGHT_RED);
diff --git a/src/basic/time-util.c b/src/basic/time-util.c
index f79d08ca8..28dc073ec 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/time-util.h b/src/basic/time-util.h
index bb8213bed..42d4f9889 100644
--- a/src/basic/time-util.h
+++ b/src/basic/time-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <inttypes.h>
diff --git a/src/basic/umask-util.h b/src/basic/umask-util.h
index 638b37d7d..ce705247d 100644
--- a/src/basic/umask-util.h
+++ b/src/basic/umask-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/unaligned.h b/src/basic/unaligned.h
index 73302b423..feddaa919 100644
--- a/src/basic/unaligned.h
+++ b/src/basic/unaligned.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2014 Tom Gundersen
-
- 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/>.
***/
#include <endian.h>
diff --git a/src/basic/unit-def.c b/src/basic/unit-def.c
index 387533f59..7361acb29 100644
--- a/src/basic/unit-def.c
+++ b/src/basic/unit-def.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include "alloc-util.h"
diff --git a/src/basic/unit-def.h b/src/basic/unit-def.h
index c142e069a..503867668 100644
--- a/src/basic/unit-def.h
+++ b/src/basic/unit-def.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c
index e94f1d6e9..3d5b0372f 100644
--- a/src/basic/unit-name.c
+++ b/src/basic/unit-name.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/unit-name.h b/src/basic/unit-name.h
index 50ac3e10b..3515fad4c 100644
--- a/src/basic/unit-name.h
+++ b/src/basic/unit-name.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/user-util.c b/src/basic/user-util.c
index f7b2a7c9d..55f4908c2 100644
--- a/src/basic/user-util.c
+++ b/src/basic/user-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <alloca.h>
diff --git a/src/basic/user-util.h b/src/basic/user-util.h
index 54581de15..e0de7a9a8 100644
--- a/src/basic/user-util.h
+++ b/src/basic/user-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
//#include <grp.h>
diff --git a/src/basic/utf8.c b/src/basic/utf8.c
index b17f42026..0dc76eba2 100644
--- a/src/basic/utf8.c
+++ b/src/basic/utf8.c
@@ -4,19 +4,6 @@
Copyright 2008-2011 Kay Sievers
Copyright 2012 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/>.
***/
/* Parts of this file are based on the GLIB utf8 validation functions. The
diff --git a/src/basic/utf8.h b/src/basic/utf8.h
index 712861518..c3a7d7b96 100644
--- a/src/basic/utf8.h
+++ b/src/basic/utf8.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/util.c b/src/basic/util.c
index 3ea2e6f67..8acb4e8f5 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <alloca.h>
diff --git a/src/basic/util.h b/src/basic/util.h
index 6ffc54f98..4a81243cc 100644
--- a/src/basic/util.h
+++ b/src/basic/util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <alloca.h>
diff --git a/src/basic/verbs.c b/src/basic/verbs.c
index caaa70aa5..743aed5e4 100644
--- a/src/basic/verbs.c
+++ b/src/basic/verbs.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
#include <errno.h>
diff --git a/src/basic/verbs.h b/src/basic/verbs.h
index d9259fc45..fde6a1fdc 100644
--- a/src/basic/verbs.h
+++ b/src/basic/verbs.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
#define VERB_ANY ((unsigned) -1)
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 4850384c0..f0a8e5fa2 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#if defined(__i386__) || defined(__x86_64__)
diff --git a/src/basic/virt.h b/src/basic/virt.h
index f985bb15f..0910e0df5 100644
--- a/src/basic/virt.h
+++ b/src/basic/virt.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <stdbool.h>
diff --git a/src/basic/xattr-util.c b/src/basic/xattr-util.c
index dc4e80217..2b50ee352 100644
--- a/src/basic/xattr-util.c
+++ b/src/basic/xattr-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/basic/xattr-util.h b/src/basic/xattr-util.h
index e593c210f..2176a4def 100644
--- a/src/basic/xattr-util.h
+++ b/src/basic/xattr-util.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/cgroups-agent/cgroups-agent.c b/src/cgroups-agent/cgroups-agent.c
index 50d6e5e18..9c026f755 100644
--- a/src/cgroups-agent/cgroups-agent.c
+++ b/src/cgroups-agent/cgroups-agent.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <stdlib.h>
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 429d4ca38..c52bdbf15 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <fcntl.h>
diff --git a/src/core/cgroup.h b/src/core/cgroup.h
index 29e8cb5e2..4e0155b11 100644
--- a/src/core/cgroup.h
+++ b/src/core/cgroup.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <stdbool.h>
diff --git a/src/core/meson.build b/src/core/meson.build
index 502628aea..70941d14d 100644
--- a/src/core/meson.build
+++ b/src/core/meson.build
@@ -1,19 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright 2017 Zbigniew Jędrzejewski-Szmek
-#
-# 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
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
#if 0 /// elogind has only two of the parts here in it...
# libcore_la_sources = '''
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index 4b5dd37d4..eda2328f0 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/core/mount-setup.h b/src/core/mount-setup.h
index 1fc5da28b..211a65589 100644
--- a/src/core/mount-setup.h
+++ b/src/core/mount-setup.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/libelogind/meson.build b/src/libelogind/meson.build
index fd6127790..bacf323bd 100644
--- a/src/libelogind/meson.build
+++ b/src/libelogind/meson.build
@@ -1,19 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright 2017 Zbigniew Jędrzejewski-Szmek
-#
-# 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
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
id128_sources = files('''
sd-id128/id128-util.c
diff --git a/src/libelogind/sd-bus/bus-common-errors.c b/src/libelogind/sd-bus/bus-common-errors.c
index da67f68a7..74e987c00 100644
--- a/src/libelogind/sd-bus/bus-common-errors.c
+++ b/src/libelogind/sd-bus/bus-common-errors.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include <errno.h>
diff --git a/src/libelogind/sd-bus/bus-common-errors.h b/src/libelogind/sd-bus/bus-common-errors.h
index 496c882fb..7c923360e 100644
--- a/src/libelogind/sd-bus/bus-common-errors.h
+++ b/src/libelogind/sd-bus/bus-common-errors.h
@@ -5,19 +5,6 @@
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/>.
***/
#include "bus-error.h"
diff --git a/src/libelogind/sd-bus/bus-container.c b/src/libelogind/sd-bus/bus-container.c
index 477f7053e..a9127376c 100644
--- a/src/libelogind/sd-bus/bus-container.c
+++ b/src/libelogind/sd-bus/bus-container.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <fcntl.h>
diff --git a/src/libelogind/sd-bus/bus-container.h b/src/libelogind/sd-bus/bus-container.h
index 6921ffd52..168658461 100644
--- a/src/libelogind/sd-bus/bus-container.h
+++ b/src/libelogind/sd-bus/bus-container.h
@@ -5,19 +5,6 @@
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/>.
***/
#include "sd-bus.h"
diff --git a/src/libelogind/sd-bus/bus-control.c b/src/libelogind/sd-bus/bus-control.c
index 50f2b3fc1..cf340747a 100644
--- a/src/libelogind/sd-bus/bus-control.c
+++ b/src/libelogind/sd-bus/bus-control.c
@@ -3,19 +3,6 @@
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/>.
***/
#if HAVE_VALGRIND_MEMCHECK_H
diff --git a/src/libelogind/sd-bus/bus-control.h b/src/libelogind/sd-bus/bus-control.h
index 3d9acebaf..a9edc8cb7 100644
--- a/src/libelogind/sd-bus/bus-control.h
+++ b/src/libelogind/sd-bus/bus-control.h
@@ -5,19 +5,6 @@
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/>.
***/
#include "sd-bus.h"
diff --git a/src/libelogind/sd-bus/bus-convenience.c b/src/libelogind/sd-bus/bus-convenience.c
index 8da6640ca..2ac8cfa63 100644
--- a/src/libelogind/sd-bus/bus-convenience.c
+++ b/src/libelogind/sd-bus/bus-convenience.c
@@ -3,19 +3,6 @@
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/>.
***/
#include "bus-internal.h"
diff --git a/src/libelogind/sd-bus/bus-creds.c b/src/libelogind/sd-bus/bus-creds.c
index 308e8dc54..7db80e72f 100644
--- a/src/libelogind/sd-bus/bus-creds.c
+++ b/src/libelogind/sd-bus/bus-creds.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <linux/capability.h>
diff --git a/src/libelogind/sd-bus/bus-creds.h b/src/libelogind/sd-bus/bus-creds.h
index c4c60fa2d..723a833d6 100644
--- a/src/libelogind/sd-bus/bus-creds.h
+++ b/src/libelogind/sd-bus/bus-creds.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <stdbool.h>
diff --git a/src/libelogind/sd-bus/bus-error.c b/src/libelogind/sd-bus/bus-error.c
index 3939d0a4e..5e8846be4 100644
--- a/src/libelogind/sd-bus/bus-error.c
+++ b/src/libelogind/sd-bus/bus-error.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <errno.h>
@@ -108,6 +95,7 @@ static int bus_error_name_to_errno(const char *name) {
}
m = __start_BUS_ERROR_MAP;
+#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
while (m < __stop_BUS_ERROR_MAP) {
/* For magic ELF error maps, the end marker might
* appear in the middle of things, since multiple maps
@@ -125,6 +113,7 @@ static int bus_error_name_to_errno(const char *name) {
m++;
}
+#endif
return EIO;
}
diff --git a/src/libelogind/sd-bus/bus-error.h b/src/libelogind/sd-bus/bus-error.h
index 6181e37d8..4f704627c 100644
--- a/src/libelogind/sd-bus/bus-error.h
+++ b/src/libelogind/sd-bus/bus-error.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <stdbool.h>
diff --git a/src/libelogind/sd-bus/bus-gvariant.c b/src/libelogind/sd-bus/bus-gvariant.c
index e6ab984d1..0edae49d5 100644
--- a/src/libelogind/sd-bus/bus-gvariant.c
+++ b/src/libelogind/sd-bus/bus-gvariant.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <errno.h>
diff --git a/src/libelogind/sd-bus/bus-gvariant.h b/src/libelogind/sd-bus/bus-gvariant.h
index 474e13156..dcf04609c 100644
--- a/src/libelogind/sd-bus/bus-gvariant.h
+++ b/src/libelogind/sd-bus/bus-gvariant.h
@@ -5,19 +5,6 @@
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/>.
***/
#include "macro.h"
diff --git a/src/libelogind/sd-bus/bus-internal.c b/src/libelogind/sd-bus/bus-internal.c
index 57319a95d..23ac2d0bc 100644
--- a/src/libelogind/sd-bus/bus-internal.c
+++ b/src/libelogind/sd-bus/bus-internal.c
@@ -3,19 +3,6 @@
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/>.
***/
#include "alloc-util.h"
diff --git a/src/libelogind/sd-bus/bus-internal.h b/src/libelogind/sd-bus/bus-internal.h
index 14d2e3295..7c05b497d 100644
--- a/src/libelogind/sd-bus/bus-internal.h
+++ b/src/libelogind/sd-bus/bus-internal.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <pthread.h>
diff --git a/src/libelogind/sd-bus/bus-introspect.c b/src/libelogind/sd-bus/bus-introspect.c
index 205bcee8f..dab2bd61b 100644
--- a/src/libelogind/sd-bus/bus-introspect.c
+++ b/src/libelogind/sd-bus/bus-introspect.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <stdio_ext.h>
diff --git a/src/libelogind/sd-bus/bus-introspect.h b/src/libelogind/sd-bus/bus-introspect.h
index 5d2d5a17d..e3f8ced72 100644
--- a/src/libelogind/sd-bus/bus-introspect.h
+++ b/src/libelogind/sd-bus/bus-introspect.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <stdio.h>
diff --git a/src/libelogind/sd-bus/bus-kernel.c b/src/libelogind/sd-bus/bus-kernel.c
index a12aa153e..e3cb13a44 100644
--- a/src/libelogind/sd-bus/bus-kernel.c
+++ b/src/libelogind/sd-bus/bus-kernel.c
@@ -3,19 +3,6 @@
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/>.
***/
#if HAVE_VALGRIND_MEMCHECK_H
diff --git a/src/libelogind/sd-bus/bus-kernel.h b/src/libelogind/sd-bus/bus-kernel.h
index 919b29f0c..adba108c1 100644
--- a/src/libelogind/sd-bus/bus-kernel.h
+++ b/src/libelogind/sd-bus/bus-kernel.h
@@ -5,19 +5,6 @@
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/>.
***/
#include "sd-bus.h"
diff --git a/src/libelogind/sd-bus/bus-match.c b/src/libelogind/sd-bus/bus-match.c
index 82b29af8b..65947264f 100644
--- a/src/libelogind/sd-bus/bus-match.c
+++ b/src/libelogind/sd-bus/bus-match.c
@@ -3,19 +3,6 @@
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/>.
***/
//#include <stdio_ext.h>
diff --git a/src/libelogind/sd-bus/bus-match.h b/src/libelogind/sd-bus/bus-match.h
index baaaa719a..aa59ae484 100644
--- a/src/libelogind/sd-bus/bus-match.h
+++ b/src/libelogind/sd-bus/bus-match.h
@@ -5,19 +5,6 @@
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/>.
***/
#include "sd-bus.h"
diff --git a/src/libelogind/sd-bus/bus-message.c b/src/libelogind/sd-bus/bus-message.c
index cf8008bda..c26df38d2 100644
--- a/src/libelogind/sd-bus/bus-message.c
+++ b/src/libelogind/sd-bus/bus-message.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <errno.h>
diff --git a/src/libelogind/sd-bus/bus-message.h b/src/libelogind/sd-bus/bus-message.h
index 26cf2e0c7..b7c2dc57d 100644
--- a/src/libelogind/sd-bus/bus-message.h
+++ b/src/libelogind/sd-bus/bus-message.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <byteswap.h>
diff --git a/src/libelogind/sd-bus/bus-objects.c b/src/libelogind/sd-bus/bus-objects.c
index 08015a99e..154801425 100644
--- a/src/libelogind/sd-bus/bus-objects.c
+++ b/src/libelogind/sd-bus/bus-objects.c
@@ -3,19 +3,6 @@
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/>.
***/
#include "alloc-util.h"
diff --git a/src/libelogind/sd-bus/bus-objects.h b/src/libelogind/sd-bus/bus-objects.h
index 6bffeda72..218ee678a 100644
--- a/src/libelogind/sd-bus/bus-objects.h
+++ b/src/libelogind/sd-bus/bus-objects.h
@@ -5,19 +5,6 @@
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/>.
***/
#include "bus-internal.h"
diff --git a/src/libelogind/sd-bus/bus-protocol.h b/src/libelogind/sd-bus/bus-protocol.h
index 0d5dfd947..ed9ecd641 100644
--- a/src/libelogind/sd-bus/bus-protocol.h
+++ b/src/libelogind/sd-bus/bus-protocol.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <endian.h>
diff --git a/src/libelogind/sd-bus/bus-signature.c b/src/libelogind/sd-bus/bus-signature.c
index f3cd9bd0f..ab9afdb49 100644
--- a/src/libelogind/sd-bus/bus-signature.c
+++ b/src/libelogind/sd-bus/bus-signature.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <util.h>
diff --git a/src/libelogind/sd-bus/bus-signature.h b/src/libelogind/sd-bus/bus-signature.h
index a6be1844e..73c2e1ea2 100644
--- a/src/libelogind/sd-bus/bus-signature.h
+++ b/src/libelogind/sd-bus/bus-signature.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <stdbool.h>
diff --git a/src/libelogind/sd-bus/bus-slot.c b/src/libelogind/sd-bus/bus-slot.c
index 9a5637171..06b9b0edb 100644
--- a/src/libelogind/sd-bus/bus-slot.c
+++ b/src/libelogind/sd-bus/bus-slot.c
@@ -3,19 +3,6 @@
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/>.
***/
#include "sd-bus.h"
diff --git a/src/libelogind/sd-bus/bus-slot.h b/src/libelogind/sd-bus/bus-slot.h
index beebaa167..5352f6379 100644
--- a/src/libelogind/sd-bus/bus-slot.h
+++ b/src/libelogind/sd-bus/bus-slot.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
#include "sd-bus.h"
diff --git a/src/libelogind/sd-bus/bus-socket.c b/src/libelogind/sd-bus/bus-socket.c
index 082688b17..54feddf9e 100644
--- a/src/libelogind/sd-bus/bus-socket.c
+++ b/src/libelogind/sd-bus/bus-socket.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <endian.h>
diff --git a/src/libelogind/sd-bus/bus-socket.h b/src/libelogind/sd-bus/bus-socket.h
index c180562f9..0bc5b6360 100644
--- a/src/libelogind/sd-bus/bus-socket.h
+++ b/src/libelogind/sd-bus/bus-socket.h
@@ -5,19 +5,6 @@
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/>.
***/
#include "sd-bus.h"
diff --git a/src/libelogind/sd-bus/bus-track.c b/src/libelogind/sd-bus/bus-track.c
index 5482d39a0..168c6c5ac 100644
--- a/src/libelogind/sd-bus/bus-track.c
+++ b/src/libelogind/sd-bus/bus-track.c
@@ -3,19 +3,6 @@
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/>.
***/
#include "sd-bus.h"
diff --git a/src/libelogind/sd-bus/bus-track.h b/src/libelogind/sd-bus/bus-track.h
index 0c5636b7e..769211dbe 100644
--- a/src/libelogind/sd-bus/bus-track.h
+++ b/src/libelogind/sd-bus/bus-track.h
@@ -5,19 +5,6 @@
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/>.
***/
void bus_track_dispatch(sd_bus_track *track);
diff --git a/src/libelogind/sd-bus/bus-type.c b/src/libelogind/sd-bus/bus-type.c
index 8a7b522c3..5288e379a 100644
--- a/src/libelogind/sd-bus/bus-type.c
+++ b/src/libelogind/sd-bus/bus-type.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <errno.h>
diff --git a/src/libelogind/sd-bus/bus-type.h b/src/libelogind/sd-bus/bus-type.h
index 834f09777..dd8e552df 100644
--- a/src/libelogind/sd-bus/bus-type.h
+++ b/src/libelogind/sd-bus/bus-type.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <stdbool.h>
diff --git a/src/libelogind/sd-bus/sd-bus.c b/src/libelogind/sd-bus/sd-bus.c
index 71a96ac00..b0874515e 100644
--- a/src/libelogind/sd-bus/sd-bus.c
+++ b/src/libelogind/sd-bus/sd-bus.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <endian.h>
diff --git a/src/libelogind/sd-bus/test-bus-error.c b/src/libelogind/sd-bus/test-bus-error.c
index 296e123ec..135166e2f 100644
--- a/src/libelogind/sd-bus/test-bus-error.c
+++ b/src/libelogind/sd-bus/test-bus-error.c
@@ -3,19 +3,6 @@
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/>.
***/
#include "sd-bus.h"
diff --git a/src/libelogind/sd-bus/test-bus-introspect.c b/src/libelogind/sd-bus/test-bus-introspect.c
index 8dee93676..4b5039a07 100644
--- a/src/libelogind/sd-bus/test-bus-introspect.c
+++ b/src/libelogind/sd-bus/test-bus-introspect.c
@@ -3,19 +3,6 @@
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/>.
***/
#include "bus-introspect.h"
diff --git a/src/libelogind/sd-bus/test-bus-match.c b/src/libelogind/sd-bus/test-bus-match.c
index 47b45647c..1fe3c1462 100644
--- a/src/libelogind/sd-bus/test-bus-match.c
+++ b/src/libelogind/sd-bus/test-bus-match.c
@@ -3,19 +3,6 @@
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/>.
***/
#include "bus-match.h"
diff --git a/src/libelogind/sd-bus/test-bus-server.c b/src/libelogind/sd-bus/test-bus-server.c
index 245f5707e..f862dc06e 100644
--- a/src/libelogind/sd-bus/test-bus-server.c
+++ b/src/libelogind/sd-bus/test-bus-server.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <pthread.h>
diff --git a/src/libelogind/sd-bus/test-bus-signature.c b/src/libelogind/sd-bus/test-bus-signature.c
index aa6160d1c..8a2cd3430 100644
--- a/src/libelogind/sd-bus/test-bus-signature.c
+++ b/src/libelogind/sd-bus/test-bus-signature.c
@@ -3,19 +3,6 @@
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/>.
***/
#include "bus-internal.h"
diff --git a/src/libelogind/sd-daemon/sd-daemon.c b/src/libelogind/sd-daemon/sd-daemon.c
index b26d387ef..d60eb561d 100644
--- a/src/libelogind/sd-daemon/sd-daemon.c
+++ b/src/libelogind/sd-daemon/sd-daemon.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/libelogind/sd-event/sd-event.c b/src/libelogind/sd-event/sd-event.c
index eda32f671..a32fe9fd7 100644
--- a/src/libelogind/sd-event/sd-event.c
+++ b/src/libelogind/sd-event/sd-event.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <sys/epoll.h>
@@ -2403,7 +2390,6 @@ static int event_prepare(sd_event *e) {
static int dispatch_exit(sd_event *e) {
sd_event_source *p;
- _cleanup_(sd_event_unrefp) sd_event *ref = NULL;
int r;
assert(e);
@@ -2414,11 +2400,15 @@ static int dispatch_exit(sd_event *e) {
return 0;
}
- ref = sd_event_ref(e);
+ sd_event_ref(e);
e->iteration++;
e->state = SD_EVENT_EXITING;
+
r = source_dispatch(p);
+
e->state = SD_EVENT_INITIAL;
+ sd_event_unref(e);
+
return r;
}
@@ -2658,12 +2648,14 @@ _public_ int sd_event_dispatch(sd_event *e) {
p = event_next_pending(e);
if (p) {
- _cleanup_(sd_event_unrefp) sd_event *ref = NULL;
+ sd_event_ref(e);
- ref = sd_event_ref(e);
e->state = SD_EVENT_RUNNING;
r = source_dispatch(p);
e->state = SD_EVENT_INITIAL;
+
+ sd_event_unref(e);
+
return r;
}
@@ -2730,7 +2722,6 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) {
}
_public_ int sd_event_loop(sd_event *e) {
- _cleanup_(sd_event_unrefp) sd_event *ref = NULL;
int r;
assert_return(e, -EINVAL);
@@ -2738,15 +2729,19 @@ _public_ int sd_event_loop(sd_event *e) {
assert_return(!event_pid_changed(e), -ECHILD);
assert_return(e->state == SD_EVENT_INITIAL, -EBUSY);
- ref = sd_event_ref(e);
+ sd_event_ref(e);
while (e->state != SD_EVENT_FINISHED) {
r = sd_event_run(e, (uint64_t) -1);
if (r < 0)
- return r;
+ goto finish;
}
- return e->exit_code;
+ r = e->exit_code;
+
+finish:
+ sd_event_unref(e);
+ return r;
}
_public_ int sd_event_get_fd(sd_event *e) {
diff --git a/src/libelogind/sd-event/test-event.c b/src/libelogind/sd-event/test-event.c
index c51af4b9a..95b0f0f8e 100644
--- a/src/libelogind/sd-event/test-event.c
+++ b/src/libelogind/sd-event/test-event.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <sys/wait.h>
diff --git a/src/libelogind/sd-id128/id128-util.c b/src/libelogind/sd-id128/id128-util.c
index 330cd0b01..91c26a0c8 100644
--- a/src/libelogind/sd-id128/id128-util.c
+++ b/src/libelogind/sd-id128/id128-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2016 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/>.
***/
#include <errno.h>
diff --git a/src/libelogind/sd-id128/id128-util.h b/src/libelogind/sd-id128/id128-util.h
index 8af8abbb4..a8b106044 100644
--- a/src/libelogind/sd-id128/id128-util.h
+++ b/src/libelogind/sd-id128/id128-util.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2016 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/>.
***/
#include <stdbool.h>
diff --git a/src/libelogind/sd-id128/sd-id128.c b/src/libelogind/sd-id128/sd-id128.c
index 561bcdf4f..af2ff8353 100644
--- a/src/libelogind/sd-id128/sd-id128.c
+++ b/src/libelogind/sd-id128/sd-id128.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <errno.h>
diff --git a/src/libelogind/sd-login/sd-login.c b/src/libelogind/sd-login/sd-login.c
index f47a8a1b8..34ca3ddce 100644
--- a/src/libelogind/sd-login/sd-login.c
+++ b/src/libelogind/sd-login/sd-login.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <errno.h>
diff --git a/src/libelogind/sd-login/test-login.c b/src/libelogind/sd-login/test-login.c
index bdd1b8909..ac3e1f69b 100644
--- a/src/libelogind/sd-login/test-login.c
+++ b/src/libelogind/sd-login/test-login.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <poll.h>
diff --git a/src/login/inhibit.c b/src/login/inhibit.c
index be28b4665..f3a209bfb 100644
--- a/src/login/inhibit.c
+++ b/src/login/inhibit.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
#include <fcntl.h>
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index 40f3bd241..344f3c769 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c
index 3f355e7ea..178ba5cef 100644
--- a/src/login/logind-acl.c
+++ b/src/login/logind-acl.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <errno.h>
diff --git a/src/login/logind-acl.h b/src/login/logind-acl.h
index d50b887bc..bbe1bb14f 100644
--- a/src/login/logind-acl.h
+++ b/src/login/logind-acl.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <stdbool.h>
diff --git a/src/login/logind-action.c b/src/login/logind-action.c
index f431a1b80..21d68d828 100644
--- a/src/login/logind-action.c
+++ b/src/login/logind-action.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
#include <unistd.h>
diff --git a/src/login/logind-action.h b/src/login/logind-action.h
index 9f5dee684..8c7de83e8 100644
--- a/src/login/logind-action.h
+++ b/src/login/logind-action.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
typedef enum HandleAction {
diff --git a/src/login/logind-button.c b/src/login/logind-button.c
index 2da6e6995..4937d55bb 100644
--- a/src/login/logind-button.c
+++ b/src/login/logind-button.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
#include <errno.h>
diff --git a/src/login/logind-button.h b/src/login/logind-button.h
index b47eb4757..0b3936eb3 100644
--- a/src/login/logind-button.h
+++ b/src/login/logind-button.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
typedef struct Button Button;
diff --git a/src/login/logind-core.c b/src/login/logind-core.c
index 0aa22b8af..6e74d8ef4 100644
--- a/src/login/logind-core.c
+++ b/src/login/logind-core.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <fcntl.h>
@@ -302,6 +289,7 @@ int manager_get_session_by_pid(Manager *m, pid_t pid, Session **ret) {
goto not_found;
s = hashmap_get(m->session_units, unit);
+ if (!s)
goto not_found;
if (ret)
@@ -316,7 +304,6 @@ int manager_get_session_by_pid(Manager *m, pid_t pid, Session **ret) {
log_debug_elogind("Session Name \"%s\" -> Session \"%s\"",
session_name, s && s->id ? s->id : "NULL");
#endif // 0
- if (!s)
return 1;
@@ -349,6 +336,10 @@ int manager_get_user_by_pid(Manager *m, pid_t pid, User **ret) {
if (!u)
goto not_found;
+ if (ret)
+ *ret = u;
+
+ return 1;
not_found:
if (ret)
@@ -364,7 +355,6 @@ not_found:
*user = s->user;
#endif // 0
- return 1;
}
int manager_get_idle_hint(Manager *m, dual_timestamp *t) {
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 0d4145967..e53644f8d 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <errno.h>
diff --git a/src/login/logind-device.c b/src/login/logind-device.c
index 758ba73c2..69e89ccb5 100644
--- a/src/login/logind-device.c
+++ b/src/login/logind-device.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <string.h>
diff --git a/src/login/logind-device.h b/src/login/logind-device.h
index d0911560d..f6a4fafa6 100644
--- a/src/login/logind-device.h
+++ b/src/login/logind-device.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
typedef struct Device Device;
diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c
index f814376e8..0938f2f10 100644
--- a/src/login/logind-inhibit.c
+++ b/src/login/logind-inhibit.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
#include <errno.h>
diff --git a/src/login/logind-inhibit.h b/src/login/logind-inhibit.h
index cc6c62ab1..32626118e 100644
--- a/src/login/logind-inhibit.h
+++ b/src/login/logind-inhibit.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
typedef struct Inhibitor Inhibitor;
diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c
index 0b2824ee2..56a06ccec 100644
--- a/src/login/logind-seat-dbus.c
+++ b/src/login/logind-seat-dbus.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <errno.h>
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
index 0b7a1adab..67791bef1 100644
--- a/src/login/logind-seat.c
+++ b/src/login/logind-seat.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <errno.h>
@@ -566,8 +553,7 @@ void seat_complete_switch(Seat *s) {
if (!s->pending_switch)
return;
- session = s->pending_switch;
- s->pending_switch = NULL;
+ session = TAKE_PTR(s->pending_switch);
seat_set_active(s, session);
}
diff --git a/src/login/logind-seat.h b/src/login/logind-seat.h
index ed2df6bbe..439abc0d8 100644
--- a/src/login/logind-seat.h
+++ b/src/login/logind-seat.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
typedef struct Seat Seat;
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c
index a0c3eda8f..fc0e77361 100644
--- a/src/login/logind-session-dbus.c
+++ b/src/login/logind-session-dbus.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <errno.h>
diff --git a/src/login/logind-session-device.c b/src/login/logind-session-device.c
index fc6027333..2f51881d3 100644
--- a/src/login/logind-session-device.c
+++ b/src/login/logind-session-device.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2013 David Herrmann
-
- 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/>.
***/
#include <fcntl.h>
@@ -197,19 +184,16 @@ static int session_device_start(SessionDevice *sd) {
switch (sd->type) {
case DEVICE_TYPE_DRM:
-
if (sd->fd < 0) {
- /* Open device if it isn't open yet */
- sd->fd = session_device_open(sd, true);
- if (sd->fd < 0)
- return sd->fd;
- } else {
- /* Device is kept open. Simply call drmSetMaster() and hope there is no-one else. In case it fails, we
- * keep the device paused. Maybe at some point we have a drmStealMaster(). */
- r = sd_drmsetmaster(sd->fd);
- if (r < 0)
- return r;
+ log_error("Failed to re-activate DRM fd, as the fd was lost (maybe logind restart went wrong?)");
+ return -EBADF;
}
+
+ /* Device is kept open. Simply call drmSetMaster() and hope there is no-one else. In case it fails, we
+ * keep the device paused. Maybe at some point we have a drmStealMaster(). */
+ r = sd_drmsetmaster(sd->fd);
+ if (r < 0)
+ return r;
break;
case DEVICE_TYPE_EVDEV:
@@ -243,6 +227,11 @@ static void session_device_stop(SessionDevice *sd) {
switch (sd->type) {
case DEVICE_TYPE_DRM:
+ if (sd->fd < 0) {
+ log_error("Failed to de-activate DRM fd, as the fd was lost (maybe logind restart went wrong?)");
+ return;
+ }
+
/* On DRM devices we simply drop DRM-Master but keep it open.
* This allows the user to keep resources allocated. The
* CAP_SYS_ADMIN restriction to DRM-Master prevents users from
@@ -420,15 +409,21 @@ error:
void session_device_free(SessionDevice *sd) {
assert(sd);
+ /* Make sure to remove the pushed fd. */
if (sd->pushed_fd) {
- const char *m;
-
- /* Remove the pushed fd again, just in case. */
-
- m = strjoina("FDSTOREREMOVE=1\n"
- "FDNAME=session-", sd->session->id);
-
- (void) sd_notify(false, m);
+ _cleanup_free_ char *m = NULL;
+ const char *id;
+ int r;
+
+ /* Session ID does not contain separators. */
+ id = sd->session->id;
+ assert(*(id + strcspn(id, "-\n")) == '\0');
+
+ r = asprintf(&m, "FDSTOREREMOVE=1\n"
+ "FDNAME=session-%s-device-%u-%u\n",
+ id, major(sd->dev), minor(sd->dev));
+ if (r >= 0)
+ (void) sd_notify(false, m);
}
session_device_stop(sd);
@@ -514,7 +509,8 @@ unsigned int session_device_try_pause_all(Session *s) {
}
int session_device_save(SessionDevice *sd) {
- const char *m;
+ _cleanup_free_ char *m = NULL;
+ const char *id;
int r;
assert(sd);
@@ -528,9 +524,16 @@ int session_device_save(SessionDevice *sd) {
if (sd->pushed_fd)
return 0;
-
- m = strjoina("FDSTORE=1\n"
- "FDNAME=session-", sd->session->id);
+
+ /* Session ID does not contain separators. */
+ id = sd->session->id;
+ assert(*(id + strcspn(id, "-\n")) == '\0');
+
+ r = asprintf(&m, "FDSTORE=1\n"
+ "FDNAME=session-%s-device-%u-%u\n",
+ id, major(sd->dev), minor(sd->dev));
+ if (r < 0)
+ return r;
r = sd_pid_notify_with_fds(0, false, m, &sd->fd, 1);
if (r < 0)
diff --git a/src/login/logind-session-device.h b/src/login/logind-session-device.h
index a9ead7bdc..e1c0ac38b 100644
--- a/src/login/logind-session-device.h
+++ b/src/login/logind-session-device.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2013 David Herrmann
-
- 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/>.
***/
typedef enum DeviceType DeviceType;
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 612feaefa..5967127e6 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <errno.h>
diff --git a/src/login/logind-session.h b/src/login/logind-session.h
index 0e8401b72..1eef439ae 100644
--- a/src/login/logind-session.h
+++ b/src/login/logind-session.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
typedef struct Session Session;
diff --git a/src/login/logind-user-dbus.c b/src/login/logind-user-dbus.c
index ef1fce8bd..cc694b672 100644
--- a/src/login/logind-user-dbus.c
+++ b/src/login/logind-user-dbus.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <errno.h>
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index fd17b470e..b1485037b 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <errno.h>
diff --git a/src/login/logind-user.h b/src/login/logind-user.h
index 4d9707e73..158288dd2 100644
--- a/src/login/logind-user.h
+++ b/src/login/logind-user.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
typedef struct User User;
diff --git a/src/login/logind-utmp.c b/src/login/logind-utmp.c
index f6667609f..3cc3b210c 100644
--- a/src/login/logind-utmp.c
+++ b/src/login/logind-utmp.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2015 Daniel Mack
-
- 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/>.
***/
#include <errno.h>
diff --git a/src/login/logind.c b/src/login/logind.c
index f431d31a8..5407c3c33 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <errno.h>
diff --git a/src/login/logind.h b/src/login/logind.h
index c72d10ef2..b51cea2fb 100644
--- a/src/login/logind.h
+++ b/src/login/logind.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <stdbool.h>
diff --git a/src/login/meson.build b/src/login/meson.build
index f513c543d..8efc571c0 100644
--- a/src/login/meson.build
+++ b/src/login/meson.build
@@ -1,19 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright 2017 Zbigniew Jędrzejewski-Szmek
-#
-# 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
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# elogind 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/>.
#if 0 /// rename to elogind
#
# systemd_logind_sources = files('''
diff --git a/src/login/pam_elogind.c b/src/login/pam_elogind.c
index dfd352495..abfecb05f 100644
--- a/src/login/pam_elogind.c
+++ b/src/login/pam_elogind.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <endian.h>
diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c
index 16bb5118b..5aa600278 100644
--- a/src/login/sysfs-show.c
+++ b/src/login/sysfs-show.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/login/sysfs-show.h b/src/login/sysfs-show.h
index 15c902cc3..17963a6fe 100644
--- a/src/login/sysfs-show.h
+++ b/src/login/sysfs-show.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <sys/types.h>
diff --git a/src/login/test-inhibit.c b/src/login/test-inhibit.c
index ad4700f32..debfc273a 100644
--- a/src/login/test-inhibit.c
+++ b/src/login/test-inhibit.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
#include <unistd.h>
diff --git a/src/login/test-login-shared.c b/src/login/test-login-shared.c
index 5f1e46323..99bfa17ef 100644
--- a/src/login/test-login-shared.c
+++ b/src/login/test-login-shared.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2013 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include "login-util.h"
diff --git a/src/login/test-login-tables.c b/src/login/test-login-tables.c
index 7772f4b85..8e2f760c9 100644
--- a/src/login/test-login-tables.c
+++ b/src/login/test-login-tables.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2013 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include "logind-action.h"
diff --git a/src/shared/acl-util.c b/src/shared/acl-util.c
index 70f22bb90..e6360335d 100644
--- a/src/shared/acl-util.c
+++ b/src/shared/acl-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011,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/>.
***/
#include <errno.h>
diff --git a/src/shared/acl-util.h b/src/shared/acl-util.h
index fde21e0f3..9aa37287d 100644
--- a/src/shared/acl-util.h
+++ b/src/shared/acl-util.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#if HAVE_ACL
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
index ff098b703..55e686ab5 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <errno.h>
diff --git a/src/shared/bus-util.h b/src/shared/bus-util.h
index b755e7d0a..d22b7d8c1 100644
--- a/src/shared/bus-util.h
+++ b/src/shared/bus-util.h
@@ -5,19 +5,6 @@
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/>.
***/
#include <stdbool.h>
diff --git a/src/shared/clean-ipc.c b/src/shared/clean-ipc.c
index 9d13f3e27..3e30877c0 100644
--- a/src/shared/clean-ipc.c
+++ b/src/shared/clean-ipc.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
#include <dirent.h>
diff --git a/src/shared/clean-ipc.h b/src/shared/clean-ipc.h
index 15b528dd9..9f0806e44 100644
--- a/src/shared/clean-ipc.h
+++ b/src/shared/clean-ipc.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
#include <sys/types.h>
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index eebc05b0e..1b09b20a5 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h
index 776fc844b..aff673acc 100644
--- a/src/shared/conf-parser.h
+++ b/src/shared/conf-parser.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <errno.h>
@@ -165,6 +152,7 @@ int config_parse_strv(GENERIC_PARSER_ARGS);
int config_parse_sec(GENERIC_PARSER_ARGS);
int config_parse_nsec(GENERIC_PARSER_ARGS);
int config_parse_mode(GENERIC_PARSER_ARGS);
+int config_parse_warn_compat(GENERIC_PARSER_ARGS);
int config_parse_log_facility(GENERIC_PARSER_ARGS);
int config_parse_log_level(GENERIC_PARSER_ARGS);
int config_parse_signal(GENERIC_PARSER_ARGS);
@@ -175,6 +163,12 @@ int config_parse_ip_port(GENERIC_PARSER_ARGS);
int config_parse_join_controllers(GENERIC_PARSER_ARGS);
#endif // 0
+typedef enum Disabled {
+ DISABLED_CONFIGURATION,
+ DISABLED_LEGACY,
+ DISABLED_EXPERIMENTAL,
+} Disabled;
+
#define DEFINE_CONFIG_PARSE_ENUM(function,name,type,msg) \
int function(GENERIC_PARSER_ARGS) { \
type *i = data, x; \
diff --git a/src/shared/meson.build b/src/shared/meson.build
index 341eb52cb..04de8926b 100644
--- a/src/shared/meson.build
+++ b/src/shared/meson.build
@@ -1,19 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright 2017 Zbigniew Jędrzejewski-Szmek
-#
-# 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
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
#if 0 /// elogind has a much shorter list
# shared_sources = '''
diff --git a/src/shared/nsflags.c b/src/shared/nsflags.c
index 1a9c8ca07..2b4f6e664 100644
--- a/src/shared/nsflags.c
+++ b/src/shared/nsflags.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2016 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/>.
***/
#include <sched.h>
diff --git a/src/shared/nsflags.h b/src/shared/nsflags.h
index f374a4883..297b4ccc6 100644
--- a/src/shared/nsflags.h
+++ b/src/shared/nsflags.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2016 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/>.
***/
#include <sched.h>
diff --git a/src/shared/output-mode.c b/src/shared/output-mode.c
index 5256e917a..89be1d68a 100644
--- a/src/shared/output-mode.c
+++ b/src/shared/output-mode.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
#include "output-mode.h"
diff --git a/src/shared/output-mode.h b/src/shared/output-mode.h
index 747f7eb1b..3aa7b295e 100644
--- a/src/shared/output-mode.h
+++ b/src/shared/output-mode.h
@@ -5,19 +5,6 @@
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/>.
***/
#include "macro.h"
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
index 1086e689f..fdaa3f39b 100644
--- a/src/shared/sleep-config.c
+++ b/src/shared/sleep-config.c
@@ -4,23 +4,9 @@
Copyright 2013 Zbigniew Jędrzejewski-Szmek
Copyright 2018 Dell Inc.
-
- 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/>.
***/
//#include <errno.h>
-//#include <linux/fs.h>
//#include <stdbool.h>
//#include <stddef.h>
//#include <stdio.h>
@@ -194,10 +180,13 @@ int can_sleep_disk(char **types) {
#define HIBERNATION_SWAP_THRESHOLD 0.98
-int find_hibernate_location(char **device, char **type, size_t *size, size_t *used) {
+static int hibernation_partition_size(size_t *size, size_t *used) {
_cleanup_fclose_ FILE *f;
unsigned i;
+ assert(size);
+ assert(used);
+
f = fopen("/proc/swaps", "re");
if (!f) {
log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
@@ -209,7 +198,7 @@ int find_hibernate_location(char **device, char **type, size_t *size, size_t *us
(void) fscanf(f, "%*s %*s %*s %*s %*s\n");
for (i = 1;; i++) {
- _cleanup_free_ char *dev_field = NULL, *type_field = NULL;
+ _cleanup_free_ char *dev = NULL, *type = NULL;
size_t size_field, used_field;
int k;
@@ -219,7 +208,7 @@ int find_hibernate_location(char **device, char **type, size_t *size, size_t *us
"%zu " /* swap size */
"%zu " /* used */
"%*i\n", /* priority */
- &dev_field, &type_field, &size_field, &used_field);
+ &dev, &type, &size_field, &used_field);
if (k != 4) {
if (k == EOF)
break;
@@ -228,18 +217,13 @@ int find_hibernate_location(char **device, char **type, size_t *size, size_t *us
continue;
}
- if (streq(type_field, "partition") && endswith(dev_field, "\\040(deleted)")) {
- log_warning("Ignoring deleted swapfile '%s'.", dev_field);
+ if (streq(type, "partition") && endswith(dev, "\\040(deleted)")) {
+ log_warning("Ignoring deleted swapfile '%s'.", dev);
continue;
}
- if (device)
- *device = TAKE_PTR(dev_field);
- if (type)
- *type = TAKE_PTR(type_field);
- if (size)
- *size = size_field;
- if (used)
- *used = used_field;
+
+ *size = size_field;
+ *used = used_field;
return 0;
}
@@ -258,7 +242,7 @@ static bool enough_memory_for_hibernation(void) {
return true;
#endif // 0
- r = find_hibernate_location(NULL, NULL, &size, &used);
+ r = hibernation_partition_size(&size, &used);
if (r < 0)
return false;
@@ -282,94 +266,6 @@ static bool enough_memory_for_hibernation(void) {
return r;
}
-int read_fiemap(int fd, struct fiemap **ret) {
- _cleanup_free_ struct fiemap *fiemap = NULL, *result_fiemap = NULL;
- int extents_size;
- struct stat statinfo;
- uint32_t result_extents = 0;
- uint64_t fiemap_start = 0, fiemap_length;
- size_t fiemap_size = 1, result_fiemap_size = 1;
-
- if (fstat(fd, &statinfo) < 0)
- return log_debug_errno(errno, "Cannot determine file size: %m");
- if (!S_ISREG(statinfo.st_mode))
- return -ENOTTY;
- fiemap_length = statinfo.st_size;
-
- /* zero this out in case we run on a file with no extents */
- fiemap = new0(struct fiemap, 1);
- if (!fiemap)
- return -ENOMEM;
-
- result_fiemap = new(struct fiemap, 1);
- if (!result_fiemap)
- return -ENOMEM;
-
- /* XFS filesystem has incorrect implementation of fiemap ioctl and
- * returns extents for only one block-group at a time, so we need
- * to handle it manually, starting the next fiemap call from the end
- * of the last extent
- */
- while (fiemap_start < fiemap_length) {
- *fiemap = (struct fiemap) {
- .fm_start = fiemap_start,
- .fm_length = fiemap_length,
- .fm_flags = FIEMAP_FLAG_SYNC,
- };
-
- /* Find out how many extents there are */
- if (ioctl(fd, FS_IOC_FIEMAP, fiemap) < 0)
- return log_debug_errno(errno, "Failed to read extents: %m");
-
- /* Nothing to process */
- if (fiemap->fm_mapped_extents == 0)
- break;
-
- /* Result fiemap has to hold all the extents for the whole file */
- extents_size = DIV_ROUND_UP(sizeof(struct fiemap_extent) * fiemap->fm_mapped_extents,
- sizeof(struct fiemap));
-
- /* Resize fiemap to allow us to read in the extents */
- if (!GREEDY_REALLOC0(fiemap, fiemap_size, extents_size))
- return -ENOMEM;
-
- fiemap->fm_extent_count = fiemap->fm_mapped_extents;
- fiemap->fm_mapped_extents = 0;
-
- if (ioctl(fd, FS_IOC_FIEMAP, fiemap) < 0)
- return log_debug_errno(errno, "Failed to read extents: %m");
-
- extents_size = DIV_ROUND_UP(sizeof(struct fiemap_extent) * (result_extents + fiemap->fm_mapped_extents),
- sizeof(struct fiemap));
-
- /* Resize result_fiemap to allow us to read in the extents */
- if (!GREEDY_REALLOC(result_fiemap, result_fiemap_size,
- extents_size))
- return -ENOMEM;
-
- memcpy(result_fiemap->fm_extents + result_extents,
- fiemap->fm_extents,
- sizeof(struct fiemap_extent) * fiemap->fm_mapped_extents);
-
- result_extents += fiemap->fm_mapped_extents;
-
- /* Highly unlikely that it is zero */
- if (fiemap->fm_mapped_extents > 0) {
- uint32_t i = fiemap->fm_mapped_extents - 1;
-
- fiemap_start = fiemap->fm_extents[i].fe_logical +
- fiemap->fm_extents[i].fe_length;
-
- if (fiemap->fm_extents[i].fe_flags & FIEMAP_EXTENT_LAST)
- break;
- }
- }
-
- memcpy(result_fiemap, fiemap, sizeof(struct fiemap));
- result_fiemap->fm_mapped_extents = result_extents;
- *ret = TAKE_PTR(result_fiemap);
- return 0;
-}
#if 0 /// elogind has to do, or better, *can* do it differently
static bool can_s2h(void) {
diff --git a/src/shared/sleep-config.h b/src/shared/sleep-config.h
index 767a69927..ecce5f6e4 100644
--- a/src/shared/sleep-config.h
+++ b/src/shared/sleep-config.h
@@ -5,28 +5,12 @@
This file is part of systemd.
Copyright 2013 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#if 0 /// UNNEEDED by elogind
-//#include <linux/fiemap.h>
//#include "time-util.h"
-int read_fiemap(int fd, struct fiemap **ret);
int parse_sleep_config(const char *verb, char ***modes, char ***states, usec_t *delay);
-int find_hibernate_location(char **device, char **type, size_t *size, size_t *used);
int can_sleep(const char *verb);
int can_sleep_disk(char **types);
diff --git a/src/shared/spawn-polkit-agent.c b/src/shared/spawn-polkit-agent.c
index 3c93c79ce..062e0210c 100644
--- a/src/shared/spawn-polkit-agent.c
+++ b/src/shared/spawn-polkit-agent.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <errno.h>
diff --git a/src/shared/spawn-polkit-agent.h b/src/shared/spawn-polkit-agent.h
index 9f26fa10a..ea72c1281 100644
--- a/src/shared/spawn-polkit-agent.h
+++ b/src/shared/spawn-polkit-agent.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
#include "bus-util.h"
diff --git a/src/shared/test-tables.h b/src/shared/test-tables.h
index b1ca4247f..59c2c06ec 100644
--- a/src/shared/test-tables.h
+++ b/src/shared/test-tables.h
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2013 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include <stdio.h>
diff --git a/src/shared/udev-util.c b/src/shared/udev-util.c
index a19d5429d..14f2c1928 100644
--- a/src/shared/udev-util.c
+++ b/src/shared/udev-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2017 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include <string.h>
diff --git a/src/shared/udev-util.h b/src/shared/udev-util.h
index 8fd65f6f4..17b1c3eee 100644
--- a/src/shared/udev-util.h
+++ b/src/shared/udev-util.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2013 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#if 0 /// elogind needs the systems udev header
diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c
index cab1cd6a2..314488ab8 100644
--- a/src/shared/utmp-wtmp.c
+++ b/src/shared/utmp-wtmp.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/shared/utmp-wtmp.h b/src/shared/utmp-wtmp.h
index 2c75d4097..23cb03b31 100644
--- a/src/shared/utmp-wtmp.h
+++ b/src/shared/utmp-wtmp.h
@@ -5,19 +5,6 @@
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 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/>.
***/
#include <stdbool.h>
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index 9b5aa6264..fe193a284 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -4,26 +4,11 @@
Copyright 2012 Lennart Poettering
Copyright 2013 Zbigniew Jędrzejewski-Szmek
- Copyright 2010-2017 Canonical
Copyright 2018 Dell Inc.
-
- 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/>.
***/
//#include <errno.h>
//#include <getopt.h>
-//#include <linux/fiemap.h>
//#include <stdio.h>
#include "sd-messages.h"
@@ -45,67 +30,6 @@
static char* arg_verb = NULL;
-static int write_hibernate_location_info(void) {
- _cleanup_free_ char *device = NULL, *type = NULL;
- _cleanup_free_ struct fiemap *fiemap = NULL;
- char offset_str[DECIMAL_STR_MAX(uint64_t)];
- char device_str[DECIMAL_STR_MAX(uint64_t)];
- _cleanup_close_ int fd = -1;
- struct stat stb;
- uint64_t offset;
- int r;
-
- r = find_hibernate_location(&device, &type, NULL, NULL);
- if (r < 0)
- return log_debug_errno(r, "Unable to find hibernation location: %m");
-
- /* if it's a swap partition, we just write the disk to /sys/power/resume */
- if (streq(type, "partition"))
- return write_string_file("/sys/power/resume", device, 0);
- else if (!streq(type, "file"))
- return log_debug_errno(EINVAL, "Invalid hibernate type %s: %m",
- type);
-
- /* Only available in 4.17+ */
- if (access("/sys/power/resume_offset", F_OK) < 0) {
- if (errno == ENOENT)
- return 0;
- return log_debug_errno(errno, "/sys/power/resume_offset unavailable: %m");
- }
-
- r = access("/sys/power/resume_offset", W_OK);
- if (r < 0)
- return log_debug_errno(errno, "/sys/power/resume_offset not writeable: %m");
-
- fd = open(device, O_RDONLY | O_CLOEXEC | O_NONBLOCK);
- if (fd < 0)
- return log_debug_errno(errno, "Unable to open '%s': %m", device);
- r = fstat(fd, &stb);
- if (r < 0)
- return log_debug_errno(errno, "Unable to stat %s: %m", device);
- r = read_fiemap(fd, &fiemap);
- if (r < 0)
- return log_debug_errno(r, "Unable to read extent map for '%s': %m",
- device);
- if (fiemap->fm_mapped_extents == 0) {
- log_debug("No extents found in '%s'", device);
- return -EINVAL;
- }
- offset = fiemap->fm_extents[0].fe_physical / page_size();
- xsprintf(offset_str, "%" PRIu64, offset);
- r = write_string_file("/sys/power/resume_offset", offset_str, 0);
- if (r < 0)
- return log_debug_errno(r, "Failed to write offset '%s': %m",
- offset_str);
-
- xsprintf(device_str, "%lx", (unsigned long)stb.st_dev);
- r = write_string_file("/sys/power/resume", device_str, 0);
- if (r < 0)
- return log_debug_errno(r, "Failed to write device '%s': %m",
- device_str);
- return 0;
-}
-
static int write_mode(char **modes) {
int r = 0;
char **mode;
@@ -123,6 +47,9 @@ static int write_mode(char **modes) {
r = k;
}
+ if (r < 0)
+ log_error_errno(r, "Failed to write mode to /sys/power/disk: %m");
+
return r;
}
@@ -144,7 +71,7 @@ static int write_state(FILE **f, char **states) {
fclose(*f);
*f = fopen("/sys/power/state", "we");
if (!*f)
- return -errno;
+ return log_error_errno(errno, "Failed to open /sys/power/state: %m");
}
return r;
@@ -173,14 +100,9 @@ static int execute(char **modes, char **states) {
return log_error_errno(errno, "Failed to open /sys/power/state: %m");
/* Configure the hibernation mode */
- if (!strv_isempty(modes)) {
- r = write_hibernate_location_info();
- if (r < 0)
- return log_error_errno(r, "Failed to write hibernation disk offset: %m");
- r = write_mode(modes);
- if (r < 0)
- return log_error_errno(r, "Failed to write mode to /sys/power/disk: %m");;
- }
+ r = write_mode(modes);
+ if (r < 0)
+ return r;
execute_directories(dirs, DEFAULT_TIMEOUT_USEC, NULL, NULL, arguments);
@@ -192,7 +114,7 @@ static int execute(char **modes, char **states) {
r = write_state(&f, states);
if (r < 0)
- return log_error_errno(r, "Failed to write /sys/power/state: %m");
+ return r;
log_struct(LOG_INFO,
"MESSAGE_ID=" SD_MESSAGE_SLEEP_STOP_STR,
diff --git a/src/systemd/meson.build b/src/systemd/meson.build
index 7d6398714..c3f82dc50 100644
--- a/src/systemd/meson.build
+++ b/src/systemd/meson.build
@@ -1,19 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright 2017 Zbigniew Jędrzejewski-Szmek
-#
-# 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
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
#if 0 /// No systemd-journal in elogind ...
# _systemd_headers = '''
diff --git a/src/test/meson.build b/src/test/meson.build
index 823fcb15c..9cede5ad1 100644
--- a/src/test/meson.build
+++ b/src/test/meson.build
@@ -1,19 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright 2017 Zbigniew Jędrzejewski-Szmek
-#
-# 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
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
awkscript = 'test-hashmap-ordered.awk'
test_hashmap_ordered_c = custom_target(
diff --git a/src/test/test-alloc-util.c b/src/test/test-alloc-util.c
index 50ccf4700..fa3bb9f44 100644
--- a/src/test/test-alloc-util.c
+++ b/src/test/test-alloc-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
//#include <stdint.h>
diff --git a/src/test/test-cgroup.c b/src/test/test-cgroup.c
index 232577a70..fbf3beb97 100644
--- a/src/test/test-cgroup.c
+++ b/src/test/test-cgroup.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <string.h>
diff --git a/src/test/test-conf-files.c b/src/test/test-conf-files.c
index de91efac7..4bc92faca 100644
--- a/src/test/test-conf-files.c
+++ b/src/test/test-conf-files.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 Michael Marineau
-
- 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/>.
***/
#include <stdarg.h>
diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c
index c36204197..acd543e51 100644
--- a/src/test/test-conf-parser.c
+++ b/src/test/test-conf-parser.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2015 Ronny Chevalier
-
- 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/>.
***/
#include "conf-parser.h"
@@ -307,11 +294,6 @@ static const char* const config_file[] = {
"3\n",
"[Section]\n"
- "setting1=1\\\n" /* continuation with extra trailing backslash at the end */
- "2\\\n"
- "3\\\n",
-
- "[Section]\n"
"setting1=1\\\\\\\n" /* continuation with trailing escape symbols */
"\\\\2\n", /* note that C requires one level of escaping, so the
* parser gets "…1 BS BS BS NL BS BS 2 NL", which
@@ -328,11 +310,6 @@ static const char* const config_file[] = {
"foobar",
"[Section]\n"
- "setting1=" /* a line above LINE_MAX length, with continuation */
- x1000("ABCD") "\\\n" /* and an extra trailing backslash */
- "foobar\\\n",
-
- "[Section]\n"
"setting1=" /* a line above the allowed limit: 9 + 1050000 + 1 */
x1000(x1000("x") x10("abcde")) "\n",
@@ -385,27 +362,27 @@ static void test_config_parse(unsigned i, const char *s) {
assert_se(streq(setting1, "1"));
break;
- case 4 ... 5:
+ case 4:
assert_se(r == 0);
assert_se(streq(setting1, "1 2 3"));
break;
- case 6:
+ case 5:
assert_se(r == 0);
assert_se(streq(setting1, "1\\\\ \\\\2"));
break;
- case 7:
+ case 6:
assert_se(r == 0);
assert_se(streq(setting1, x1000("ABCD")));
break;
- case 8 ... 9:
+ case 7:
assert_se(r == 0);
assert_se(streq(setting1, x1000("ABCD") " foobar"));
break;
- case 10 ... 11:
+ case 8 ... 9:
assert_se(r == -ENOBUFS);
assert_se(setting1 == NULL);
break;
diff --git a/src/test/test-copy.c b/src/test/test-copy.c
index 574c22611..7337a8ae6 100644
--- a/src/test/test-copy.c
+++ b/src/test/test-copy.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2014 Ronny Chevalier
-
- 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/>.
***/
#include <unistd.h>
diff --git a/src/test/test-dlopen.c b/src/test/test-dlopen.c
index dd43da559..151d2d72b 100644
--- a/src/test/test-dlopen.c
+++ b/src/test/test-dlopen.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2016 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include <dlfcn.h>
diff --git a/src/test/test-ellipsize.c b/src/test/test-ellipsize.c
index 421774c07..ba4b043fc 100644
--- a/src/test/test-ellipsize.c
+++ b/src/test/test-ellipsize.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2013 Shawn Landden
-
- 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/>.
***/
#include <stdio.h>
diff --git a/src/test/test-escape.c b/src/test/test-escape.c
index 811562992..839c33d5d 100644
--- a/src/test/test-escape.c
+++ b/src/test/test-escape.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include "alloc-util.h"
diff --git a/src/test/test-exec-util.c b/src/test/test-exec-util.c
index 02d745439..118720313 100644
--- a/src/test/test-exec-util.c
+++ b/src/test/test-exec-util.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2013 Thomas H.P. Andersen
-
- 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/>.
***/
#include <errno.h>
diff --git a/src/test/test-extract-word.c b/src/test/test-extract-word.c
index 9b00cb596..16c265549 100644
--- a/src/test/test-extract-word.c
+++ b/src/test/test-extract-word.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2013 Thomas H.P. Andersen
-
- 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/>.
***/
#include <errno.h>
diff --git a/src/test/test-fd-util.c b/src/test/test-fd-util.c
index f4b73f695..f266e580b 100644
--- a/src/test/test-fd-util.c
+++ b/src/test/test-fd-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <fcntl.h>
diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c
index 35bb699c3..639342dbb 100644
--- a/src/test/test-fs-util.c
+++ b/src/test/test-fs-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <unistd.h>
diff --git a/src/test/test-hash.c b/src/test/test-hash.c
index d84a6a885..79d9668a1 100644
--- a/src/test/test-hash.c
+++ b/src/test/test-hash.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2016 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/>.
***/
#include <errno.h>
diff --git a/src/test/test-hashmap-plain.c b/src/test/test-hashmap-plain.c
index d130f5832..cbcdf4e84 100644
--- a/src/test/test-hashmap-plain.c
+++ b/src/test/test-hashmap-plain.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2013 Daniel Buch
-
- 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/>.
***/
#include "alloc-util.h"
diff --git a/src/test/test-hashmap.c b/src/test/test-hashmap.c
index ad0b7390e..9a22fc905 100644
--- a/src/test/test-hashmap.c
+++ b/src/test/test-hashmap.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2013 Daniel Buch
-
- 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/>.
***/
#include "hashmap.h"
diff --git a/src/test/test-helper.h b/src/test/test-helper.h
index 1ee93f5c5..01674e6d4 100644
--- a/src/test/test-helper.h
+++ b/src/test/test-helper.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2013 Holger Hans Peter Freyther
-
- 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/>.
***/
#include "sd-daemon.h"
diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
index b7e925fce..74b8e3b68 100644
--- a/src/test/test-hexdecoct.c
+++ b/src/test/test-hexdecoct.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
diff --git a/src/test/test-id128.c b/src/test/test-id128.c
index dba728376..8ea805315 100644
--- a/src/test/test-id128.c
+++ b/src/test/test-id128.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 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/>.
***/
#include <string.h>
diff --git a/src/test/test-io-util.c b/src/test/test-io-util.c
index 9ed9864f2..c553729f4 100644
--- a/src/test/test-io-util.c
+++ b/src/test/test-io-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <fcntl.h>
diff --git a/src/test/test-ipcrm.c b/src/test/test-ipcrm.c
index d4ca6bdce..3a00c9354 100644
--- a/src/test/test-ipcrm.c
+++ b/src/test/test-ipcrm.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 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/>.
***/
#include "clean-ipc.h"
diff --git a/src/test/test-list.c b/src/test/test-list.c
index 25ffd8fb8..c30803b55 100644
--- a/src/test/test-list.c
+++ b/src/test/test-list.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2013 Jan Janssen
-
- 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/>.
***/
#include "list.h"
diff --git a/src/test/test-locale-util.c b/src/test/test-locale-util.c
index 4467bdd48..01497b16f 100644
--- a/src/test/test-locale-util.c
+++ b/src/test/test-locale-util.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2014 Ronny Chevalier
-
- 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/>.
***/
diff --git a/src/test/test-log.c b/src/test/test-log.c
index 7aa80e351..fe2e805b7 100644
--- a/src/test/test-log.c
+++ b/src/test/test-log.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
#include <stddef.h>
diff --git a/src/test/test-parse-util.c b/src/test/test-parse-util.c
index 95d29c378..8209b98c3 100644
--- a/src/test/test-parse-util.c
+++ b/src/test/test-parse-util.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2013 Thomas H.P. Andersen
-
- 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/>.
***/
#include <errno.h>
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index b2b5fd19f..057c06e8c 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2013 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include <stdio.h>
diff --git a/src/test/test-prioq.c b/src/test/test-prioq.c
index f558384a1..e88166ee2 100644
--- a/src/test/test-prioq.c
+++ b/src/test/test-prioq.c
@@ -3,19 +3,6 @@
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/>.
***/
#include <stdlib.h>
diff --git a/src/test/test-proc-cmdline.c b/src/test/test-proc-cmdline.c
index faa1f8920..f3cf12114 100644
--- a/src/test/test-proc-cmdline.c
+++ b/src/test/test-proc-cmdline.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include "alloc-util.h"
diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c
index d6821f83e..c5931c522 100644
--- a/src/test/test-process-util.c
+++ b/src/test/test-process-util.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2013 Thomas H.P. Andersen
-
- 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/>.
***/
#include <sched.h>
@@ -551,8 +538,33 @@ static void test_pid_to_ptr(void) {
#endif
}
-int main(int argc, char *argv[]) {
+static void test_ioprio_class_from_to_string_one(const char *val, int expected) {
+ assert_se(ioprio_class_from_string(val) == expected);
+ if (expected >= 0) {
+ _cleanup_free_ char *s = NULL;
+ unsigned ret;
+
+ assert_se(ioprio_class_to_string_alloc(expected, &s) == 0);
+ /* We sometimes get a class number and sometimes a number back */
+ assert_se(streq(s, val) ||
+ safe_atou(val, &ret) == 0);
+ }
+}
+static void test_ioprio_class_from_to_string(void) {
+ test_ioprio_class_from_to_string_one("none", IOPRIO_CLASS_NONE);
+ test_ioprio_class_from_to_string_one("realtime", IOPRIO_CLASS_RT);
+ test_ioprio_class_from_to_string_one("best-effort", IOPRIO_CLASS_BE);
+ test_ioprio_class_from_to_string_one("idle", IOPRIO_CLASS_IDLE);
+ test_ioprio_class_from_to_string_one("0", 0);
+ test_ioprio_class_from_to_string_one("1", 1);
+ test_ioprio_class_from_to_string_one("7", 7);
+ test_ioprio_class_from_to_string_one("8", 8);
+ test_ioprio_class_from_to_string_one("9", -1);
+ test_ioprio_class_from_to_string_one("-1", -1);
+}
+
+int main(int argc, char *argv[]) {
log_set_max_level(LOG_DEBUG);
log_parse_environment();
log_open();
@@ -583,6 +595,7 @@ int main(int argc, char *argv[]) {
test_getpid_measure();
test_safe_fork();
test_pid_to_ptr();
+ test_ioprio_class_from_to_string();
return 0;
}
diff --git a/src/test/test-random-util.c b/src/test/test-random-util.c
index d7ccc91f9..386249883 100644
--- a/src/test/test-random-util.c
+++ b/src/test/test-random-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2017 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include "hexdecoct.h"
diff --git a/src/test/test-selinux.c b/src/test/test-selinux.c
index c888c09b2..d760e9687 100644
--- a/src/test/test-selinux.c
+++ b/src/test/test-selinux.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2016 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include <sys/stat.h>
diff --git a/src/test/test-set.c b/src/test/test-set.c
index 0a29a6262..11884de1f 100644
--- a/src/test/test-set.c
+++ b/src/test/test-set.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2014 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include "set.h"
diff --git a/src/test/test-signal-util.c b/src/test/test-signal-util.c
index 3f8eb325c..562f286cc 100644
--- a/src/test/test-signal-util.c
+++ b/src/test/test-signal-util.c
@@ -3,29 +3,27 @@
This file is part of systemd.
Copyright 2016 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/>.
***/
#include <signal.h>
#include <unistd.h>
+//#include "log.h"
#include "macro.h"
#include "signal-util.h"
/// Additional includes needed by elogind
#include "process-util.h"
+#define info(sig) log_info(#sig " = " STRINGIFY(sig) " = %d", sig)
+
+static void test_rt_signals(void) {
+ info(SIGRTMIN);
+ info(SIGRTMAX);
+
+ /* We use signals SIGRTMIN+0 to SIGRTMIN+24 unconditionally */
+ assert(SIGRTMAX - SIGRTMIN >= 24);
+}
+
static void test_block_signals(void) {
sigset_t ss;
@@ -63,6 +61,7 @@ static void test_ignore_signals(void) {
}
int main(int argc, char *argv[]) {
+ test_rt_signals();
test_block_signals();
test_ignore_signals();
diff --git a/src/test/test-siphash24.c b/src/test/test-siphash24.c
index 7469457be..47bf28ff0 100644
--- a/src/test/test-siphash24.c
+++ b/src/test/test-siphash24.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2015 Tom Gundersen
-
- 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/>.
***/
#include "siphash24.h"
diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
index ad0c2ceff..103c96955 100644
--- a/src/test/test-sizeof.c
+++ b/src/test/test-sizeof.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2016 Zbigniew Jędrzejewski-Szmek
-
- 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/>.
***/
#include <stdio.h>
diff --git a/src/test/test-stat-util.c b/src/test/test-stat-util.c
index bcb9a658f..d3a98ec66 100644
--- a/src/test/test-stat-util.c
+++ b/src/test/test-stat-util.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <fcntl.h>
diff --git a/src/test/test-string-util.c b/src/test/test-string-util.c
index 0f841e5d7..48e418f48 100644
--- a/src/test/test-string-util.c
+++ b/src/test/test-string-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2015 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/>.
***/
#include "alloc-util.h"
diff --git a/src/test/test-strip-tab-ansi.c b/src/test/test-strip-tab-ansi.c
index 838a6e4db..fff3fcd0d 100644
--- a/src/test/test-strip-tab-ansi.c
+++ b/src/test/test-strip-tab-ansi.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2012 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/>.
***/
#include <stdio.h>
diff --git a/src/test/test-unaligned.c b/src/test/test-unaligned.c
index 00445fa30..a39480341 100644
--- a/src/test/test-unaligned.c
+++ b/src/test/test-unaligned.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2014 Tom Gundersen
-
- 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/>.
***/
#include "sparse-endian.h"
diff --git a/src/test/test-user-util.c b/src/test/test-user-util.c
index 2b4daf172..0b5dc945a 100644
--- a/src/test/test-user-util.c
+++ b/src/test/test-user-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2015 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/>.
***/
#include "alloc-util.h"
diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c
index c04c99dca..a7bbc9b42 100644
--- a/src/test/test-utf8.c
+++ b/src/test/test-utf8.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2013 Dave Reisner
-
- 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/>.
***/
#include "alloc-util.h"
diff --git a/src/test/test-util.c b/src/test/test-util.c
index 81dba9af4..9d31d5a86 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2013 Thomas H.P. Andersen
-
- 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/>.
***/
#include <errno.h>
diff --git a/src/test/test-verbs.c b/src/test/test-verbs.c
index 88276a21e..fb1bbf341 100644
--- a/src/test/test-verbs.c
+++ b/src/test/test-verbs.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 systemd developers
-
- 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/>.
***/
#include "macro.h"
diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c
index 2bd55a33c..175cc5d7c 100644
--- a/src/update-utmp/update-utmp.c
+++ b/src/update-utmp/update-utmp.c
@@ -3,19 +3,6 @@
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 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/>.
***/
#include <errno.h>
@@ -311,7 +298,6 @@ finish:
#if 0 /// UNNEEDED by elogind
sd_bus_flush_close_unref(c.bus);
-
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
#endif // 0
}