Dan Williams [Fri, 26 Sep 2014 20:12:36 +0000 (15:12 -0500)]
sd-dhcp6-client: support custom DUIDs
The caller may have an existing DUID that it wants to use, and may
want to use some other DUID generation scheme than systemd's
default DUID-EN.
[tomegun: whitespace - we never use tabs]
Daniel Mack [Thu, 2 Oct 2014 15:12:13 +0000 (17:12 +0200)]
sd-bus: sync kdbus.h (ABI break!)
struct kdbus_cmd_match got a flags field, which systemd currently makes no
use of.
Michal Sekletar [Tue, 9 Sep 2014 16:14:25 +0000 (18:14 +0200)]
virt: detect that we are running inside the docker container
Zbigniew Jędrzejewski-Szmek [Thu, 2 Oct 2014 12:11:21 +0000 (08:11 -0400)]
Fix order and document user unit dirs
Fixup for
718880ba0d 'add a transient user unit directory'.
Zbigniew Jędrzejewski-Szmek [Thu, 2 Oct 2014 12:01:00 +0000 (08:01 -0400)]
Rename user_runtime to user_runtime_dir
This makes this function name similar to user_config_home() and makes
it match the name of the environment variable.
Steven Allen [Sun, 28 Sep 2014 21:54:25 +0000 (14:54 -0700)]
add a transient user unit directory
This patch adds a transient user unit directory under
`$XDG_RUNTIME_DIR/systemd/user/` and stores transient user-instance
units (such as those created by `systemd-run --user`) under there
instead of putting them in $XDG_CONFIG_HOME/systemd/user/.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=67331
Jan Synacek [Thu, 2 Oct 2014 12:39:29 +0000 (14:39 +0200)]
journalctl: add --utc option
Introduce option to display time in UTC.
Lennart Poettering [Thu, 2 Oct 2014 12:35:34 +0000 (14:35 +0200)]
localectl: always print warnings with log_warning() instead of printf()
They really should got to stderr, not stdout.
Lennart Poettering [Thu, 2 Oct 2014 12:34:55 +0000 (14:34 +0200)]
localectl: count locale variables from 0, instead of VARIABLE_LANG
That way the we make our code safe regarding reordering of the variables
in the enum.
Daniel Mack [Thu, 2 Oct 2014 11:02:41 +0000 (13:02 +0200)]
sd-bus: sync kdbus.h (ABI break)
struct kdbus_cmd_conn_info takes a list of items now instead of a string.
Fix the only user in SD of that ioctl.
Torstein Husebø [Tue, 30 Sep 2014 13:25:47 +0000 (15:25 +0200)]
Correct a few typos
David Herrmann [Thu, 2 Oct 2014 06:31:28 +0000 (08:31 +0200)]
barrier: fix up constructor error handling
We cannot rely on "errno" to be non-zero on failure, if we perform
multiple glibc calls. That is, if the first eventfd() call fails, but the
second succeeds, we cleanup the barrier but return 0.
Fix this by always testing the return value immediately. This should also
fix all the coverity warnings.
David Herrmann [Wed, 1 Oct 2014 09:29:09 +0000 (11:29 +0200)]
terminal: add helpers to retrieve page dimensions
Allow term users to retrieve the page dimensions of a terminal screen.
This is needed to properly calculate the grid dimensions when rendering.
David Herrmann [Wed, 1 Oct 2014 09:27:46 +0000 (11:27 +0200)]
terminal: add term.h header for library users
Like all the other parts of libsystemd-terminal, split API of
term-internal.h into term.h so we can use it from systemd-consoled.
David Herrmann [Wed, 1 Oct 2014 09:25:27 +0000 (11:25 +0200)]
terminal: move unifont-map to datadir
Lets avoid putting stuff into /usr/shared/unifont/, but keep it in
/usr/share/systemd/. Upstream lacks interest in this, so don't bother for
now.
David Herrmann [Wed, 1 Oct 2014 09:24:08 +0000 (11:24 +0200)]
terminal: add unifont_get_width/height()
Allow unifont users to retrieve the width and height of unifont glyphs. In
version 1 this is hard-coded as 8/16, but may be changed in the future.
David Herrmann [Wed, 1 Oct 2014 09:23:02 +0000 (11:23 +0200)]
terminal: move unifont-internal.h to unifont.h
All the definitions are for outside users, so drop the -internal suffix.
Internal definitions are in unifont-def.h and unifont.c, no need to share
those.
Simon McVittie [Wed, 1 Oct 2014 15:11:59 +0000 (16:11 +0100)]
sd-bus: use terms from the D-Bus Specification a bit more
D-Bus' type hierarchy as described in the spec is:
\- basic
\- fixed type (u, i, etc.)
\- string-like type (s, o, g)
\- container
Someone seems to have referred to basic types as "simple types" at
some point, but that term isn't defined in the D-Bus Specification,
and seems redundant.
So far I haven't renamed functions that use "trivial" in their names
to mean "fixed type", to avoid confusion about whether a struct of
constant length, like (iu), is a fixed type. The answer is that it is
fixed-length, but is not a "fixed type", so I can see that something
like bus_type_is_fixed() might be ambiguous.
Simon McVittie [Wed, 1 Oct 2014 15:12:00 +0000 (16:12 +0100)]
PORTING-DBUS1: we use :1.%llu not :0.%llu for D-Bus unique bus names
Marcel Holtmann [Thu, 2 Oct 2014 05:53:15 +0000 (07:53 +0200)]
hwdb: Update database of Bluetooth company identifiers
Zbigniew Jędrzejewski-Szmek [Thu, 2 Oct 2014 04:11:36 +0000 (00:11 -0400)]
core/swap: only make configured units part of swap.target
We used to make all .swap units either RequiredBy=swap.target or
WantedBy=swap.target. But swap.target should be the "configured swap
units", either through /etc/fstab or non-generated .swap units. It
is surprising when systemd starts treating a swap device that was
possibly temporarily enabled as a hard dependency for other units.
So do not add dependencies with swap.target for units gleaned from
/proc/swaps.
Similarly, we added dependencies for all aliases of the device name,
which clutters up the dependency graph but does not seem to bring any
value, since the status of those following units is consistent with
the main one anyway.
This should be a fix for [1], and it seems the right thing to do
anyway.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=
1114786
Thomas Hindoe Paaboel Andersen [Wed, 1 Oct 2014 21:15:34 +0000 (23:15 +0200)]
Remove repeated includes
In pty.c there was both an include of our pty.h and the system installed pty.h.
The latter contains only two functions openpty and forkpty. We use neither so
I assume it was a typo and removed it. We still compile and pass all tests.
Thomas Hindoe Paaboel Andersen [Wed, 1 Oct 2014 21:22:02 +0000 (23:22 +0200)]
gitignore: add test-set
Zbigniew Jędrzejewski-Szmek [Wed, 1 Oct 2014 13:32:16 +0000 (09:32 -0400)]
tests: add tests for {hashmap,set}_steal_first
Just to make sure that coverity is wrong.
Zbigniew Jędrzejewski-Szmek [Tue, 30 Sep 2014 11:44:04 +0000 (07:44 -0400)]
shared: util - use nicer idiom to silence Coverity
Change the other spot too.
Zbigniew Jędrzejewski-Szmek [Wed, 1 Oct 2014 12:33:22 +0000 (07:33 -0500)]
tmpfiles: use allocated buffer for path
Paths can in principle be longer then PATH_MAX, so
simply allocate the buffer with malloc().
CID #
1237773
Zbigniew Jędrzejewski-Szmek [Wed, 1 Oct 2014 12:34:05 +0000 (07:34 -0500)]
core: limit timestamp to sane precision
Anything below .1 s is meaningless anyway.
Thomas Hindoe Paaboel Andersen [Tue, 30 Sep 2014 21:37:10 +0000 (23:37 +0200)]
test-fileio: Remove dead check
t cannot be null here
Thomas Hindoe Paaboel Andersen [Tue, 30 Sep 2014 21:30:30 +0000 (23:30 +0200)]
test-date: don't fail test if log_max_level is higher than LOG_INFO
Thomas Hindoe Paaboel Andersen [Tue, 30 Sep 2014 20:18:18 +0000 (22:18 +0200)]
test-path-util: fix a mem leak and avoid confusing coverity
Found with coverity. Fixes CID#
1237754 and #
1237790
Thomas Hindoe Paaboel Andersen [Tue, 30 Sep 2014 19:14:58 +0000 (21:14 +0200)]
vconsole: silence coverity
Let's silence coverity here too. There is not much to do if the
ioctls to copy the fonts and character maps should fail.
Tom Gundersen [Tue, 30 Sep 2014 09:37:28 +0000 (11:37 +0200)]
shared: util - use nicer idiom to silence Coverity
Suggested by Zbigniew.
Tom Gundersen [Tue, 30 Sep 2014 09:34:01 +0000 (11:34 +0200)]
core: execute - don't leak strv
Stefan Brüns [Tue, 30 Sep 2014 02:32:10 +0000 (22:32 -0400)]
udev/hwdb: New Entry for Dell XPS12 9Q33 keyboard
https://bugs.freedesktop.org/show_bug.cgi?id=84437
Tom Gundersen [Mon, 29 Sep 2014 12:30:15 +0000 (14:30 +0200)]
util: silence coverity
Make it clear in the code that ignoring a failed safe_ato?() is intentional.
Tom Gundersen [Mon, 29 Sep 2014 11:20:54 +0000 (13:20 +0200)]
nspawn: log when tearing down of loop device fails
Zbigniew Jędrzejewski-Szmek [Mon, 29 Sep 2014 12:31:14 +0000 (07:31 -0500)]
Do not format USEC_INFINITY as NULL
systemctl would print 'CPUQuotaPerSecUSec=(null)' for no limit. This
does not look right.
Since USEC_INFINITY is one of the valid values, format_timespan()
could return NULL, and we should wrap every use of it in strna() or
similar. But most callers didn't do that, and it seems more robust to
return a string ("infinity") that makes sense most of the time, even
if in some places the result will not be grammatically correct.
Zbigniew Jędrzejewski-Szmek [Mon, 29 Sep 2014 03:42:33 +0000 (23:42 -0400)]
core/dbus: simplify handling of CPUQuotaPerSecUSec
No functional change intended.
Zbigniew Jędrzejewski-Szmek [Mon, 29 Sep 2014 02:13:07 +0000 (22:13 -0400)]
core/swap: advertise Discard over dbus
Zbigniew Jędrzejewski-Szmek [Sun, 28 Sep 2014 14:37:52 +0000 (10:37 -0400)]
core/swap: follow the configured unit by default
Phenomenon: parameters configured in /etc/fstab for swap units are
ignored. E.g. pri= settings have no effect when systemd starts swap
units. What is even more confusing, .swap units for the name used in
/etc/fstab initially show proper values for Priority=, but after
starting them, they are re-initalized from /proc/swaps and show the -1
value from /proc/swaps.
Change swap units to follow the original configured unit. This way
proper settings are used when starting the swap.
Zbigniew Jędrzejewski-Szmek [Sun, 28 Sep 2014 02:02:04 +0000 (22:02 -0400)]
fstab-generator: properly deal with discard as non-last option
Previous code would only return correct results when discard
was the last option.
While at it, avoid incorrect behaviour for (invalid) 'pri' option
not followed by '=...', and also do not return -1 as the error code.
Jan Synacek [Wed, 24 Sep 2014 12:29:05 +0000 (14:29 +0200)]
swap: introduce Discard property
Process possible "discard" values from /etc/fstab.
Zbigniew Jędrzejewski-Szmek [Sun, 28 Sep 2014 00:00:00 +0000 (20:00 -0400)]
journal-remote: fix handling of non-blocking sources
In the conversion to sd-event loop, handling of normal files got
broken. We do not want to perform non-blocking reads on them, but
simply do read() in a loop. Install a statically-enabled "source"
to do that.
Zbigniew Jędrzejewski-Szmek [Fri, 26 Sep 2014 14:49:55 +0000 (10:49 -0400)]
journalctl: do not output --reboot-- markers when running non-interactively
They are not legal in the export format.
David Herrmann [Mon, 29 Sep 2014 13:44:44 +0000 (15:44 +0200)]
bus: use 2M as maximum message size in benchmark
The kdbus limit is 2M and we removed the bus-owner override. Therefore,
use at most 2M as message size.
David Herrmann [Mon, 29 Sep 2014 13:36:20 +0000 (15:36 +0200)]
terminal: add helper to retrieve the seat of a session
Allow sysview users to retrieve the seat that a session is assigned to.
David Herrmann [Mon, 29 Sep 2014 13:35:51 +0000 (15:35 +0200)]
bus: sync kdbus.h (ABI break!)
David Herrmann [Mon, 29 Sep 2014 12:59:01 +0000 (14:59 +0200)]
terminal: add sysview_seat_switch_to()
Add helper to perform session switches on a specific seat whenever we
retrieve a VT-switch keyboard event.
Daniel Mack [Sun, 28 Sep 2014 19:19:22 +0000 (21:19 +0200)]
sd-bus: clean up string length calculation
Move the +1 calculus onto the definition of the variable, just to make
the code a little easier to read. No functional change.
Philippe De Swert [Sun, 28 Sep 2014 15:12:51 +0000 (18:12 +0300)]
bootchart: Do not try to access data for non-existing CPU's
Cpu's are assigned normally, so starting at 0, so the MAX_CPU index will
always be one smaller than the actual number.
Found with Coverity.
Thomas Hindoe Paaboel Andersen [Sun, 28 Sep 2014 16:46:15 +0000 (18:46 +0200)]
test-bus-policy: silence coverity
Check if strjoin worked and also use _cleanup_free_ since we are
here.
Found with Coverity. Fixes CID#
1241962
Thomas Hindoe Paaboel Andersen [Sat, 27 Sep 2014 20:25:07 +0000 (22:25 +0200)]
bootchart: check return of strftime
Found by coverity. Fixes: CID#996314 and #996312
Thomas Hindoe Paaboel Andersen [Fri, 26 Sep 2014 19:41:02 +0000 (21:41 +0200)]
bootchart: parse userinput with safe_atoi
Found by coverity. Fixes: CID#996409
Koen Kooi [Sat, 27 Sep 2014 07:55:44 +0000 (09:55 +0200)]
logind: add support for TPS65217 Power Button
This PMIC is found on TI AM335x based boards like the beaglebone and
beaglebone black.
root@beaglebone-white:~# udevadm info -a /dev/input/event0
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device
'/devices/ocp.3/
44e0b000.i2c/i2c-0/0-0024/input/input0/event0':
KERNEL=="event0"
SUBSYSTEM=="input"
DRIVER==""
looking at parent device
'/devices/ocp.3/
44e0b000.i2c/i2c-0/0-0024/input/input0':
KERNELS=="input0"
SUBSYSTEMS=="input"
DRIVERS==""
ATTRS{name}=="tps65217_pwr_but"
ATTRS{phys}==""
ATTRS{uniq}==""
ATTRS{properties}=="0"
looking at parent device '/devices/ocp.3/
44e0b000.i2c/i2c-0/0-0024':
KERNELS=="0-0024"
SUBSYSTEMS=="i2c"
DRIVERS=="tps65217"
ATTRS{name}=="tps65217"
looking at parent device '/devices/ocp.3/
44e0b000.i2c/i2c-0':
KERNELS=="i2c-0"
SUBSYSTEMS=="i2c"
DRIVERS==""
ATTRS{name}=="OMAP I2C adapter"
looking at parent device '/devices/ocp.3/
44e0b000.i2c':
KERNELS=="
44e0b000.i2c"
SUBSYSTEMS=="platform"
DRIVERS=="omap_i2c"
looking at parent device '/devices/ocp.3':
KERNELS=="ocp.3"
SUBSYSTEMS=="platform"
DRIVERS==""
Piotr Drąg [Sat, 27 Sep 2014 21:30:15 +0000 (23:30 +0200)]
catalog: add Polish translation
Eric Cook [Sat, 27 Sep 2014 12:48:09 +0000 (08:48 -0400)]
shell-completion(zsh): journalctl's -b changes
removed pointless index sort of bootids.
use `compadd -a' to add each array, instead of expanding possibly hundreds of words needlessly.
optional completion of -b
Thomas Hindoe Paaboel Andersen [Fri, 26 Sep 2014 22:25:09 +0000 (00:25 +0200)]
shutdownd: clean up initialization of struct
No functional change. We just don't assign the value twice.
Found by coverity. Fixes: CID#
1237616 and #
1237617
Daniel Mack [Fri, 26 Sep 2014 15:50:24 +0000 (17:50 +0200)]
test-bus-policy: load policy files from TEST_DIR
'make distcheck' calls test-bus-policy outside of the source tree, so it
must consider the TEST_DIR variable to access its files.
Richard Weinberger [Tue, 9 Sep 2014 09:09:37 +0000 (11:09 +0200)]
systemd-tmpfiles: Fix IGNORE_DIRECTORY_PATH age handling
If one has a config like:
d /tmp 1777 root root -
X /tmp/important_mount
All files below /tmp/important_mount will be deleted as the
/tmp/important_mount item will spuriously inherit a max age of 0
from /tmp.
/tmp has a max age of 0 but age_set is (of course) false.
This affects also the PrivateTmp feature of systemd.
All tmp files of such services will be deleted unconditionally
and can cause service failures and data loss.
Fix this by checking ->age_set in the IGNORE_DIRECTORY_PATH logic.
Emil Renner Berthing [Wed, 24 Sep 2014 15:25:00 +0000 (17:25 +0200)]
make utmp/wtmp support configurable
This adds --disable-utmp option to configure. If it is used, all
utmp-related functionality, including querying runlevel support,
is removed.
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 23:02:42 +0000 (19:02 -0400)]
Revert "only build and install systemd-bus-proxyd if --enable-kdbus"
This reverts commit
ef99aec4d25087dec995b3f00b6957dcee6b13e9.
systemd-stdio-bridge is used on non-kdbus systems.
Gustavo Sverzut Barbieri [Thu, 25 Sep 2014 21:12:03 +0000 (18:12 -0300)]
do not install factory/etc/pam.d if --disable-pam
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 21:39:56 +0000 (17:39 -0400)]
build-sys: do not distribute make-man-rules.py
It was added to EXTRA_DIST in
3c3e5f4276a893791110b03984735654372aa33a,
but this script only makes sense for developers.
Gustavo Sverzut Barbieri [Thu, 25 Sep 2014 21:13:19 +0000 (18:13 -0300)]
only build and install systemd-bus-proxyd if --enable-kdbus
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 21:27:46 +0000 (17:27 -0400)]
man: use <constant> markup for errno value
We were inconsistent, but marking them up as constants makes more
sense then as variables.
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 21:27:40 +0000 (17:27 -0400)]
man: document sd_event_add_{defer,post,exit}
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 21:27:33 +0000 (17:27 -0400)]
man: add sd_event_add_child(3)
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 21:27:27 +0000 (17:27 -0400)]
man: add sd_event_add_signal(3)
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 21:27:21 +0000 (17:27 -0400)]
build-sys: add sd_session_get_desktop to Makefile-man.am
Fixup for
c72d5456e2d.
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 21:27:17 +0000 (17:27 -0400)]
man/sd_event_new: tweaks
Gustavo Sverzut Barbieri [Thu, 25 Sep 2014 21:08:02 +0000 (18:08 -0300)]
journal: build fix when LZ4 is enabled but XZ is not
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 21:26:40 +0000 (17:26 -0400)]
journal-remote: fix counting of events written
After recent changes the number was always reported as 0, because
the accounting was done server_destroy(), called after the message was
already printed. But even before this change, the counts were wrong
because seqnum start at 0 only for newly created journal files, so when
appending to existing files, the calculated count was wrong anyway.
Also do some variable renaming for consistency and disable some low-level
debug messages.
Jonathan Liu [Wed, 24 Sep 2014 13:59:06 +0000 (23:59 +1000)]
journal-remote: initialize writer hashmap before use
https://bugs.freedesktop.org/show_bug.cgi?id=83682
[zj: move the initalization even earlier, before any sockets are
looked at.]
Tom Gundersen [Thu, 25 Sep 2014 16:49:56 +0000 (18:49 +0200)]
nspawn: check some more return values
Most of these failures would anyway get caught later on, but now the error messages are a bit more
specific.
Tom Gundersen [Thu, 25 Sep 2014 16:16:04 +0000 (18:16 +0200)]
delta: warn if diff failed
Found by Coverity. Fixes CID #
1237541.
Daniel Buch [Tue, 26 Aug 2014 19:17:22 +0000 (21:17 +0200)]
readahead: wipe out readahead
Tom Gundersen [Thu, 25 Sep 2014 14:21:36 +0000 (16:21 +0200)]
bus-proxy: drop one wrong assert()
Tom Gundersen [Thu, 25 Sep 2014 14:12:41 +0000 (16:12 +0200)]
shared: path-util - try to make PATH_FORECH_PREFIX look less wrong
We replace the idiom "X && !(*foo = 0)" with "X && ((*foo = 0), true)".
This is not a functional change, but should hopefully make it less
likely that people and static analyzers believe there is a typo here
(i.e., to make it clear that the intention was not "X && *foo != 0").
Thanks to David Herrmann for the suggestion.
Tom Gundersen [Thu, 25 Sep 2014 13:49:43 +0000 (15:49 +0200)]
bus-proxyd: add some asserts
Both as documentation, and to make Coverity happy.
Fixes CID #
1241495 and #
1241496.
Michal Sekletar [Wed, 24 Sep 2014 11:17:43 +0000 (13:17 +0200)]
localectl: print warning when there are options given on kernel cmdline
Michal Sekletar [Mon, 22 Sep 2014 07:38:38 +0000 (09:38 +0200)]
fileio: make parse_env_file() return number of parsed items
This commit introduces possibility to call parse_env_file_internal() and hand
over extra argument where we will accumulate how many items were successfully
parsed and pushed by callback. We make use of this in parse_env_file() and
return number of parsed items on success instead of always returning zero.
As a side-effect this commit should fix bug that locale settings in
/etc/locale.conf are not overriden by options passed via kernel command line.
Daniel Mack [Wed, 24 Sep 2014 15:02:08 +0000 (17:02 +0200)]
bus-policy: split API for bus-proxyd
Instead of operating on an sd_bus_message object, expose an API that has 4
functions:
policy_check_own()
policy_check_hello()
policy_check_recv()
policy_check_send()
This also allows dropping extra code to parse message contents - the bus
proxy already has dedicated code paths for that, and we can hook into
those later.
Tests amended accordingly.
Thomas Hindoe Paaboel Andersen [Tue, 23 Sep 2014 19:34:21 +0000 (21:34 +0200)]
bus: remove unused check
strerror_r does not return null here and even if it did we would have
problems already at the preceding strlen call.
Found by coverity. Fixes: CID#
1237770
David Herrmann [Tue, 23 Sep 2014 11:52:50 +0000 (13:52 +0200)]
terminal: provide display dimensions to API users
Allow users to query the display dimensions of a grdev_display. This is
required to properly resize the objects to be rendered.
David Herrmann [Tue, 23 Sep 2014 11:51:42 +0000 (13:51 +0200)]
terminal: verify kernel-returned DRM events are not truncated
Make sure the kernel always returns events properly. This is guaranteed
right now, otherwise, we do something really wrong. But lets be sure and
verify the received values properly. This also silences some coverity
warnings.
David Herrmann [Tue, 23 Sep 2014 11:40:18 +0000 (13:40 +0200)]
terminal: verify grdev tiles are correctly linked
We used to set "pipe->tile = tile" inside of the leaf allocation. We no
longer do that. Verify that "out" is non-NULL, otherwise we'd leak memory.
This is currently always given, but make sure to add an assert(), so
coverity does not complain.
David Herrmann [Tue, 23 Sep 2014 11:38:09 +0000 (13:38 +0200)]
terminal: fix tile-offset calculation
Binary operators with two pointers as arguments always operate on
object-size, not bytes. That is, "int *a, *b", (a - b) calculates the
number of integers between b and a, not the number of bytes.
Fix our cache-offset calculation to not use sizeof() with full-ptr
arithmetic.
David Herrmann [Tue, 23 Sep 2014 11:33:53 +0000 (13:33 +0200)]
Silence some "unchecked return-value" warnings
This adds some log-messages to ioctl() calls where we don't really care
for the return value. It isn't strictly necessary to look for those, but
lets be sure and print warnings. This silences gcc and coverity, and also
makes sure we get reports in case something goes wrong and we didn't
expect it to fail that way.
Daniel Mack [Tue, 23 Sep 2014 15:37:44 +0000 (17:37 +0200)]
sd-bus: sync kdbus.h
Daniel Mack [Tue, 23 Sep 2014 14:13:54 +0000 (16:13 +0200)]
sd-bus: sync kdbus.h (API break)
Just a rename of two struct members to make the header file c++ compatible.
Zbigniew Jędrzejewski-Szmek [Thu, 4 Sep 2014 16:30:46 +0000 (12:30 -0400)]
localed: rename write_data_x11 to x11_write_data
Other functions in this file follow this pattern,
we have vconsole_write_data and locale_write_data.
Zbigniew Jędrzejewski-Szmek [Tue, 23 Sep 2014 13:22:40 +0000 (09:22 -0400)]
Fix warning about unused variable with !SELINUX
src/shared/label.c:255:15: warning: unused variable 'l' [-Wunused-variable]
char *l = NULL;
^
Zbigniew Jędrzejewski-Szmek [Tue, 23 Sep 2014 13:22:33 +0000 (09:22 -0400)]
terminal: fix spelling mistake
Zbigniew Jędrzejewski-Szmek [Tue, 23 Sep 2014 02:14:39 +0000 (22:14 -0400)]
logind: add support for Triton2 Power Button
https://bugs.freedesktop.org/show_bug.cgi?id=84201
Daniel Mack [Mon, 22 Sep 2014 16:20:14 +0000 (18:20 +0200)]
sd-bus: sync kdbus.h (API+ABI break)
The kdbus logic name registry logic was changed to transport the actual
name to acquire, release or report in a kdbus item.
This brings the name API a little more in line with other calls, and allows
for later augmentation.
Follow that change on the systemd side.
Emil Renner Berthing [Fri, 19 Sep 2014 18:26:53 +0000 (20:26 +0200)]
util: avoid non-portable __WORDSIZE
Lets not unnecessarily rely on __WORDSIZE, which is not clearly specified
by any spec. Use explicit size comparisons if we're not interested in the
WORDSIZE, anyway.
(David: adjust commit message to explain why we do this)
David Herrmann [Mon, 22 Sep 2014 16:05:19 +0000 (18:05 +0200)]
terminal: signal object removal during sysview_context_stop()
Now that we no longer propagate callback return values, we can safely call
into user-callbacks during sysview_context_stop(). This way, users can
rely on all objects to be removed via callbacks (except if they failed
during object creation). This avoids duplicating any object hashtables on
the users' side and reduces memory consumption.
David Herrmann [Mon, 22 Sep 2014 15:55:31 +0000 (17:55 +0200)]
terminal: handle callback errors in sysview instead of propagating them
We cannot sanely propagate error codes if we call into user-callbacks
multiple times for multiple objects. There is no way to merge those errors
or somehow propagate them.
However, we can just act similar to sd-event and print a log-message while
discarding the values. This way, we allow error-returns, but can properly
continue working on our objects.
David Herrmann [Mon, 22 Sep 2014 15:37:21 +0000 (17:37 +0200)]
terminal: allow user-context to be retrieved/stored
Add "userdata" storage to a bunch of external objects, namely displays and
sessions. Furthermore, add some property retrieval helpers.
This is required if we want external API users to not duplicate our own
object hashtables, but retrieve context from the objects themselves.
David Herrmann [Mon, 22 Sep 2014 15:34:13 +0000 (17:34 +0200)]
terminal: make evdev logind-matches per session
Instead of adding matches per device, we now add logind matches per
session. This reduces the number of matches considerably and saves
resources.