1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
Commit Graph

22634 Commits

Author SHA1 Message Date
Lennart Poettering
48b9085914 core: modernize prepare_reexecute() 2015-09-29 21:08:37 +02:00
Lennart Poettering
aa8aeac050 core: exit early if we hit OOM 2015-09-29 21:08:37 +02:00
Lennart Poettering
d1cefe0ae2 core: use %m rather than strerror() where we can 2015-09-29 21:08:37 +02:00
Lennart Poettering
92ca4cac43 main: minor clean-ups
Add (void) casting for a couple of functions where we knowingly ignore
the returning error code.

Use EXIT_FAILURE where appropriate.

Try to initialize structures at declaration time, or at once.
2015-09-29 21:08:37 +02:00
Lennart Poettering
2feceb5eb9 tree-wide: take benefit of the fact that fdset_free() returns NULL 2015-09-29 21:08:37 +02:00
Lennart Poettering
3dfc97634e core: order #includes in main.c 2015-09-29 21:08:37 +02:00
Lennart Poettering
fe382237ca strv: add strv_free_free() to strv.c and make use of it
Let's teach it a new trick, and make it return NULL.
2015-09-29 21:08:37 +02:00
Lennart Poettering
3ee897d6c2 tree-wide: port more code to use send_one_fd() and receive_one_fd()
Also, make it slightly more powerful, by accepting a flags argument, and
make it safe for handling if more than one cmsg attribute happens to be
attached.
2015-09-29 21:08:37 +02:00
Lennart Poettering
400f1a33cf core: sort includes of manager.[ch] according to CODING_STYLE 2015-09-29 21:08:36 +02:00
David Herrmann
6fe869c251 sd-event: don't provide priority stability
Currently, we guarantee that if two event-sources with the same priority
fire at the same time, they're always dispatched in the same order. While
this might sound nice in theory, there's is little benefit in providing
stability on that level. We have no control over the order the events are
reported, hence, we cannot guarantee that we get notified about both at
the same time.

By dropping the stability guarantee, we loose roughly 10% Heap swaps in
the prioq on a desktop cold-boot. Krzysztof Kotlenga even reported up to
20% on his tests. This sounds worth optimizing, so drop the stability
guarantee.
2015-09-29 20:56:17 +02:00
David Herrmann
8a9d23e446 prioq: never shuffle identical entries
Skip shuffling identical entries in shuffle_up(), just like we already do
in shuffle_down().
2015-09-29 20:55:24 +02:00
Branislav Blaskovic
f823da67a6 journal-remote: typo in log_error when no sources are specified 2015-09-29 14:43:40 +02:00
Michal Schmidt
9d66db1d03 Merge pull request #1403 from dvdhrm/prioq-comment
prioq: add introduction comment
2015-09-29 14:33:47 +02:00
David Herrmann
f36f8f7891 prioq: add introduction comment
Add comment to prioq.c explaining what it does. And more importantly,
mention that we implement a Heap. It's more than annoying having to
figure out what the code actually does, without ever mentioning the word
'heap'.
2015-09-29 12:49:25 +02:00
Zbigniew Jędrzejewski-Szmek
4ed2f1b1f1 bash-completion: remove one more sort and sub-shell
{} is preferred to (), because the first is just grouping, while the
second invokes a separate shell.
2015-09-28 17:23:53 -04:00
Zbigniew Jędrzejewski-Szmek
db79008804 bash-completion: use builtins when generating list 2015-09-28 15:42:27 -04:00
Zbigniew Jędrzejewski-Szmek
b00c1cf9d6 bash-completion: use builtins when generating list
awk is an external program, and it is better to stick to shell built-ins.

Also, even with external awk, sort -u is redundant, because the shell does
this on its own.
2015-09-28 15:23:04 -04:00
Zbigniew Jędrzejewski-Szmek
840b2c0e77 shell-completion: use systemctl --state=help
This way completion lists should stay up to date.

Also use systemctl -t help to list types in zsh, as was already
done in bash.
2015-09-28 15:10:03 -04:00
Zbigniew Jędrzejewski-Szmek
7e55de3b96 Move all unit states to basic/ and extend systemctl --state=help 2015-09-28 15:09:34 -04:00
Zbigniew Jędrzejewski-Szmek
e16972e626 systemctl: add --state=help
This mirrors --type=help and simplifies completion scripts.

The array of states is dense, so the is no need to check if the string is null.
2015-09-28 15:09:34 -04:00
Zbigniew Jędrzejewski-Szmek
978c8b6347 Move UnitActiveState to basic/
Preparation to allow systemctl to query the list of unit states.
2015-09-28 15:09:34 -04:00
David Herrmann
9dc5db34ad Merge pull request #1396 from phomes/va-start
sd-bus: va_start should use the last named parameter
2015-09-28 10:57:07 +02:00
Evgeny Vereshchagin
c214ee6f15 man: journald: add commands for /var/log/journal creating
See https://github.com/systemd/systemd/issues/1397
2015-09-28 01:12:13 +00:00
Thomas Hindoe Paaboel Andersen
19932084d0 sd-bus: va_start should use the last named parameter 2015-09-27 23:11:31 +02:00
Łukasz Stelmach
48db40b323 fsck: start reboot.target irreversibly
In some situations rebooting after fixing rootfs fails because
the job for reboot.target gets canceled. To avoid this
the "mode" parameter of the StartUnitReplace() call needs to be
set to "replace-irreversibly".
2015-09-27 22:17:27 +02:00
Lennart Poettering
8e82b3a271 Merge pull request #1392 from dvdhrm/bus-format2
sd-bus: add sd_bus_path_{encode,decode}_many() (v2)
2015-09-27 15:04:12 +02:00
Martin Pitt
ad1dc5ca46 Merge pull request #1373 from pfl/dhcp6_opportunistic_configuration
networkd: Be opportunistic when declaring link configured
2015-09-27 09:42:06 +02:00
David Herrmann
dfb815c36d sd-bus: add sd_bus_path_{encode,decode}_many()
This introduces two new helpers alongside sd_bus_path_{encode,decode}(),
which work similarly to their counterparts, but accept a format-string as
input. This allows encoding and decoding multiple labels of a format
string at the same time.
2015-09-26 16:57:23 +02:00
Daniel Mack
049077a789 Merge pull request #1391 from evverx/nspawn-completion
shell-completion: nspawn: add missing values for --link-journal
2015-09-26 09:50:00 +02:00
Marcel Holtmann
60f6f2f92f hwdb: Update database of Bluetooth company identifiers 2015-09-26 03:30:35 +02:00
Evgeny Vereshchagin
043a090d7d shell-completion: nspawn: add missing values for --link-journal 2015-09-26 04:10:08 +03:00
Daniel Mack
0879a8d316 update NEWS 2015-09-25 17:37:27 +02:00
Daniel Mack
374e55b727 Merge pull request #1388 from darkcircle/ko-translation
add a new Korean translation
2015-09-25 17:36:48 +02:00
Seong-ho Cho
789cbe8fb8 add a new Korean translation 2015-09-25 23:56:14 +09:00
Daniel Mack
2c995032e8 Merge pull request #1382 from filbranden/cpuaffinity2
Use parse_cpu_set in CPUAffinity support (for units)
2015-09-25 13:27:11 +02:00
Daniel Mack
54e56acafe Merge pull request #1380 from evverx/journalctl-bash-completion
Update journalctl bash completion
2015-09-25 12:39:40 +02:00
Filipe Brandenburger
9d5ca7f882 load-fragment: Use parse_cpu_set in CPUAffinity support
Tested with a dummy service running 'sleep', modifying its CPUAffinity,
restarting the service and checking the ^Cpus_allowed entries in the
/proc/PID/status file.
2015-09-24 19:31:28 -07:00
Filipe Brandenburger
5f05235f13 util: Add test for parse_cpu_set 2015-09-24 18:48:21 -07:00
Evgeny Vereshchagin
6409d3af08 shell-completion: journalctl: add missing options 2015-09-25 04:24:29 +03:00
Filipe Brandenburger
f5c72b739e util: refactor cpu_set parsing into its own function
Use the new code in config_parse_cpu_affinity2.

Tested by modifying CPUAffinity=... setting in /etc/systemd/system.conf
and reloading the daemon, then checking ^Cpus_allowed in /proc/1/status
to confirm the correct CPU mask is in place.
2015-09-24 18:01:36 -07:00
Evgeny Vereshchagin
023dd03a42 shell-completion: journalctl: add missing fields 2015-09-25 03:52:07 +03:00
Lennart Poettering
eb1d47c06d Merge pull request #1377 from evverx/man-systemd-slice
man: systemd.slice: add link to cgroups api docs
2015-09-24 17:17:39 +02:00
Lennart Poettering
681de8128d Merge pull request #1376 from dvdhrm/hostnamed-argc
hostnamed: drop redundant code
2015-09-24 17:14:57 +02:00
David Herrmann
76c73487d0 hostnamed: drop redundant code
Doing argc checks once is enough enough enough enough.
2015-09-24 16:50:28 +02:00
Evgeny Vereshchagin
b6f011c10d man: systemd.slice: add link to cgroups api docs
systemd.scope and systemd.resource-control contain that link.
systemd.slice should contain it too.
2015-09-24 14:37:17 +00:00
Lennart Poettering
ae4566a67f Merge pull request #1374 from olof/autoconf_gcrypt_dep
build-sys: only use AM_PATH_LIBGCRYPT macro if it exists
2015-09-24 16:31:49 +02:00
Daniel Mack
f0c576748e Merge pull request #1370 from systemd-mailing-devs/1443091642-5853-1-git-send-email-brueckner@linux.vnet.ibm.com
s390: add personality support
2015-09-24 15:04:13 +02:00
Olof Johansson
79e8bde40d build-sys: only use AM_PATH_LIBGCRYPT macro if it exists
If gcrypt's m4 macro files aren't installed, with this change, gcrypt
will be disabled --- unless gcrypt support was explicitly requested by
passing --enable-gcrypt to configure, in which case it will fail.
Without this change, autoconf would fail either way with not being able
to resolve AM_PATH_LIBGCRYPT.
2015-09-24 14:30:30 +02:00
Patrik Flykt
3ada37a21e networkd: Be opportunistic when declaring link configured
The DHCP variable in the [Network] section of the network configuration
file moves the link to the configured state according to the following:

DHCP=yes   Link is configured when either DHCPv4 or DHCPv6 succeed
DHCP=ipv4  Link is configured only when DHCPv4 succeeds
DHCP=ipv6  Link is configured only when DHCPv6 succeeds
DHCP=no    Neither DHCPv4 or DHCPv6 is attempted

Reported by Martin Pitt.

Fixes https://github.com/systemd/systemd/issues/1368
2015-09-24 15:20:41 +03:00
Jens Kuske
0d07e595cc networkd: add support to configure preferred source of static routes 2015-09-24 14:04:51 +02:00