Commit graph

19939 commits

Author SHA1 Message Date
Łukasz Stelmach 3dd26f3e3a README: glibc version 2.16 is required for IP_UNICAST_IF
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=be08eda5
https://bugs.gentoo.org/show_bug.cgi?id=546194
2015-04-11 12:19:10 +02:00
David Herrmann d4b47aa30b TODO: add 13790add4 as blocker for v220 2015-04-11 12:13:24 +02:00
Koen Kooi 684edf2e19 build: add support for AARCH64 EFI
Aarch64 and ARM32 lack an EFI capable objcopy, so use the ldflags + -O
binary trick gnu-efi and the Red Hat shimloader are using.

(David: rebase to systemd-git and added EFI_ prefixes)
2015-04-11 12:09:56 +02:00
Koen Kooi 0d8d368907 boot/util: add ticks_read() stub 2015-04-11 11:54:45 +02:00
Koen Kooi 4c6abc93c7 build: add AARCH64 efi support
This is just plumbing to add ARCH_AARCH64 EFI support for makefile tests
and defining the machine name.
2015-04-11 11:48:56 +02:00
Koen Kooi 8403daa284 boot/util: use x86 ASM only on x86 platforms. 2015-04-11 11:48:39 +02:00
Koen Kooi 32ef61b888 build: support non-x86 EFI builds
Move the no-mmx/no-sse CFLAGS to X86-64 and IA32 defines in preparation
for ARM32 and Aarch64 support.
2015-04-11 11:39:29 +02:00
Peter Hutterer 3ebc2dc498 hwdb: set the resolution for a couple of bcm5974 touchpads
Verified for the 5,1 Macbook, the others are guesses based on the list of
supported devices of the moshi trackpad protector.
http://www.moshi.com/trackpad-protector-trackguard-macbook-pro#silver

Resolution calculated based on the min/max settings set in the kernel driver,
divided by the physical size. This is probably slightly off, but still better
than no resolution at all.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-04-11 08:44:33 +10:00
Peter Hutterer 51c0c28698 udev: builtin-keyboard: add support for EVDEV_ABS_*
Parse properties in the form
EVDEV_ABS_00="<min>:<max>:<res>:<fuzz>:<flat>"

and apply them to the kernel device. Future processes that open that device
will see the updated EV_ABS range.

This is particularly useful for touchpads that don't provide a resolution in
the kernel driver but can be fixed up through hwdb entries (e.g. bcm5974).

All values in the property are optional, e.g. a string of "::45" is valid to
set the resolution to 45.

The order intentionally orders resolution before fuzz and flat despite it
being the last element in the absinfo struct. The use-case for setting
fuzz/flat is almost non-existent, resolution is probably the most common case
we'll need.

To avoid multiple hwdb invocations for the same device, replace the
hwdb "keyboard:" prefix with "evdev:" and drop the separate 60-keyboard.rules
file. The new 60-evdev.rules is called for all event nodes
anyway, we don't need a separate rules file and second callout to the hwdb
builtin.
2015-04-11 08:44:33 +10:00
Peter Hutterer 8a0fd83cf0 udev: builtin-keyboard: invert a condition
No functional changes, just to make the next patch easier to review
2015-04-11 08:44:33 +10:00
Peter Hutterer c9a8e34094 udev: builtin-keyboard: move actual key mapping to a helper function
No changes in the mapping, but previously we opened the device only on
successful parsing. Now we open the mapping as soon as we have a value that
looks interesting. Since errors are supposed to be the exception, not the
rule, this is probably fine.
2015-04-11 08:44:33 +10:00
Peter Hutterer cfba2656e3 udev: builtin-keyboard: immediately EVIOCSKEYCODE when we have a pair
Rather than building a map and looping through the map, immediately call the
ioctl when we have a successfully parsed property.

This has a side-effect: before the maximum number of ioctls was limited to the
size of the map (1024), now it is unlimited.
2015-04-11 08:44:33 +10:00
Peter Hutterer 753bd5c7ed udev: builtin-keyboard: move fetching the device node up
No point parsing the properties if we can't get the devnode to apply them
later. Plus, this makes future additions easier to slot in.
2015-04-11 08:44:33 +10:00
Ronny Chevalier 3c8000956a shared: move replace_env* from util to env-util 2015-04-11 00:34:03 +02:00
Ronny Chevalier 288a74cce5 shared: add terminal-util.[ch] 2015-04-11 00:34:02 +02:00
Ronny Chevalier 3df3e884ae shared: add random-util.[ch] 2015-04-11 00:11:13 +02:00
Ronny Chevalier 0b452006de shared: add process-util.[ch] 2015-04-10 23:54:49 +02:00
Ronny Chevalier 6482f6269c shared: add formats-util.h 2015-04-10 23:54:48 +02:00
Thomas Hindoe Paaboel Andersen 05a08cb60f dbus: typo fix in log 2015-04-10 23:39:40 +02:00
Thomas Hindoe Paaboel Andersen 75c2a9fd13 tmpfiles: fix build with clang
Clang is not happy about using the cleanup attribute in switches
2015-04-10 23:28:08 +02:00
Thomas Hindoe Paaboel Andersen 733dbdc534 efivars: fix build for non-efi 2015-04-10 23:00:07 +02:00
Tom Gundersen 2e036c4eae shared: boot-timestamps - remove ifdef
No need to ifdef out efi code as the functions are always defined.
2015-04-10 19:55:49 +02:00
Tom Gundersen b28ce7c6db shared: efivars - fix compile on non-EFI systems
systemctl and logind were unconditionally using functions that were not compiled
on non-EFI systems. Add stubs returning -EOPNOTSUPP to fix compile again.
2015-04-10 19:55:49 +02:00
Tom Gundersen 9df49b3358 shared: efivars - is_efi_*() returns bool instead of int
There was a bug where is_efi_*() could return a negative error value, which would be treated as 'true',
just make this a bool in the helper library to avoid the problem.
2015-04-10 19:55:49 +02:00
Lennart Poettering 3dc055541c Revert "sd-dhcp-client: fix strict aliasing issue"
This reverts commit 6ec8e7c763.

This doesn't fix any issues, just makes the code harder to read.
2015-04-10 19:04:43 +02:00
Lennart Poettering 53bac4e0e3 sd-event: simplify sd_event_run() 2015-04-10 18:45:39 +02:00
Lennart Poettering 5c5ccf12b6 tmpfiles: add specifier expansion for L and C lines, too 2015-04-10 18:07:04 +02:00
Lennart Poettering b1b5922e2f update TODO 2015-04-10 17:36:07 +02:00
Michal Sekletar d5cad22109 bus-util: be more verbose if dbus job fails
Users might have hard time figuring out why exactly their systemctl request
failed. If dbus job fails try to figure out more details about failure by
examining Result property of the service.

https://bugzilla.redhat.com/show_bug.cgi?id=1016680
2015-04-10 17:36:07 +02:00
Ronny Chevalier 756c09e672 core: set_put never returns -EEXIST
When the value is already there it returns 0.

Also add a test to ensure this
2015-04-10 17:13:15 +02:00
Lennart Poettering 17493fa5d1 tmpfiles: enforce ordering when executing lines
Always create files first, and then adjust their ACLs, xattrs, file
attributes, never the opposite. Previously the order was not
deterministic, thus possibly first adjusting ACLs/xattrs/file
attributes before actually creating the items.
2015-04-10 16:23:47 +02:00
Lennart Poettering 90937fe3d3 tmpfiles: eat up empty columns 2015-04-10 16:23:46 +02:00
Lennart Poettering bd550f78eb tmpfiles: substitute % specifiers in arguments for writing files and xattrs 2015-04-10 16:23:46 +02:00
Lennart Poettering c82500c6fb tmpfiles: warn if we get an argument on lines that don't take any 2015-04-10 16:23:46 +02:00
Lennart Poettering 3ea40b7810 tmpfiles: mostly revert 71044f609b
Add a comment why returning a positive error is OK and intended in this
case.

(It's still a nasty hack to do this though!)
2015-04-10 16:23:46 +02:00
Lennart Poettering f0bc504794 device-nodes: minor simplifications 2015-04-10 16:23:46 +02:00
Lennart Poettering 2ff7b0a542 util: unify how we parse mode_t strings 2015-04-10 16:23:46 +02:00
Lennart Poettering 6dd67163b8 util: remove normalize_env_assignment(), it's unused 2015-04-10 16:23:46 +02:00
Ronny Chevalier 0d67448869 shared: fix memleak
path was used for 2 purposes but it was not freed before being reused.
2015-04-10 15:44:02 +02:00
Lennart Poettering e1eaca26cb util: mark unquote() static, so that new code doesn't use this anymore 2015-04-10 12:16:54 +02:00
Lennart Poettering 8ebac1f9a6 util: fix unicode decoding in unquote_first_word() 2015-04-10 11:56:04 +02:00
Lennart Poettering f3ee629711 util: when unescaping C escape sequences support C++11 \u and \U unicode literals
We simply recode them in utf8.
2015-04-10 11:28:34 +02:00
Thomas Hindoe Paaboel Andersen 96406c1a27 util: fix a typo in comment 2015-04-09 23:58:28 +02:00
David Herrmann 7757517220 terminal/page: drop unneeded DISABLE_WARNING_*
The macros in shared/macro.h have been updated to no longer use fixed
variable names. This will silence any shadowing-warnings, so drop the
DISABLE_WARNING_* annotations.
2015-04-09 22:59:59 +02:00
David Herrmann 43ef760376 bus: simplify bus_message_read_strv_extend()
Avoid unbound for(;;) loop and use the established coding-style:
  while ((r = sd_bus_message_read*(...)) > 0) {
  }
  if (r < 0)
          return r;

This is much easier to read and used all over the code base.
2015-04-09 22:59:59 +02:00
David Herrmann 0704ea57b7 bus: use free_and_strdup()
Save some LOCs by replacing strdup()+error-handling+free+assign with
free_and_strdup().
2015-04-09 22:59:59 +02:00
David Herrmann 0a790ab540 terminal/idev: fix NULL terminator for bus-property mapping
We require a NULL entry as sentinal in bus_properties_map. Fix this!
2015-04-09 22:59:58 +02:00
Ronny Chevalier 3e348b8a6a test-journal-flush: fix memleak 2015-04-09 18:47:52 +02:00
Ronny Chevalier cd977dca10 util: cunescape - fix memleak in error path 2015-04-09 18:47:52 +02:00
Lennart Poettering 019c7fba75 util: add shell_maybe_quote() call for preparing a string for shell cmdline inclusion
If necessary the passed string is enclosed in "", and all special
characters escapes.

This also ports over usage in bus-util.c and job.c to use this, instead
of a incorrect local implementation that forgets to properly escape.
2015-04-09 18:32:21 +02:00