Lennart Poettering
f5b7d681c7
homectl: show disk free in percent in 'inspect'
2020-05-07 09:52:56 +02:00
Zbigniew Jędrzejewski-Szmek
354722dde4
Merge pull request #15733 from benjarobin/fix_warn_ndebug
...
Allow to build without any warning with NDEBUG defined + Bugfix
2020-05-07 09:47:19 +02:00
Benjamin Robin
08f468567d
tree-wide: Workaround -Wnonnull GCC bug
...
See issue #6119
2020-05-07 09:43:28 +02:00
Benjamin Robin
683d0bc041
resize-fs: Use xsprintf instead of snprintf
2020-05-06 23:03:25 +02:00
Benjamin Robin
0a0e594a26
tree-wide: Mark as _unused_ variables that are only used in assert()
...
Allow to build without any warning with NDEBUG defined
2020-05-06 23:03:25 +02:00
Lennart Poettering
b0395c1176
format-table: support coloring the gap right of each cell individually
...
This is useful for underlining a whole row of cells: previously we
couldn't underline the gap. Now we can.
2020-05-06 15:40:15 +02:00
Lennart Poettering
557b0841b7
format-table: display an empty strv cell the same way as an empty cell
...
An empty list conceptually is very close to null, hence let's show it
the same way, i.e. using the defined "empty" string, and greyed out.
2020-05-06 15:40:15 +02:00
Zbigniew Jędrzejewski-Szmek
ba5a389d24
Merge pull request #15473 from keszybz/bus-introspection
2020-05-06 15:00:07 +02:00
Lennart Poettering
c92391f52f
Merge pull request #15692 from keszybz/preset-cleanup
...
Make systemctl list-unit-files output more useful
2020-05-06 08:19:37 +02:00
Zbigniew Jędrzejewski-Szmek
8b4933973e
bus-introspect: list the interfaces with "list"
...
The output is not very well formatted, but it is still useful when
testing this.
2020-05-05 22:36:38 +02:00
Zbigniew Jędrzejewski-Szmek
d4cc0edfce
importd,logind: add --bus-introspect= option
2020-05-05 22:34:17 +02:00
Zbigniew Jędrzejewski-Szmek
1e9bc92dba
bus-util: add wrapper for interface introspection
2020-05-05 22:33:53 +02:00
Zbigniew Jędrzejewski-Szmek
6a7e98aaca
sd-bus: add helper struct for interface definitions
...
The idea is to have a static table that defines the dbus API. The vtable is
defined right next to the interface name and path because they are logically
connected.
2020-05-05 22:27:03 +02:00
Zbigniew Jędrzejewski-Szmek
15d7ab87c4
systemctl: add new enablement state "alias"
...
For units which are aliases of other units, reporting preset status as
"enabled" is rather misleading. For example, dbus.service is an alias of
dbus-broker.service. In list-unit-files we'd show both as "enabled". In
particular, systemctl preset ignores aliases, so showing any preset status at
all is always going to be misleading. Let's introduce a new state "alias" and
use that for all aliases.
I was trying to avoid adding a new state, to keep compatibility with previous
behaviour, but for alias unit files it simply doesn't seem very useful to show
any of the existing states. It seems that the clearly showing that those are
aliases for other units will be easiest to understand for users.
2020-05-05 21:50:38 +02:00
Zbigniew Jędrzejewski-Szmek
9c894b8579
shared/install: rename variable for clarity
2020-05-05 21:50:38 +02:00
Zbigniew Jędrzejewski-Szmek
bce84e10f8
shared/install: print name of offending file in error
...
"Unit type slice cannot be templated."
↓
"/etc/systemd/system.control/user@.slice: unit type slice cannot be templated."
2020-05-05 21:50:38 +02:00
Zbigniew Jędrzejewski-Szmek
babccf14ce
shared/install: indent tables
2020-05-05 21:50:38 +02:00
Zbigniew Jędrzejewski-Szmek
8f7b256665
shared/install: optionally cache the preset list
...
When doing list-unit-files with --root, we would re-read the preset
list for every unit. This uses a cache to only do it once. The time
for list-unit-files goes down by about ~30%.
unit_file_query_preset() is also called from src/core/. This patch does not
touch that path, since the saving there are smaller, since preset status is
only read on demand over dbus, and caching would be more complicated.
2020-05-05 21:50:31 +02:00
Zbigniew Jędrzejewski-Szmek
9321e23c40
shared/verbs: split out helper to find verbs
...
It will be used later, but I think it makes the code clearer anyway.
Also change the message about ignoring to include the name for default
verbs.
2020-05-05 18:04:55 +02:00
Zbigniew Jędrzejewski-Szmek
d8b065e056
shared/verbs: add a modicum of documentation
2020-05-05 18:04:44 +02:00
Zbigniew Jędrzejewski-Szmek
77102db288
systemctl: fix hint when 'systemctl help' is given
...
Not all verbs require unit names, but that is beside the point. We need a verb
here, and help is not a valid verb.
2020-05-05 18:04:28 +02:00
Zbigniew Jędrzejewski-Szmek
eaf7ac4929
Merge pull request #15645 from poettering/calender-expression-doc-fix
...
some calendar expression fixes and documentation updates
2020-05-05 16:07:11 +02:00
Frantisek Sumsal
05c7d9bf5b
Revert "logs-show: declare [static 2] on all highlight parameters"
...
This reverts commit 5444520628 .
See: https://github.com/systemd/systemd/pull/15706
2020-05-05 16:37:45 +03:00
Zbigniew Jędrzejewski-Szmek
640ebaa952
Merge pull request #15648 from poettering/journalctl-cat-beefup
...
journalctl: honour --output-fields= in -o cat mode
2020-05-05 14:00:26 +02:00
Lennart Poettering
5444520628
logs-show: declare [static 2] on all highlight parameters
2020-05-05 09:22:27 +02:00
Lennart Poettering
4d5d1bba73
journalctl: optionally, show a different field than MESSAGE in -o cat mode
...
Fixes : #15621
2020-05-05 09:22:26 +02:00
Lennart Poettering
54ff74d273
journal: use set_contains() where appropriate
2020-05-05 09:04:30 +02:00
Lennart Poettering
c9c9f6f450
calendarspec: be more graceful with two kinds of calendar expressions
...
This changes the calendarspec parser to allow expressions such as
"00:05..05", i.e. a range where start and end is the same. It also
allows expressions such as "00:1-2/3", i.e. where the repetition value
does not fit even once in the specified range. With this patch both
cases will now be optimized away, i.e. the range is removed and a fixed
value is used, which is functionally equivalent.
See #15030 for an issue where the inability to parse such expressions
caused confusion.
I think it's probably better to accept these gracefully and optimizing
them away instead of refusing them with a plain EINVAL. With a tool such
as "systemd-analyze" calendar it should be easy to figure out the
normalized form with the redundant bits optimized away.
2020-05-05 08:57:14 +02:00
Lennart Poettering
05851cb9df
calendarspec: minor simplification
2020-05-05 08:57:14 +02:00
Lennart Poettering
3c6f0300ae
calendarspec: drop _pure_ from static function
...
For static functions the compiler should be able to determine this on
its own, let's not add needless decorators.
2020-05-05 08:57:14 +02:00
Lennart Poettering
80b19994a4
calendarspec: pack our flags a bit
2020-05-05 08:57:14 +02:00
Lennart Poettering
a4d6d711cf
calendarspec: encode that it's OK to store µs in 'int's
2020-05-05 08:57:14 +02:00
Lennart Poettering
e21b76cd68
format-table: generate better JSON field names
...
Let's try to mangle table contents a bit to make them more suitable as
JSON field names. Specifically when we see "foo bar" convert this to
"foo_bar" as field name, as variable/field names are generally assumed
to be without spaces.
2020-05-05 08:13:58 +02:00
Anita Zhang
848cfa74d2
Merge pull request #15636 from poettering/sensitivity-training
...
be more careful when setting json variant + dbus message sensitive flag
2020-05-04 17:48:13 -07:00
Evgeny Vereshchagin
80cf50120c
Merge pull request #15422 from nolange/add_zstd_coredump
...
coredump: add zstandard support for coredumps
2020-05-04 14:57:39 +03:00
Norbert Lange
ef5924aa31
coredump: add zstandard support for coredumps
...
this will hook libzstd into coredump,
using this format as default.
2020-05-04 10:59:43 +02:00
Lennart Poettering
ddd6a22a0f
basic: add STRCASE_IN_SET() which is to STR_IN_SET() what strcaseeq() is to streq()
2020-05-04 10:11:19 +02:00
Zbigniew Jędrzejewski-Szmek
53f7f7fcf2
util-lib: add stub parser for --help, --version
2020-05-03 10:55:51 +02:00
Zbigniew Jędrzejewski-Szmek
b8239b9c50
shared/unit-file: fix resolution of absoulute symlinks with --root
...
$ systemctl --no-pager --root /tmp/root2/ cat ctrl-alt-del.target
Failed to resolve symlink /tmp/root2/etc/systemd/system/ctrl-alt-del.target pointing to /usr/lib/systemd/system/reboot.target, ignoring: Channel number out of range
...
2020-04-30 12:02:44 +02:00
nabijaczleweli
e81f5fc4e8
link: Allow configuring RX mini and jumbo ring sizes, too
...
This now covers all ethtool_ringparam configurables (as of v5.6;
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/ethtool.h?h=v5.6#n488 )
2020-04-29 18:57:13 +02:00
nabijaczleweli
80af9bdabe
link: Add units and fix typo in (Rx|Tx)BufferSize= manpage. Clean up the implementation slightly
2020-04-29 18:55:42 +02:00
Lennart Poettering
94600eeb29
json: when making a copy of a json variant, propagate the sensitive bit
...
Let's make sure we never lose the bit when copying a variant, after all
the data contained is still going to be sensitive after the copy.
2020-04-29 16:32:46 +02:00
Lennart Poettering
268f5a5463
tree-wide: support a bunch of additional specifiers
2020-04-28 22:47:21 +02:00
Zbigniew Jędrzejewski-Szmek
11f9379866
Merge pull request #15570 from poettering/cmsg-find
...
CMSG_FIND_DATA() and cmsg_find() work
2020-04-24 07:45:07 +02:00
Lennart Poettering
41ab8c67eb
tree-wide: use structured initialization at various places
2020-04-24 07:44:42 +02:00
Lennart Poettering
bf39cb7b92
Merge pull request #15566 from poettering/destroy-binfmt
...
unregister binary formats during shutdown
2020-04-23 21:15:22 +02:00
Lennart Poettering
035e3cb9f9
Merge pull request #15563 from keszybz/wait-callback-tweak
...
Add NULL callback check in one more place
2020-04-23 19:50:36 +02:00
Lennart Poettering
371d72e05b
socket-util: introduce type-safe, dereferencing wrapper CMSG_FIND_DATA around cmsg_find()
...
let's take this once step further, and add type-safety to cmsg_find(),
and imply the CMSG_DATA() macro for finding the cmsg payload.
2020-04-23 19:41:15 +02:00
Lennart Poettering
0f4a141744
Merge pull request #15504 from poettering/cmsg-find-pure
...
just the recvmsg_safe() stuff from #15457
2020-04-23 17:28:19 +02:00
Lennart Poettering
965cc99416
shared: add common helper for unregistering all binfmt entries
2020-04-23 17:13:50 +02:00