1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
Commit Graph

62096 Commits

Author SHA1 Message Date
DaPigGuy
60eac27a0d hwdb: Prevent activation of airplane mode on HP ENVY x360 2023-01-22 18:46:27 +01:00
David Tardon
7100653885 sd-path: export env. generators paths 2023-01-21 11:27:40 +00:00
Lennart Poettering
2155bd9441
Merge pull request #26139 from yuwata/test-load-fragment-fix-memleak
test-load-fragment: fix memleak
2023-01-21 10:50:07 +01:00
Yu Watanabe
1dcfbc514c systemctl,test: -EBADF instead of -EBADFD
Follow-up for da20baaecc.
2023-01-21 10:47:54 +01:00
Lennart Poettering
23fcf34a51
Merge pull request #26137 from poettering/timesyncd-touch-file-tweaks
timesync: some tweaks to saved timestamp file handling
2023-01-21 10:46:54 +01:00
Lennart Poettering
8b70155815 logs-show: add a splash of colour to verbose output 2023-01-21 10:46:35 +01:00
Lennart Poettering
b1cc0822c3 logs-show: minor modernizations 2023-01-21 10:46:20 +01:00
Lennart Poettering
404803e6ca sd-journal: validate monotonic timestamp before returning it 2023-01-21 10:46:02 +01:00
Lennart Poettering
7153213e40 string-util: add common implementation of function that converts sized character buffers to NUL terminated C strings 2023-01-21 10:45:25 +01:00
Yu Watanabe
93d0cf7a37 test-load-fragment: shorten code a bit 2023-01-21 15:11:43 +09:00
Yu Watanabe
c9b733265f test-load-fragment: fix memleak
Fixes a leak reported at https://github.com/systemd/systemd/pull/26115#issuecomment-1398026085.
2023-01-21 15:11:29 +09:00
13r0ck
9e2e3342ca hwdb: Add touchpad toggle mapping for System76 Pangolin 12 2023-01-21 00:40:09 +00:00
Lennart Poettering
8cc3cdac23 logs-show: move strlen() handling into update_json_data() so that we can use SD_ID128_TO_STRING() 2023-01-21 00:39:09 +00:00
Lennart Poettering
1acb4f6157 timesyncd: make sure to update mtime of clock file on each boot
Let's make sure the timestamp file's mtime is guaranteed to change for
each boot, so that it is a useful indicator of time. Or in other words
this gurantees that systemd-timesyncd.service acts as a new kind of
milestone: that time definitely progressed on this boot even the machine
died abnormally imediately after.
2023-01-20 22:33:05 +01:00
Lennart Poettering
84447fe79d timesyncd: modernize load_clock_timestamp() a bit
Let's log more.
2023-01-20 22:33:05 +01:00
Lennart Poettering
29920c5b1f timesyncd: write structured log messages whenever we bump the clock based on disk timestamp
It's useful being able to easily detect if a disk-based clock bump was
done, let's make it a structure message, the same way as acquiring an
NTP fix already is.

Also, set the clock to 1 µs further than the timestamp from the disk,
after all we know that that timestamp was current when it was written,
hence it can't be the right one right now anymore.
2023-01-20 22:33:04 +01:00
Lennart Poettering
902ee764a4
Merge pull request #26131 from poettering/bootctl-help-text-fix
bootctl --help fixes
2023-01-20 22:21:17 +01:00
Lennart Poettering
6f30a67a7a journal: use compound initializors at one more place 2023-01-20 21:46:50 +01:00
Lennart Poettering
6320409c56 journal: modernize match_make_string() 2023-01-20 21:46:32 +01:00
Lennart Poettering
c5da14cd59 journalctl: don't convert between strv/Set for each log line
If output fields are specified, let's store this in a Set right-away,
instead of converting between strv and Set again and again for each
line.

This is not only faster, but also simpler and shorter.
2023-01-20 21:46:01 +01:00
Lennart Poettering
8ba814df25 logs-show: use json_variant_unref_many() where appropriate 2023-01-20 21:45:45 +01:00
Lennart Poettering
fcd172b123
Merge pull request #26126 from poettering/format-table-date
hostnamectl: show firmware date as date only, with now time
2023-01-20 21:45:28 +01:00
Lennart Poettering
e684d2d5f8 bootctl: remove space that should not be there 2023-01-20 18:42:25 +01:00
Lennart Poettering
eab7061898 bootctl: split out boot loader spec + boot loader interface commands in --help text
grub (at least on fedora) nowadays implements the boot loader spec, but
not the boot loader interface. Hence let's split out the commands
specific to each in two groups in the --help text. This way the first
group just covers boot lodaer spec stuff (i.e. stuff on disk in the
ESP/XBOOTLDR partition). And the other covers talking to the boot loader
via EFI var.
2023-01-20 18:42:25 +01:00
Lennart Poettering
5bbf72bb9e bootctl: realign column in --help text
for some reason the descriptions of the switches and the commands
weren't aligned, one space off. Fix that.
2023-01-20 18:30:47 +01:00
Lennart Poettering
1e7d6cc072 bootctl: change section title for kernel image commands
Let's call them kernel *images*, not just *kernels*.
2023-01-20 18:30:06 +01:00
Lennart Poettering
2b197967bf bootctl: drop full stop at end of --help texts
We never do that, don't do so here either.
2023-01-20 18:29:15 +01:00
Lennart Poettering
3bac48edfb hostnamectl: show firmware date with date only, without time
The source (usually DMI/SMBIOS) only has 24h granularity, hence don't
show time as well, it's useless.
2023-01-20 17:48:28 +01:00
Lennart Poettering
d9b40cc02c format-table: add cell type for showing date only timestamps 2023-01-20 17:47:40 +01:00
Lennart Poettering
64f3419ec1 time-util: add timestamp output style that shows dates only, no times 2023-01-20 17:45:40 +01:00
Lennart Poettering
9b9ea806ad time-util: condition size check based on utc mode 2023-01-20 17:44:59 +01:00
Lennart Poettering
61d03c5416 time-util: simplify formatting of UNIX timestamps 2023-01-20 17:44:17 +01:00
Lennart Poettering
3703e5d019 time-util: move buffer size check after handling of UNIX timestamp style 2023-01-20 17:43:35 +01:00
Lennart Poettering
4361678c4b time-util: if a date is unrepresentable, honour style to generate XXX string 2023-01-20 17:42:55 +01:00
Lennart Poettering
060c9c02d8 time-util: use IN_SET() more 2023-01-20 17:40:45 +01:00
Jan Janssen
4c0a83a434 boot: Properly strip EFI binaries
Removing debugging related sections is apparently not enough to truely
strip a (PE) binary.
Better late than never. It gets rid of this pesky warning from sbsign:
    warning: data remaining[174080 vs 193173]: gaps between PE/COFF sections?
2023-01-20 17:28:35 +01:00
Lennart Poettering
fba1033151
Merge pull request #26114 from bluca/sd_login_pidfd
sd-login: add sd_pidfd_* APIs
2023-01-20 17:28:13 +01:00
Lennart Poettering
e8bec6242b string-util: add new strdupcspn()/strdupspn()
These combine strndup() + strspn()/strcspn() into one.

There are a bunch of strndupa() calls that could use similar treatment
(or should be converted to strdup[c]spn(), but this commit doesn't
bother with that.
2023-01-20 17:27:51 +01:00
Luca Boccassi
71c6f0ac52
Merge pull request #23309 from DaanDeMeyer/log-context
basic: Add log context
2023-01-20 15:01:03 +00:00
Gerd Hoffmann
24a3b37f12 bootctl: add kernel-inspect to --help text 2023-01-20 14:17:51 +00:00
Waltibaba
5d288d228d hwdb: Add Chuwi Hi10X (N4120 version) iio matrix
There is a later model version of the Chuwi Hi10X that has significantly changed components compared to the existing hwdb one. Differentiator (on Chuwi forums, in thesofproject, etc.) is the N4120 rather than the N4100 processor.
The svn and pn seem to be identical, my Chuwi Hi10X matches with the old model except for the changed KIOX000A* iio sensor.
With the added ACCEL_MOUNT_MATRIX, my device works on gnome and has the correct (right-up) output in monitor-sensors.
2023-01-20 14:16:05 +00:00
Daan De Meyer
09595fd5f2 ukify: Downgrade required python version to 3.9 2023-01-20 13:55:11 +01:00
Luca Boccassi
da20baaecc sd-login: add sd_pidfd_* APIs
Same as the sd_pid_* counterparts, but take a pid file descriptor instead of
a pid, so that the callers can be sure that the returned values are really
about the process they asked for, and not about a recycled PID.
2023-01-20 12:18:05 +00:00
Luca Boccassi
f840c7d58d process-util: add helper to verify a pid via its pidfd 2023-01-20 12:18:05 +00:00
Luca Boccassi
a6a9ee4b36
Merge pull request #26115 from yuwata/test-fix-memleak-fdleak
test: fix memleak and fd leak
2023-01-20 11:00:53 +00:00
Yu Watanabe
d09df6b94e tree-wide: fix typo 2023-01-20 15:32:16 +09:00
Yu Watanabe
36f73b6c67 test-unit-name: fix fd leak
Fixes an issue reported at https://github.com/systemd/systemd/issues/22576#issuecomment-1396774385.
2023-01-20 14:55:46 +09:00
Yu Watanabe
86d82cb888 test-ndisc: fix memleak and fd leak
Fixes issues reported at #22576.
2023-01-20 14:54:53 +09:00
Luca Boccassi
a98d69f0af
Merge pull request #26105 from yuwata/network-config-parse-address-make-prefix-length-full
network: make config_parse_address() assume full prefix length
2023-01-19 21:06:08 +00:00
Michal Koutný
b9f976fb45 core: mount namespaces: Remove auxiliary bind mounts directory after unit termination
Unit that requires its own mount namespace creates a temporary directory
to implement dynamic bind mounts (org.freedesktop.systemd1.Manager.BindMountUnit).
However, this directory is never removed and they will accumulate for
each unique unit (e.g. templated units of systemd-coredump@).

Attach the auxiliary runtime directory existence to lifetime of other
"runtime" only per-unit directories.
2023-01-19 21:58:10 +01:00