]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
9 years agoshared: move assert_return_errno() from libudev
Tom Gundersen [Fri, 10 Apr 2015 18:39:43 +0000 (20:39 +0200)] 
shared: move assert_return_errno() from libudev

This should not be used for any new code, as we don't set errno in new code,
but there are several legacy users, so let's keep it in shared.

9 years agosd-bus: add more comments to the credential decision logic
Lennart Poettering [Thu, 16 Apr 2015 15:27:51 +0000 (17:27 +0200)] 
sd-bus: add more comments to the credential decision logic

9 years agocore: fix spurious warning about cpuacct-usage-base deserialization
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2015 12:10:33 +0000 (08:10 -0400)] 
core: fix spurious warning about cpuacct-usage-base deserialization

The key was parsed properly, but the warning was still generated.

9 years agoudev-builtin-usb_id: fix inverted condition
Zbigniew Jędrzejewski-Szmek [Wed, 15 Apr 2015 12:20:22 +0000 (08:20 -0400)] 
udev-builtin-usb_id: fix inverted condition

Fix for 4beac74e69.

Thanks, Ronny!

9 years agoselinux: use different log priorites for log messages
Zbigniew Jędrzejewski-Szmek [Tue, 24 Feb 2015 01:06:00 +0000 (20:06 -0500)] 
selinux: use different log priorites for log messages

When selinux calls our callback with a log message, it specifies the
type as AVC or INFO/WARNING/ERROR. The question is how to map this to
audit types and/or log priorities. SELINUX_AVC maps to AUDIT_USER_AVC
reasonably, but for the other messages we have no idea, hence we use
AUDIT_USER_AVC for everything. When not using audit logging, we can
map those selinux levels to LOG_INFO/WARNING/ERROR etc.

Also update comment which was not valid anymore in light of journald
sucking in audit logs, and was actually wrong from the beginning —
libselinux uses the callback for everything, not just avcs.

This stemmed out of https://bugzilla.redhat.com/show_bug.cgi?id=1195330,
but does not solve it.

9 years agosystemctl: avoid bumping NOFILE rlimit unless needed
Zbigniew Jędrzejewski-Szmek [Wed, 15 Apr 2015 01:47:20 +0000 (20:47 -0500)] 
systemctl: avoid bumping NOFILE rlimit unless needed

We actually only use the journal when showing status. Move setrlimit call
so it is only called for status.

https://bugzilla.redhat.com/show_bug.cgi?id=1184712

9 years agosd-device: fix typo
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2015 16:39:40 +0000 (12:39 -0400)] 
sd-device: fix typo

9 years agoudev-builtin-usb_id: simplification
Zbigniew Jędrzejewski-Szmek [Mon, 6 Apr 2015 19:42:18 +0000 (15:42 -0400)] 
udev-builtin-usb_id: simplification

9 years agotest-dhcp6-client: don't unref the event twice
Thomas Hindoe Paaboel Andersen [Tue, 14 Apr 2015 16:24:00 +0000 (18:24 +0200)] 
test-dhcp6-client: don't unref the event twice

9 years agosd-dhcp6-client: unref lease when freeing the client
Thomas Hindoe Paaboel Andersen [Tue, 14 Apr 2015 16:02:15 +0000 (18:02 +0200)] 
sd-dhcp6-client: unref lease when freeing the client

9 years agosd-devcie: fix typo
Tom Gundersen [Tue, 14 Apr 2015 14:55:18 +0000 (16:55 +0200)] 
sd-devcie: fix typo

9 years agosd-device: fix reading of subsystem
Tom Gundersen [Tue, 14 Apr 2015 14:05:53 +0000 (16:05 +0200)] 
sd-device: fix reading of subsystem

9 years agosd-device: allow uevent files to be write-only
Tom Gundersen [Tue, 14 Apr 2015 13:15:49 +0000 (15:15 +0200)] 
sd-device: allow uevent files to be write-only

9 years agoudev: downgrade a few warnings to debug messages
Lennart Poettering [Tue, 14 Apr 2015 13:48:26 +0000 (15:48 +0200)] 
udev: downgrade a few warnings to debug messages

https://bugs.freedesktop.org/show_bug.cgi?id=89885

9 years agoinput_id: Identify scroll-wheel device on Trust TB7300 tablet as keyboard
Hans de Goede [Mon, 13 Apr 2015 09:15:01 +0000 (11:15 +0200)] 
input_id: Identify scroll-wheel device on Trust TB7300 tablet as keyboard

The Trust TB7300 (relabelled Waltop?) tablet has a scrollwheel which shows
up as a /dev/input/event# node all by itself. Currently input_id does not
set any ID_INPUT_FOO attr on this causing it it to not be recognized by
Xorg / libinput.

This commit fixes this by marking it with ID_INPUT_KEY.

Reported-by: Sjoerd Timmer <themba@randomdata.nl>
9 years agoudev: input_id: Make test_pointer / test_keys return if they've found anything
Hans de Goede [Mon, 13 Apr 2015 09:15:00 +0000 (11:15 +0200)] 
udev: input_id: Make test_pointer / test_keys return if they've found anything

Make test_pointer / test_keys return a boolean indicating whether or not
they've set any properties on the device.

9 years agoudev: input_id: whitespace fixes
Peter Hutterer [Mon, 13 Apr 2015 23:22:50 +0000 (09:22 +1000)] 
udev: input_id: whitespace fixes

Remove whitespaces before opening parentheses, mostly before test_bit.

9 years agotest-ipv4ll: clean up the event
Thomas Hindoe Paaboel Andersen [Mon, 13 Apr 2015 21:33:24 +0000 (23:33 +0200)] 
test-ipv4ll: clean up the event

shuts up valgrind/sanitizers

9 years agotmpfiles: Add +C attrib to the journal files directories
Goffredo Baroncelli [Sun, 12 Apr 2015 18:30:28 +0000 (20:30 +0200)] 
tmpfiles: Add +C attrib to the journal files directories

Add the +C file attribute (NOCOW) to the journal directories, so that
the flag is inherited automatically for new journal files created in
them. The journal write pattern is problematic on btrfs file systems as
it results in badly fragmented files when copy-on-write (COW) is used:
the performances decreases substantially over time.

To avoid this issue, this tmpfile.d snippet sets the NOCOW attribute to
the journal files directories, so newly created journal files inherit
the NCOOW attribute that disables copy-on-write.

Be aware that the NOCOW file attribute also disables btrfs checksumming
for these files, and thus prevents btrfs from rebuilding corrupted files
on a RAID filesystem.

In a single disk filesystems (or filesystems without redundancy) it is
safe to use the NOCOW flags without drawbacks, since the journal files
contain their own checksumming.

9 years agoupdate TODO
Lennart Poettering [Mon, 13 Apr 2015 13:23:42 +0000 (15:23 +0200)] 
update TODO

9 years agoman: slightly fewer paragraphs can help readability
Lennart Poettering [Mon, 13 Apr 2015 13:23:37 +0000 (15:23 +0200)] 
man: slightly fewer paragraphs can help readability

9 years agoman: fix examples indentation in tmpfiles.d(5)
Lennart Poettering [Mon, 13 Apr 2015 13:23:07 +0000 (15:23 +0200)] 
man: fix examples indentation in tmpfiles.d(5)

9 years agoman: add information about more lines to explanation of argument field
Lennart Poettering [Mon, 13 Apr 2015 13:22:50 +0000 (15:22 +0200)] 
man: add information about more lines to explanation of argument field

9 years agoman: document which tmpfiles line types follow symlinks
Lennart Poettering [Mon, 13 Apr 2015 13:18:09 +0000 (15:18 +0200)] 
man: document which tmpfiles line types follow symlinks

Generally, we will not follow symlinks, except for "w".

Avoid documentation for now for fifo, device node, directory lines,
which currently follow symlinks but better shouldn't.

9 years agotmpfiles: don't follow symlinks when adjusting ACLs, fille attributes, access modes...
Lennart Poettering [Mon, 13 Apr 2015 13:16:54 +0000 (15:16 +0200)] 
tmpfiles: don't follow symlinks when adjusting ACLs, fille attributes, access modes or ownership

9 years agohwdb: Fix wireless switch on Dell Latitude
Martin Pitt [Mon, 13 Apr 2015 11:34:14 +0000 (06:34 -0500)] 
hwdb: Fix wireless switch on Dell Latitude

It does not generate a release event.

https://launchpad.net/bugs/1441849

9 years agojournal-gatewayd: use (void) to silence coverity
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2015 02:46:37 +0000 (22:46 -0400)] 
journal-gatewayd: use (void) to silence coverity

CID #996297.

9 years agojournal: use (void) to silence coverity
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2015 02:43:08 +0000 (22:43 -0400)] 
journal: use (void) to silence coverity

This shouldn't really fail and anyway not much we can do about it.

CID #996292, #996294, #996295.

9 years agopam_system: use (void) to silence coverity
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2015 02:41:20 +0000 (22:41 -0400)] 
pam_system: use (void) to silence coverity

CID #996284.

9 years agoman: add link to glib in sd_event_run(3)
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2015 01:47:58 +0000 (21:47 -0400)] 
man: add link to glib in sd_event_run(3)

9 years agopo: update Polish translation
Piotr Drąg [Sat, 11 Apr 2015 23:45:11 +0000 (01:45 +0200)] 
po: update Polish translation

https://bugs.freedesktop.org/show_bug.cgi?id=89989

9 years agosysv-generator: free memory allocated for service stubs
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2015 20:05:10 +0000 (16:05 -0400)] 
sysv-generator: free memory allocated for service stubs

9 years agoshared/hashmap: normalize whitespace
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2015 20:04:51 +0000 (16:04 -0400)] 
shared/hashmap: normalize whitespace

9 years agosysv-generator: always log on oom
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2015 15:52:06 +0000 (11:52 -0400)] 
sysv-generator: always log on oom

This code appears to follow the following convention:
- all errors are logged at point of origin
- oom errors abort execution, non-oom errors are logged but
  execution continues.

Make sure all ooms result in a log message, and remove warning which could
not be reached. Downgrade non-fatal errors to warnings.

9 years agosysv-generator: split out two nested blocks into functions
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2015 15:17:22 +0000 (11:17 -0400)] 
sysv-generator: split out two nested blocks into functions

No functional change intended. Just splitting this out to make
it easier to edit in the future.

9 years agodhcp: yes, infiniband has the larger MAC address length, but let the compuler figure...
Lennart Poettering [Sun, 12 Apr 2015 18:15:08 +0000 (20:15 +0200)] 
dhcp: yes, infiniband has the larger MAC address length, but let the compuler figure that out...

9 years agoefi-boot-generator: need need to proceed if /boot is already a mount point
Lennart Poettering [Sun, 12 Apr 2015 18:01:07 +0000 (20:01 +0200)] 
efi-boot-generator: need need to proceed if /boot is already a mount point

9 years agogpt-generator: Find device on a stateless system
Tobias Hunger [Fri, 10 Apr 2015 23:52:50 +0000 (01:52 +0200)] 
gpt-generator: Find device on a stateless system

A stateless system has a tmpfs as root file system. That obviously
does not have any block device associated with it. So try falling back
to the device of the /usr filesystem if the root filesystem fails.

9 years agopython-systemd: fix is_socket_inet to cope with ports
Simon Farnsworth [Wed, 25 Mar 2015 17:00:09 +0000 (17:00 +0000)] 
python-systemd: fix is_socket_inet to cope with ports

Just a couple of trivial oversights.

9 years agoefi-boot-generator: Continue if /boot does not exist
Tobias Hunger [Sat, 11 Apr 2015 00:13:31 +0000 (02:13 +0200)] 
efi-boot-generator: Continue if /boot does not exist

/boot does not exist on a stateless system, so do not get
confused by that.

9 years agobus-util: add articles to explanation messages
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2015 23:39:30 +0000 (19:39 -0400)] 
bus-util: add articles to explanation messages

We are talking about one member of a group of things (resource limits, signals,
timeouts), without specifying which one. An indenfinite article is in order.

When we are talking about the control process, it's a specific one, so the
definite article is used.

9 years agosysv-generator: free LookupPaths also on error
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2015 16:00:27 +0000 (12:00 -0400)] 
sysv-generator: free LookupPaths also on error

Followup for 7a03974a6f.

9 years agoudev-builtin-keyboard: make error messages more standard
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2015 15:38:34 +0000 (11:38 -0400)] 
udev-builtin-keyboard: make error messages more standard

- No need to add "Error, " prefix, we already have that as metadata.
- Also use double quotes for path names, as in most other places.
- Remove stray newline at end of message.
- Downgrade error messages after which we continue to warnings.

9 years agorules: finish incomplete rename
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2015 15:05:39 +0000 (11:05 -0400)] 
rules: finish incomplete rename

Fixup for 51c0c2869845a058268d54c3111d55d0dd485704.

9 years agotmpfiles: use qsort_safe
Zbigniew Jędrzejewski-Szmek [Fri, 10 Apr 2015 22:57:05 +0000 (18:57 -0400)] 
tmpfiles: use qsort_safe

9 years agosysv-generator: fix mem leaks
Thomas Hindoe Paaboel Andersen [Sat, 11 Apr 2015 11:45:46 +0000 (13:45 +0200)] 
sysv-generator: fix mem leaks

9 years agobus: implement bus_path_{en,de}code_unique()
David Herrmann [Fri, 10 Apr 2015 15:44:30 +0000 (17:44 +0200)] 
bus: implement bus_path_{en,de}code_unique()

Whenever we provide a bus API that allows clients to create and manage
server-side objects, we need to provide a unique name for these objects.
There are two ways to provide them:
  1) Let the server choose a name and return it as method reply.
  2) Let the client pass its name of choice in the method arguments.

The first method is the easiest one to implement. However, it suffers from
a race condition: If a client creates an object asynchronously, it cannot
destroy that object until it received the method reply. It cannot know the
name of the new object, thus, it cannot destroy it. Furthermore, this
method enforces a round-trip. If the client _depends_ on the method call
to succeed (eg., it would close() the connection if it failed), the client
usually has no reason to wait for the method reply. Instead, the client
can immediately schedule further method calls on the newly created object
(in case the API guarantees in-order method-call handling).

The second method fixes both problems: The client passes an object name
with the method-call. The server uses it to create the object. Therefore,
the client can schedule object destruction even if the object-creation
hasn't finished, yet (again, requiring in-order method-call handling).
Furthermore, the client can schedule further method calls on the newly
created object, before the constructor returned.

There're two problems to solve, though:
  1) Object names are usually defined via dbus object paths, which are
     usually globally namespaced. Therefore, multiple clients must be able
     to choose unique object names without interference.
  2) If multiple libraries share the same bus connection, they must be
     able to choose unique object names without interference.

The first problem is solved easily by prefixing a name with the
unique-bus-name of a connection. The server side must enforce this and
reject any other name.
The second problem is solved by providing unique suffixes from within
sd-bus. As long as sd-bus always returns a fresh new ID, if requested,
multiple libraries will never interfere. This implementation re-uses
bus->cookie as ID generator, which already provides unique IDs for each
bus connection.

This patch introduces two new helpers:
  bus_path_encode_unique(sd_bus *bus,
                         const char *prefix,
                         const char *sender_id,
                         const char *external_id,
                         char **ret_path);
    This creates a new object-path via the template
    '/prefix/sender_id/external_id'. That is, it appends two new labels to
    the given prefix. If 'sender_id' is NULL, it will use
    bus->unique_name, if 'external_id' is NULL, it will allocate a fresh,
    unique cookie from bus->cookie.

  bus_path_decode_unique(const char *path,
                         const char *prefix,
                         char **ret_sender,
                         char **ret_external);
    This reverses what bus_path_encode_unique() did. It parses 'path' from
    the template '/prefix/sender/external' and returns both suffix-labels
    in 'ret_sender' and 'ret_external'. In case the template does not
    match, 0 is returned and both output arguments are set to NULL.
    Otherwise, 1 is returned and the output arguments contain the decoded
    labels.

Note: Client-side allocated IDs are inspired by the Wayland protocol
      (which itself was inspired by X11). Wayland uses those IDs heavily
      to avoid round-trips. Clients can create server-side objects and
      send method calls without any round-trip and waiting for any object
      IDs to be returned. But unlike Wayland, DBus uses gobally namespaced
      object names. Therefore, we have to add the extra step by adding the
      unique-name of the bus connection.

9 years agobus: implement bus_label_unescape_n()
David Herrmann [Fri, 10 Apr 2015 15:43:04 +0000 (17:43 +0200)] 
bus: implement bus_label_unescape_n()

This is like bus_label_unescape() but takes a maximum length instead of
relying on NULL-terminated strings. This is highly useful to unescape
labels that are not at the end of a path.

9 years agohashmap: return NULL from destructor
David Herrmann [Fri, 10 Apr 2015 09:15:12 +0000 (11:15 +0200)] 
hashmap: return NULL from destructor

We _always_ return NULL from destructors to allow direct assignments to
the variable holding the object. Especially on hashmaps, which treat NULL
as empty hashmap, this is pretty neat.

9 years agoudevd: fix synchronization with settle when handling inotify events
Daniel Drake [Mon, 6 Apr 2015 22:03:43 +0000 (16:03 -0600)] 
udevd: fix synchronization with settle when handling inotify events

udev uses inotify to implement a scheme where when the user closes
a writable device node, a change uevent is forcefully generated.
In the case of block devices, it actually requests a partition rescan.

This currently can't be synchronized with "udevadm settle", i.e. this
is not reliable in a script:

 sfdisk --change-id /dev/sda 1 81
 udevadm settle
 mount /dev/sda1 /foo

The settle call doesn't synchronize there, so at the same time we try
to mount the device, udevd is busy removing the partition device nodes and
readding them again. The mount call often happens in that moment where the
partition node has been removed but not readded yet.

This exact issue was fixed long ago:
http://git.kernel.org/cgit/linux/hotplug/udev.git/commit/?id=bb38678e3ccc02bcd970ccde3d8166a40edf92d3

but that fix is no longer valid now that sequence numbers are no longer
used.

Fix this by forcing another mainloop iteration after handling inotify events
before unblocking settle. If the inotify event caused us to generate a
"change" event, we'll pick that up in the following loop iteration, before
we reach the end of the loop where we respond to settle's control message,
unblocking it.

9 years agohwdb: add Samsung ATIV Book 6 / 8
Gavin Li [Tue, 7 Apr 2015 10:30:10 +0000 (03:30 -0700)] 
hwdb: add Samsung ATIV Book 6 / 8

This adds support for the keyboard illumination keys and fixes
Fn+F1.

9 years agobuild: allow setting OBJCOPY
Marc-Antoine Perennou [Wed, 8 Apr 2015 20:33:54 +0000 (22:33 +0200)] 
build: allow setting OBJCOPY

9 years agoconfigure: allow setting EFI_CC
Marc-Antoine Perennou [Wed, 8 Apr 2015 20:33:53 +0000 (22:33 +0200)] 
configure: allow setting EFI_CC

9 years agoefi: use EFI_CC
Marc-Antoine Perennou [Tue, 7 Apr 2015 18:54:04 +0000 (20:54 +0200)] 
efi: use EFI_CC

9 years agofactory: install to datadir
Marc-Antoine Perennou [Tue, 7 Apr 2015 18:54:02 +0000 (20:54 +0200)] 
factory: install to datadir

9 years agoudev: restore udevadm settle timeout
Nir Soffer [Wed, 8 Apr 2015 01:04:16 +0000 (04:04 +0300)] 
udev: restore udevadm settle timeout

Commit 9ea28c55a2 (udev: remove seqnum API and all assumptions about
seqnums) introduced a regresion, ignoring the timeout option when
waiting until the event queue is empty.

Previously, if the udev event queue was not empty when the timeout was
expired, udevadm settle was returning with exit code 1.  To check if the
queue is empty, you could invoke udevadm settle with timeout=0. This
patch restores the previous behavior.

(David: fixed timeout==0 handling and dropped redundant assignment)

9 years agorules: fix tests for removable state
Matthew Garrett [Thu, 9 Apr 2015 01:58:09 +0000 (18:58 -0700)] 
rules: fix tests for removable state

We only care about whether our direct parent is removable, not whether any
further points up the tree are - the kernel will take care of policy for
those itself. This enables autosuspend on devices where the root hub reports
that its removable state is unknown.

9 years agoREADME: glibc version 2.16 is required for IP_UNICAST_IF
Łukasz Stelmach [Fri, 10 Apr 2015 17:39:17 +0000 (19:39 +0200)] 
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

9 years agoTODO: add 13790add4 as blocker for v220
David Herrmann [Sat, 11 Apr 2015 10:13:24 +0000 (12:13 +0200)] 
TODO: add 13790add4 as blocker for v220

9 years agobuild: add support for AARCH64 EFI
Koen Kooi [Sat, 11 Apr 2015 08:23:26 +0000 (10:23 +0200)] 
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)

9 years agoboot/util: add ticks_read() stub
Koen Kooi [Sat, 11 Apr 2015 08:23:25 +0000 (10:23 +0200)] 
boot/util: add ticks_read() stub

9 years agobuild: add AARCH64 efi support
Koen Kooi [Sat, 11 Apr 2015 08:23:24 +0000 (10:23 +0200)] 
build: add AARCH64 efi support

This is just plumbing to add ARCH_AARCH64 EFI support for makefile tests
and defining the machine name.

9 years agoboot/util: use x86 ASM only on x86 platforms.
Koen Kooi [Sat, 11 Apr 2015 08:23:23 +0000 (10:23 +0200)] 
boot/util: use x86 ASM only on x86 platforms.

9 years agobuild: support non-x86 EFI builds
Koen Kooi [Sat, 11 Apr 2015 08:23:22 +0000 (10:23 +0200)] 
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.

9 years agohwdb: set the resolution for a couple of bcm5974 touchpads
Peter Hutterer [Mon, 23 Mar 2015 00:18:42 +0000 (10:18 +1000)] 
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>
9 years agoudev: builtin-keyboard: add support for EVDEV_ABS_*
Peter Hutterer [Thu, 19 Mar 2015 04:19:58 +0000 (14:19 +1000)] 
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.

9 years agoudev: builtin-keyboard: invert a condition
Peter Hutterer [Fri, 20 Mar 2015 04:00:31 +0000 (14:00 +1000)] 
udev: builtin-keyboard: invert a condition

No functional changes, just to make the next patch easier to review

9 years agoudev: builtin-keyboard: move actual key mapping to a helper function
Peter Hutterer [Fri, 20 Mar 2015 03:17:20 +0000 (13:17 +1000)] 
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.

9 years agoudev: builtin-keyboard: immediately EVIOCSKEYCODE when we have a pair
Peter Hutterer [Fri, 20 Mar 2015 02:52:46 +0000 (12:52 +1000)] 
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.

9 years agoudev: builtin-keyboard: move fetching the device node up
Peter Hutterer [Fri, 20 Mar 2015 02:48:24 +0000 (12:48 +1000)] 
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.

9 years agoshared: move replace_env* from util to env-util
Ronny Chevalier [Fri, 10 Apr 2015 22:25:43 +0000 (00:25 +0200)] 
shared: move replace_env* from util to env-util

9 years agoshared: add terminal-util.[ch]
Ronny Chevalier [Fri, 10 Apr 2015 21:15:59 +0000 (23:15 +0200)] 
shared: add terminal-util.[ch]

9 years agoshared: add random-util.[ch]
Ronny Chevalier [Fri, 10 Apr 2015 20:27:10 +0000 (22:27 +0200)] 
shared: add random-util.[ch]

9 years agoshared: add process-util.[ch]
Ronny Chevalier [Fri, 10 Apr 2015 17:10:00 +0000 (19:10 +0200)] 
shared: add process-util.[ch]

9 years agoshared: add formats-util.h
Ronny Chevalier [Fri, 10 Apr 2015 18:43:52 +0000 (20:43 +0200)] 
shared: add formats-util.h

9 years agodbus: typo fix in log
Thomas Hindoe Paaboel Andersen [Fri, 10 Apr 2015 21:39:13 +0000 (23:39 +0200)] 
dbus: typo fix in log

9 years agotmpfiles: fix build with clang
Thomas Hindoe Paaboel Andersen [Fri, 10 Apr 2015 21:26:21 +0000 (23:26 +0200)] 
tmpfiles: fix build with clang

Clang is not happy about using the cleanup attribute in switches

9 years agoefivars: fix build for non-efi
Thomas Hindoe Paaboel Andersen [Fri, 10 Apr 2015 20:58:40 +0000 (22:58 +0200)] 
efivars: fix build for non-efi

9 years agoshared: boot-timestamps - remove ifdef
Tom Gundersen [Fri, 10 Apr 2015 17:49:36 +0000 (19:49 +0200)] 
shared: boot-timestamps - remove ifdef

No need to ifdef out efi code as the functions are always defined.

9 years agoshared: efivars - fix compile on non-EFI systems
Tom Gundersen [Fri, 10 Apr 2015 17:44:06 +0000 (19:44 +0200)] 
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.

9 years agoshared: efivars - is_efi_*() returns bool instead of int
Tom Gundersen [Fri, 10 Apr 2015 17:43:36 +0000 (19:43 +0200)] 
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.

9 years agoRevert "sd-dhcp-client: fix strict aliasing issue"
Lennart Poettering [Fri, 10 Apr 2015 17:04:43 +0000 (19:04 +0200)] 
Revert "sd-dhcp-client: fix strict aliasing issue"

This reverts commit 6ec8e7c763b7dfa82e25e31f6938122748d1608f.

This doesn't fix any issues, just makes the code harder to read.

9 years agosd-event: simplify sd_event_run()
Lennart Poettering [Fri, 10 Apr 2015 16:45:39 +0000 (18:45 +0200)] 
sd-event: simplify sd_event_run()

9 years agotmpfiles: add specifier expansion for L and C lines, too
Lennart Poettering [Fri, 10 Apr 2015 16:07:04 +0000 (18:07 +0200)] 
tmpfiles: add specifier expansion for L and C lines, too

9 years agoupdate TODO
Lennart Poettering [Fri, 10 Apr 2015 15:35:55 +0000 (17:35 +0200)] 
update TODO

9 years agobus-util: be more verbose if dbus job fails
Michal Sekletar [Fri, 10 Apr 2015 13:56:52 +0000 (15:56 +0200)] 
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

9 years agocore: set_put never returns -EEXIST
Ronny Chevalier [Fri, 10 Apr 2015 14:53:17 +0000 (16:53 +0200)] 
core: set_put never returns -EEXIST

When the value is already there it returns 0.

Also add a test to ensure this

9 years agotmpfiles: enforce ordering when executing lines
Lennart Poettering [Fri, 10 Apr 2015 14:22:22 +0000 (16:22 +0200)] 
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.

9 years agotmpfiles: eat up empty columns
Lennart Poettering [Fri, 10 Apr 2015 14:04:16 +0000 (16:04 +0200)] 
tmpfiles: eat up empty columns

9 years agotmpfiles: substitute % specifiers in arguments for writing files and xattrs
Lennart Poettering [Fri, 10 Apr 2015 14:03:24 +0000 (16:03 +0200)] 
tmpfiles: substitute % specifiers in arguments for writing files and xattrs

9 years agotmpfiles: warn if we get an argument on lines that don't take any
Lennart Poettering [Fri, 10 Apr 2015 12:46:05 +0000 (14:46 +0200)] 
tmpfiles: warn if we get an argument on lines that don't take any

9 years agotmpfiles: mostly revert 71044f609b829d802e0eb81270e13b4f55d76476
Lennart Poettering [Fri, 10 Apr 2015 12:44:52 +0000 (14:44 +0200)] 
tmpfiles: mostly revert 71044f609b829d802e0eb81270e13b4f55d76476

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!)

9 years agodevice-nodes: minor simplifications
Lennart Poettering [Fri, 10 Apr 2015 12:43:37 +0000 (14:43 +0200)] 
device-nodes: minor simplifications

9 years agoutil: unify how we parse mode_t strings
Lennart Poettering [Fri, 10 Apr 2015 12:43:06 +0000 (14:43 +0200)] 
util: unify how we parse mode_t strings

9 years agoutil: remove normalize_env_assignment(), it's unused
Lennart Poettering [Fri, 10 Apr 2015 10:21:44 +0000 (12:21 +0200)] 
util: remove normalize_env_assignment(), it's unused

9 years agoshared: fix memleak
Ronny Chevalier [Fri, 10 Apr 2015 13:44:02 +0000 (15:44 +0200)] 
shared: fix memleak

path was used for 2 purposes but it was not freed before being reused.

9 years agoutil: mark unquote() static, so that new code doesn't use this anymore
Lennart Poettering [Fri, 10 Apr 2015 10:16:54 +0000 (12:16 +0200)] 
util: mark unquote() static, so that new code doesn't use this anymore

9 years agoutil: fix unicode decoding in unquote_first_word()
Lennart Poettering [Fri, 10 Apr 2015 09:56:04 +0000 (11:56 +0200)] 
util: fix unicode decoding in unquote_first_word()

9 years agoutil: when unescaping C escape sequences support C++11 \u and \U unicode literals
Lennart Poettering [Fri, 10 Apr 2015 09:27:47 +0000 (11:27 +0200)] 
util: when unescaping C escape sequences support C++11 \u and \U unicode literals

We simply recode them in utf8.

9 years agoutil: fix a typo in comment
Thomas Hindoe Paaboel Andersen [Thu, 9 Apr 2015 21:57:35 +0000 (23:57 +0200)] 
util: fix a typo in comment