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
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.
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.
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.
Ronny Chevalier [Fri, 10 Apr 2015 22:25:43 +0000 (00:25 +0200)]
shared: move replace_env* from util to env-util
Ronny Chevalier [Fri, 10 Apr 2015 21:15:59 +0000 (23:15 +0200)]
shared: add terminal-util.[ch]
Ronny Chevalier [Fri, 10 Apr 2015 20:27:10 +0000 (22:27 +0200)]
shared: add random-util.[ch]
Ronny Chevalier [Fri, 10 Apr 2015 17:10:00 +0000 (19:10 +0200)]
shared: add process-util.[ch]
Ronny Chevalier [Fri, 10 Apr 2015 18:43:52 +0000 (20:43 +0200)]
shared: add formats-util.h
Thomas Hindoe Paaboel Andersen [Fri, 10 Apr 2015 21:39:13 +0000 (23:39 +0200)]
dbus: typo fix in log
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
Thomas Hindoe Paaboel Andersen [Fri, 10 Apr 2015 20:58:40 +0000 (22:58 +0200)]
efivars: fix build for non-efi
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.
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.
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.
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.
Lennart Poettering [Fri, 10 Apr 2015 16:45:39 +0000 (18:45 +0200)]
sd-event: simplify sd_event_run()
Lennart Poettering [Fri, 10 Apr 2015 16:07:04 +0000 (18:07 +0200)]
tmpfiles: add specifier expansion for L and C lines, too
Lennart Poettering [Fri, 10 Apr 2015 15:35:55 +0000 (17:35 +0200)]
update TODO
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
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
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.
Lennart Poettering [Fri, 10 Apr 2015 14:04:16 +0000 (16:04 +0200)]
tmpfiles: eat up empty columns
Lennart Poettering [Fri, 10 Apr 2015 14:03:24 +0000 (16:03 +0200)]
tmpfiles: substitute % specifiers in arguments for writing files and xattrs
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
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!)
Lennart Poettering [Fri, 10 Apr 2015 12:43:37 +0000 (14:43 +0200)]
device-nodes: minor simplifications
Lennart Poettering [Fri, 10 Apr 2015 12:43:06 +0000 (14:43 +0200)]
util: unify how we parse mode_t strings
Lennart Poettering [Fri, 10 Apr 2015 10:21:44 +0000 (12:21 +0200)]
util: remove normalize_env_assignment(), it's unused
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.
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
Lennart Poettering [Fri, 10 Apr 2015 09:56:04 +0000 (11:56 +0200)]
util: fix unicode decoding in unquote_first_word()
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.
Thomas Hindoe Paaboel Andersen [Thu, 9 Apr 2015 21:57:35 +0000 (23:57 +0200)]
util: fix a typo in comment
David Herrmann [Thu, 9 Apr 2015 20:19:26 +0000 (22:19 +0200)]
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.
David Herrmann [Wed, 8 Apr 2015 09:20:10 +0000 (11:20 +0200)]
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.
David Herrmann [Tue, 7 Apr 2015 13:20:54 +0000 (15:20 +0200)]
bus: use free_and_strdup()
Save some LOCs by replacing strdup()+error-handling+free+assign with
free_and_strdup().
David Herrmann [Tue, 7 Apr 2015 13:06:01 +0000 (15:06 +0200)]
terminal/idev: fix NULL terminator for bus-property mapping
We require a NULL entry as sentinal in bus_properties_map. Fix this!
Ronny Chevalier [Thu, 9 Apr 2015 09:23:53 +0000 (11:23 +0200)]
test-journal-flush: fix memleak
Ronny Chevalier [Thu, 9 Apr 2015 09:00:35 +0000 (11:00 +0200)]
util: cunescape - fix memleak in error path
Lennart Poettering [Thu, 9 Apr 2015 16:32:21 +0000 (18:32 +0200)]
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.
Lennart Poettering [Thu, 9 Apr 2015 11:12:55 +0000 (13:12 +0200)]
vconsole: some modernizations, indentation fixes
Lennart Poettering [Thu, 9 Apr 2015 11:12:26 +0000 (13:12 +0200)]
tmpfiles: properly return error code from path_set_acl()
Lennart Poettering [Thu, 9 Apr 2015 11:12:06 +0000 (13:12 +0200)]
tmpfiles: add file attribute calls to list of glob needing commands
Lennart Poettering [Thu, 9 Apr 2015 11:11:38 +0000 (13:11 +0200)]
update TODO
Lennart Poettering [Thu, 9 Apr 2015 11:10:11 +0000 (13:10 +0200)]
vconsole: stick to kernel-style function error handling
This undoes part of
8931278c8a9ef7b60f6b6963486a9e9febb20a0d.
We really should stick to kernel-style "int" return values from
functions, and not covnert success into boolean returns.
Blaž Tomažič [Fri, 3 Apr 2015 20:20:55 +0000 (22:20 +0200)]
hwdb: mouse DPI data, Roccat Lua (ROC-11-310)
https://bugs.freedesktop.org/show_bug.cgi?id=89743
Thomas Hindoe Paaboel Andersen [Wed, 8 Apr 2015 22:05:22 +0000 (00:05 +0200)]
networkd: do not assign the variable twice
Lennart Poettering [Wed, 8 Apr 2015 20:39:40 +0000 (22:39 +0200)]
update TODO
Lennart Poettering [Wed, 8 Apr 2015 20:35:52 +0000 (22:35 +0200)]
tmpfiles: rework file attribute code
- Stick to one type for the flags field: unsigned. This appears to be
what the kernel uses, and there's no point in using something else.
- compress the flags array by avoiding sparse entries
- extend some error messages to not use abbreviated words
- avoid TTOCTTOU issues by invoking fstat() after open() when applying
file flags
- add explanation why we need to check the file type with fstat().
- don't needlessly abbreviate "attribute" as "attrib", in particually as
"chattr" abbreviates it as "attr" rather than "attrib".
Lennart Poettering [Wed, 8 Apr 2015 18:47:35 +0000 (20:47 +0200)]
util: merge change_attr_fd() and chattr_fd()
Lennart Poettering [Wed, 8 Apr 2015 18:27:11 +0000 (20:27 +0200)]
fstab-generator: don't continue on OOM
Lennart Poettering [Wed, 8 Apr 2015 18:14:04 +0000 (20:14 +0200)]
timesyncd: print an INFO log message when we successfully reached a time server
Lennart Poettering [Wed, 8 Apr 2015 16:34:08 +0000 (18:34 +0200)]
man: avoid confusion regarding "time synchronization state"
Also, update example in the timedatectl man page to match the actual
timedatectl output.
Jan Janssen [Wed, 8 Apr 2015 14:49:25 +0000 (16:49 +0200)]
systemctl: Use logind for --firmware-setup if possible
Zbigniew Jędrzejewski-Szmek [Wed, 8 Apr 2015 12:50:35 +0000 (08:50 -0400)]
Indentation
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2015 12:28:21 +0000 (08:28 -0400)]
man: remove 'fs' from 'rootfsflags'
rootfsflags does not appear anywhere else.
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2015 02:58:39 +0000 (22:58 -0400)]
core/automount: beef up error message
This should not happen... but when it does more information is nice.
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2015 02:54:35 +0000 (22:54 -0400)]
shell-completion: systemctl switch-root verb
The completion is rudimentary (all files). I think this is OK since
this is used so rarely. But not having it proposed at all is annoying.
Lennart Poettering [Wed, 8 Apr 2015 15:24:23 +0000 (17:24 +0200)]
update TODO
Lennart Poettering [Wed, 8 Apr 2015 15:23:27 +0000 (17:23 +0200)]
resolved: maintain order when writing resolv.conf entries
http://lists.freedesktop.org/archives/systemd-devel/2015-March/029850.html
Lennart Poettering [Wed, 8 Apr 2015 15:22:15 +0000 (17:22 +0200)]
util: add minimal OrderedSet type
OrderedSet implements a Set-like structure, but maintains insertion
ordered. It is hence to Set what OrderedHashmap is for Hashmap.
Internally, this is only a wrapper around OrderedHashmap for now, but
this could one day be improved and be added to hashmap.c natively.
Lennart Poettering [Wed, 8 Apr 2015 11:02:45 +0000 (13:02 +0200)]
TODO: yeah, now it makes sense
Alexander Sverdlin [Wed, 8 Apr 2015 10:59:40 +0000 (12:59 +0200)]
missing.h: Define IFA_F_NOPREFIXROUTE
Fixes second systemd compilation problem against Linux 3.12 uapi
headers.
IFA_F_NOPREFIXROUTE is a usual #define appeared in Linux 3.14, so
AC_CHECK_DECLS is not necessary.
Lennart Poettering [Wed, 8 Apr 2015 10:53:50 +0000 (12:53 +0200)]
sd-rtnl: properly size attribute array if IFA_FLAGS was missing
Sylvain Plantefève [Tue, 7 Apr 2015 22:40:33 +0000 (00:40 +0200)]
po: update French translation
Add strings introduced by
5bdf22430e367799dfa66c724144b624c5479518
Ronny Chevalier [Tue, 7 Apr 2015 23:15:32 +0000 (01:15 +0200)]
remove duplicated includes
Ronny Chevalier [Tue, 7 Apr 2015 23:09:11 +0000 (01:09 +0200)]
timedatectl: trim --help output to 80 chars
Ronny Chevalier [Tue, 7 Apr 2015 18:14:28 +0000 (20:14 +0200)]
zsh-completion: update hostnamectl
Ronny Chevalier [Tue, 7 Apr 2015 17:35:57 +0000 (19:35 +0200)]
zsh-completion: add missing -M completion for journalctl
Ronny Chevalier [Tue, 7 Apr 2015 17:35:13 +0000 (19:35 +0200)]
zsh-completion: update loginctl
Ronny Chevalier [Mon, 16 Mar 2015 19:24:39 +0000 (20:24 +0100)]
test-socket-util: add test for in_addr_to_string
Thomas Hindoe Paaboel Andersen [Sat, 21 Mar 2015 20:08:00 +0000 (21:08 +0100)]
configure: sign-compare is part of extra
Remove sign-compare as we already get it from extra
Thomas Hindoe Paaboel Andersen [Tue, 7 Apr 2015 17:34:40 +0000 (19:34 +0200)]
device: remove unused null check
We dereference the variable right before the null check. We never reach
this point with a null value anyway so let's just remove it.
Lennart Poettering [Tue, 7 Apr 2015 19:08:07 +0000 (21:08 +0200)]
logind: drop "interactive" parameter from SetRebootToFirmwareSetup() bus call
Newer dbus versions have an "allow interactive authentication" bit in
the message header, hence it is not necessary to take a boolean for this
explicitly.
Lennart Poettering [Tue, 7 Apr 2015 19:07:54 +0000 (21:07 +0200)]
update TODO
Lennart Poettering [Tue, 7 Apr 2015 19:07:19 +0000 (21:07 +0200)]
missing.h: define IFA_FLAGS if it is missing
Thomas Hindoe Paaboel Andersen [Tue, 7 Apr 2015 18:28:27 +0000 (20:28 +0200)]
test-util: don't mix declarations and code
Lennart Poettering [Tue, 7 Apr 2015 16:47:47 +0000 (18:47 +0200)]
update TODO
Lennart Poettering [Tue, 7 Apr 2015 16:47:35 +0000 (18:47 +0200)]
socket: minor modernizations
Jan Janssen [Fri, 3 Apr 2015 16:03:06 +0000 (18:03 +0200)]
logind,systemctl: add reboot to EFI firmware support
Lennart Poettering [Tue, 7 Apr 2015 15:25:26 +0000 (17:25 +0200)]
update TODO
Richard Maw [Tue, 7 Apr 2015 14:53:05 +0000 (15:53 +0100)]
man: fix typos in machinectl
The s/now/not/ unfortunately inverted the meaning.
Richard Maw [Tue, 7 Apr 2015 14:53:04 +0000 (15:53 +0100)]
man: Resolve how to refer to derived names for machinectl containers
"the name it is" is clumsy english, and since the most recently referred
to thing was a name anyway we can just leave the "it is".
This matches later uses in the same document.
Lennart Poettering [Tue, 7 Apr 2015 14:45:09 +0000 (16:45 +0200)]
update TODO
Lennart Poettering [Tue, 7 Apr 2015 14:43:37 +0000 (16:43 +0200)]
timedatectl: avoid specifically referring to NTP
systemd-timesyncd not only does NTP, but also manages clock monotonicity
using a flags file. In future, it might learn PTP support. Hence don't
expose its enablement state as "NTP" but use the more generic term
"network time synchronization". After all, for similar reasons
systemd-timesyncd is not called systemd-ntpd.
Lennart Poettering [Tue, 7 Apr 2015 14:29:21 +0000 (16:29 +0200)]
man: update timedatectl(1)'s examples
The output didn't match what we output these days. Also, "set-ntp"
cannot be used to control chronyd anymore.
Lennart Poettering [Tue, 7 Apr 2015 14:23:16 +0000 (16:23 +0200)]
man: document in timedatectl(1) that the NTP state shown reflects whether timesyncd is enabled
Lennart Poettering [Tue, 7 Apr 2015 14:03:45 +0000 (16:03 +0200)]
path-util: fix more path_is_mount
e792e890f fallout
Lennart Poettering [Mon, 6 Apr 2015 18:28:37 +0000 (20:28 +0200)]
update TODO
Lennart Poettering [Mon, 6 Apr 2015 18:34:11 +0000 (20:34 +0200)]
man: document default timeouts and start limit parameters
Lennart Poettering [Mon, 6 Apr 2015 18:25:56 +0000 (20:25 +0200)]
polkit: rename bus_verify_polkit() to bus_test_polkit() and make it strictly non-interactive
Interactive authorization should only happen asynchronously, hence
disallow it in synchronous bus_verify_polkit(), and rename it to
bus_test_polkit(). This way even if the bus message header asks for
interactive authorization, we'll ask for non-interactive authorization
which is actually the desired behaviour if CanSuspend, CanHibernate and
friends, which call this function.
Lennart Poettering [Mon, 6 Apr 2015 18:11:41 +0000 (20:11 +0200)]
util: rework cunescape(), improve error handling
Change cunescape() to return a normal error code, so that we can
distuingish OOM errors from parse errors.
This also adds a flags parameter to control whether "relaxed" or normal
parsing shall be done. If set no parse failures are generated, and the
only reason why cunescape() can fail is OOM.
David Herrmann [Tue, 7 Apr 2015 12:03:44 +0000 (14:03 +0200)]
core: fix mount setup to work with non-existing mount points
We must not fail on ENOENT. We properly create the mount-point in
mount-setup, so there's really no reason to skip the mount. Make sure we
just skip the mount on unexpected failures or if it's already mounted.
David Herrmann [Tue, 7 Apr 2015 11:11:18 +0000 (13:11 +0200)]
device: fix sysattr newline cutter
Right now, we always drop the last character of all values we write to
sysfs. Fix this!
Hans de Goede [Fri, 3 Apr 2015 10:07:32 +0000 (12:07 +0200)]
udev: input_id: tag accelerometers as ID_INPUT_ACCELEROMETER
input_id already (tries to) tag accelerometers as such, but this only works
for absolute accelerometers. Recent kernels mark accelerometers through an
input prop. Trust that prop and always tag devices with it with
ID_INPUT_ACCELEROMETER.
Note that detection by the prop bit works the same as the existing detection
and will ensure that no other tags get set on the device.
Peter Hutterer [Thu, 26 Mar 2015 04:08:35 +0000 (14:08 +1000)]
udev: input_id: tag pointing sticks as ID_INPUT_POINTINGSTICK
Also referred to as trackpoint, trackstick. These are marked by recent kernels
through an input prop. Forward that prop as udev property so userspace can
easily determine whether there is a pointing stick present.
These devices were previously marked as ID_INPUT_MOUSE, for backwards
compatibility we keep that in place, the new property is an addition.
Daniel Mack [Mon, 6 Apr 2015 22:44:15 +0000 (00:44 +0200)]
core: mount-setup: handle non-existing mountpoints gracefully
Commit
e792e890f ("path-util: don't eat up ENOENT in
path_is_mount_point()") changed path_is_mount_point() so it doesn't hide
-ENOENT from its caller. This causes all boots to fail early in case
any of the mount points does not exist (for instance, when kdbus isn't
loaded, /sys/fs/kdbus is missing).
Fix this by returning 0 from mount_one() if path_is_mount_point()
returned -ENOENT.
Zbigniew Jędrzejewski-Szmek [Mon, 6 Apr 2015 19:44:30 +0000 (15:44 -0400)]
build-sys: fix typo
Lennart Poettering [Mon, 6 Apr 2015 13:27:18 +0000 (15:27 +0200)]
update TODO