Commit Graph

34640 Commits

Author SHA1 Message Date
Michael 'pbone' Pobega fc0bb34db3 hwdb: redefine Lenovo ThinkPad X140e touchpad dimensions (#9818)
The default setup for the Lenovo ThinkPad X140e is 104x104mm, and the kernel
claims that it's 64x21. The default 104x104mm dimensions causes the vertical
axis to act oddly, causing random vertical jitters and higher vertical
sensitivity.

Measuring it showed that it was 74x32, and these touchpad dimensions provide
a better (if a little bit slower) experience but a consistent sensitivity
in all directions.

These values were obtained using the `touchpad-edge-detector` tool.
2018-08-07 17:41:49 +10:00
Lennart Poettering 2ed7449fcb
Merge pull request #9789 from filbranden/cmp1
Add new CMP(a, b) macro
2018-08-07 09:39:26 +02:00
Filipe Brandenburger adb6cd9be2 systemctl: add support for --wait to is-system-running
This makes it possible to wait until boot is finished without having to poll
for this command repeatedly, instead using the syntax:

  $ systemctl is-system-running --wait

Waiting is implemented by waiting for the StartupFinished signal to be posted
on the bus.

Register the matcher before checking for the property to avoid race conditions.

Tested by artificially delaying startup with a oneshot service and calling this
command, checked that it emitted `running` and exited with a 0 return code as
soon as the delay service completed startup.

Also tested that booting to degraded state unblocks the command.

Inserted a delay between getting the property and waiting for the signal and
confirmed this seems to work free of race conditions.

Updated the --help text (under --wait) and the man page to document the new
feature.
2018-08-07 09:33:25 +02:00
Filipe Brandenburger b994fe95a1 dns-domain: use CMP() in dns_name_compare_func 2018-08-06 19:26:44 -07:00
Filipe Brandenburger 53c5797fbd resolve: use CMP() in dns_resource_record_compare_func
This function doesn't really implement ordering, but CMP() is still fine to use
there. Keep the comment in place, just update it slightly to indicate that.
2018-08-06 19:26:44 -07:00
Filipe Brandenburger a0edd02e43 tree-wide: Convert compare_func's to use CMP() macro wherever possible.
Looked for definitions of functions using the *_compare_func() suffix.

Tested:
- Unit tests passed (ninja -C build/ test)
- Installed this build and booted with it.
2018-08-06 19:26:35 -07:00
Filipe Brandenburger 26cdf3e50b network: Use CMP() macro for comparison.
Follow up for PRs #9764 and #9760.
2018-08-06 19:19:12 -07:00
Filipe Brandenburger 84fb2131d0 macros: add CMP(a, b) macro.
Macro returns -1, 0, 1 depending on whether a < b, a == b or a > b.

It's safe to use on unsigned types.

Add tests to confirm corner cases are properly covered.
2018-08-06 19:19:05 -07:00
Filipe Brandenburger 117efe065a macro: drop __extension__, reformat and reindent
Drop __extension__, since we don't use gcc -Wpedantic or -ansi.

Reformat code for spacing. Add spaces after commas almost everywhere.
Reindent code blocks in macro definitions, for consistency.
2018-08-06 19:15:02 -07:00
Lennart Poettering 4027f96aa0 machinectl: shorten error logging a bit 2018-08-07 08:58:36 +09:00
Franck Bui 0ec113366d smack-util: use 'path' paremeter as is if it's already absolute in mac_smack_fix_at() 2018-08-06 20:25:56 +02:00
Zbigniew Jędrzejewski-Szmek 7735d9397b
Merge pull request #9792 from poettering/hashmap-mempool
minor hashmap fixes
2018-08-06 14:13:30 +02:00
Yu Watanabe 68c597e9e4 resolve: treat some icmp errors as disconnected
Fixes #9773.
2018-08-06 09:57:00 +02:00
Yu Watanabe 72938b9309 resolve: sort headers 2018-08-06 09:57:00 +02:00
Zbigniew Jędrzejewski-Szmek cad8d67194 Merge pull request #9775 from yuwata/follow-up-9766 2018-08-06 07:59:34 +02:00
Yu Watanabe 10c6e7e51e resolve: fix error handling of dns_name_is_valid() 2018-08-06 10:48:20 +09:00
Yu Watanabe 31ee397327 man: mention that Hostname= for DHCP must be a valid DNS domain name 2018-08-06 10:48:12 +09:00
Yu Watanabe a8494759b4 network: DHCP: ignore error in setting hostname when it is given by uname()
C.f. #9759.
2018-08-06 10:48:02 +09:00
Yu Watanabe 19f9e4e2c8 network: use free_and_replace() 2018-08-06 10:46:05 +09:00
Yu Watanabe 6528693a94 network: also check that Hostname= is a valid DNS domain name 2018-08-06 10:46:05 +09:00
Lennart Poettering 685499007f
Merge pull request #8822 from fbuihuu/rfc-tmpfiles-safe-upstream
Make tmpfiles safe
2018-08-03 18:11:36 +02:00
Lennart Poettering 7647c01d8f man: include libsystemd-pkgconfig.xml in a few more man pages
for some reason this was forgotten for a couple of sd_bus man pages,
let's fix that.
2018-08-03 17:36:11 +02:00
Lennart Poettering 7612719ef4 test-resolved: follow coding style, use fopen() with 'e' 2018-08-03 17:36:11 +02:00
Lennart Poettering 205c085bc3 hashmap: add an explicit assert() for detecting when objects migrated between threads
When clients don't follow protocol and use the same object from
different threads, then we previously would silently corrupt memory.
With this assert we'll fail with an assert(). This doesn't fix anything
but certainly makes mis-uses easier to detect and debug.

Triggered by https://bugzilla.redhat.com/show_bug.cgi?id=1609349
2018-08-03 17:36:11 +02:00
Lennart Poettering b4f607433c hashmap: add an environment variable to turn off the memory pool used by hashmaps
Triggered by https://bugzilla.redhat.com/show_bug.cgi?id=1609349
2018-08-03 17:36:11 +02:00
Lennart Poettering 64a7ef8bc0 man: be more explicit about thread safety of sd_journal
Triggered by https://bugzilla.redhat.com/show_bug.cgi?id=1609349

This adds two generic paragaphs we include via xinclude. One is the
"strict" version, which contains wording saying that we are thread
agnostic and what that means. And the other is the "safe" version, for
the cases we provide fully safety.

Let's then change most man pages to use either of these generic
paragraphs. With one exception: man/sd_journal_get_catalog.xml contains
both kinds of function, we hence use manual wording.
2018-08-03 17:36:11 +02:00
Lennart Poettering af560fc1da update TODO 2018-08-03 16:41:42 +02:00
Zbigniew Jędrzejewski-Szmek 72f6e560ac
Merge pull request #9791 from poettering/user-runtime-dir-fixes
user-runtime-dir@.service fixes
2018-08-03 13:32:01 +02:00
Lennart Poettering 4103c950ff
Merge pull request #9787 from yuwata/dns-over-tls-log
DNS-over-TLS(openssl): fix error handling
2018-08-03 13:11:18 +02:00
Lennart Poettering 1193c11a04 units: assign user-runtime-dir@.service to user-%i.slice
This service won't use much resources, but it's certainly nicer to see
it attached th the user's slice along with user@.service, so that
everything we run for a specific user is properly bound into one unit.
2018-08-03 10:45:31 +02:00
Lennart Poettering eb748aef4f units: order user-runtime-dir@.service after systemd-user-sessions.service
We use systemd-user-sessions.service as barrier when to allow login
sessions. With this patch user@.service is ordered after that too, so
that any login related code (which user-runtime-dir@.service is) is
guaranteed to run after the barrier, and never before.
2018-08-03 10:42:09 +02:00
Lennart Poettering d06e8fbce3 units: make sure user-runtime-dir@.service is Type=oneshot
We order user@.service after it, hence we need to properly know when it
finished starting up.
2018-08-03 10:38:49 +02:00
Lennart Poettering 3a13442bbf user-runtime-dir: downgrade a few log messages to LOG_DEBUG that we ignore
As the comments already say it might be quite likely that
$XDG_RUNTIME_DIR is not set up as mount, and we shouldn't complain about
that.

Moreover, let's make this idempotent, so that a runtime dir that is
already gone and is removed again doesn't cause failure.
2018-08-03 10:38:49 +02:00
Yu Watanabe 8e740110df resolve: openssl: make dnstls_stream_{write,read}() may return zero 2018-08-03 07:19:01 +09:00
Yu Watanabe 8eadd29183 resolve: fix error handling of SSL_shutdown() 2018-08-03 07:18:08 +09:00
Yu Watanabe 36f1946c73 resolve: fix typo and coding style cleanups 2018-08-03 06:29:38 +09:00
Yu Watanabe 59c3fee2c7 resolve: clear error queue before calling SSL_*() 2018-08-03 06:26:58 +09:00
Lennart Poettering e6c7c7ffd5 man: document that 'nofail' also has an effect on ordering
Prompted by #9765
2018-08-02 14:15:44 -07:00
Lennart Poettering 27d4866ad8
Merge pull request #9776 from keszybz/sd-bus-docs
More man pages for sd-bus and related changes
2018-08-02 17:07:03 +02:00
Yu Watanabe 99521cab77 resolve: fix error handling of dns_stream_read() 2018-08-02 17:06:32 +02:00
Zbigniew Jędrzejewski-Szmek 1a167ac4f6
Merge pull request #9764 from yuwata/hash_ops-cleanups
Hash ops cleanups
2018-08-02 15:53:05 +02:00
Zbigniew Jędrzejewski-Szmek 46fdbae32e man: add sd_bus_message_rewind(3) 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek e7015301fb man: document sd_bus_slot_get_bus in sd_bus_slot_ref(3)
Similar reasoning as for sd_bus_message_get_bus().
2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek dee0fccca3 man: add sd_bus_slot_set_description(3) 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 6d4a51820e man: add sd_bus_slot_set_userdata(3) 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek d65044e812 man: add sd_bus_message_set_expect_reply(3) 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 9905256523 man: document sd_bus_message_get_bus() in sd_bus_message_new(3)
It's not a particularly obvious place, but it's a trivial function that isn't
worth a man page of its own, and it doesn't fit anywhere else either.
2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 2c48865bd0 man: add sd_bus_message_verify_type(3) 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 3d51a011f1 sd-bus: verify destination and sender values when setting
We would verify destination e.g. in sd_bus_message_new_call, but allow setting
any value later on with sd_bus_message_set_destination. I assume this check was
omitted not on purpose.
2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 9c9207912e man: add sd_bus_message_get_type(3)
sd_bus_message{get_type,is_signal,is_method_call,is_method_error} get one man
page.

sd_bus_message_{set,get}_{destination,path,interface,member,sender} are put in
the second one.
2018-08-02 15:49:45 +02:00