chiark / gitweb /
elogind.git
6 years agoterminal: make utf8 decoder return length
David Herrmann [Thu, 2 Oct 2014 14:36:09 +0000 (16:36 +0200)]
terminal: make utf8 decoder return length

Lets return the parsed length in term_utf8_decode() instead of a buffer
pointer. Store the pointer in the passed argument.

This makes it adhere to the systemd coding-style, were we always avoid
returning pointers, but store them in output arguments. In this case, the
storage is not allocated, so it doesn't fit 100% to this idiom, but still
looks much nicer.

6 years agoterminal: fix back-buffer selection on DRM page-flip
David Herrmann [Thu, 2 Oct 2014 11:11:53 +0000 (13:11 +0200)]
terminal: fix back-buffer selection on DRM page-flip

We currently select front-buffers as new back-buffer if they happen to be
the last buffer in our framebuffer-array. Fix this by never selecting a
new front buffer as back buffer.

6 years agofileio-label: return error when writing fails
Zbigniew Jędrzejewski-Szmek [Fri, 3 Oct 2014 12:58:40 +0000 (08:58 -0400)]
fileio-label: return error when writing fails

The status of actually writing the file was totally ignored.

6 years agojournalctl: make --utc work everywhere
Jan Synacek [Fri, 3 Oct 2014 07:51:33 +0000 (09:51 +0200)]
journalctl: make --utc work everywhere

The --utc option was introduced by commit
9fd290443f5f99fca0dcd4216b1de70f7d3b8db1.
Howerver, the implementation was incomplete.

6 years agobootchart: use 'n/a' if PRETTY_NAME is not found
Thomas Hindoe Paaboel Andersen [Fri, 26 Sep 2014 20:01:32 +0000 (22:01 +0200)]
bootchart: use 'n/a' if PRETTY_NAME is not found

Spotted with coverity. If parsing both /etc/os-release and
/usr/lib/os-release fails then null would be passed on. The calls
to parse the two files are allowed to fail. A empty /etc may not
have had the /etc/os-release symlink restored yet and we just
try again in the loop. If for whatever reason that does not happen
then we now pass on 'n/a' instead of null.

6 years agoman: fix sd_event_set_name compilation
Tom Gundersen [Fri, 3 Oct 2014 06:43:53 +0000 (08:43 +0200)]
man: fix sd_event_set_name compilation

6 years agoglib-event-glue: remove some unnecessary lines
Tom Gundersen [Fri, 3 Oct 2014 06:43:34 +0000 (08:43 +0200)]
glib-event-glue: remove some unnecessary lines

Not needed in an example. Should still shorten the license, but should make sure it is still complete so people can copy-paste without problems.

6 years agotest-barrier: add checks after the barrier constructor
Thomas Hindoe Paaboel Andersen [Fri, 3 Oct 2014 01:58:51 +0000 (03:58 +0200)]
test-barrier: add checks after the barrier constructor

Coverity seems to think that we can later end up with the "them"
fd having a negative value. Even after a succesful barrier_create.
Add some test to verify that the constructor went well. If coverity
still complains then it must mean that it thinks the the value is
overwritten later.

6 years agoman: add sd_event_set_name(3)
Zbigniew Jędrzejewski-Szmek [Fri, 3 Oct 2014 01:14:26 +0000 (21:14 -0400)]
man: add sd_event_set_name(3)

6 years agoman: add sd_event_get_fd(3)
Zbigniew Jędrzejewski-Szmek [Fri, 3 Oct 2014 00:49:30 +0000 (20:49 -0400)]
man: add sd_event_get_fd(3)

Example from Tom Gundersen is included using xi:include.
The copyright notice stands out a bit. Maybe it should be removed,
and the code placed in public domain.

6 years agofirstboot: silence coverity
Thomas Hindoe Paaboel Andersen [Thu, 2 Oct 2014 19:26:11 +0000 (21:26 +0200)]
firstboot: silence coverity

CID#1237537

6 years agoRevert "mount: order options before other arguments to mount"
Lennart Poettering [Thu, 2 Oct 2014 19:02:03 +0000 (21:02 +0200)]
Revert "mount: order options before other arguments to mount"

This reverts commit 141a1ceaa62578f1ed14f04cae2113dd0f49fd7f.

People should fix their libc's getopt(), instead of us using a weird
option ordering...

6 years agosystemctl: remove spurious newline
Lennart Poettering [Thu, 2 Oct 2014 18:37:50 +0000 (20:37 +0200)]
systemctl: remove spurious newline

6 years agokdbus: don't clobber return values, use strjoin() instead of asprintf(), keep functio...
Lennart Poettering [Thu, 2 Oct 2014 18:37:36 +0000 (20:37 +0200)]
kdbus: don't clobber return values, use strjoin() instead of asprintf(), keep function invocations and variable declarations separate

6 years agokdbus: make sure we never invoke free() on an uninitialized pointer on OOM
Lennart Poettering [Thu, 2 Oct 2014 18:36:58 +0000 (20:36 +0200)]
kdbus: make sure we never invoke free() on an uninitialized pointer on OOM

6 years agoupdate TODO
Lennart Poettering [Thu, 2 Oct 2014 18:36:23 +0000 (20:36 +0200)]
update TODO

6 years agosd-dhcp6: do basic sanity-checking of supplied DUID
Tom Gundersen [Thu, 2 Oct 2014 14:25:08 +0000 (16:25 +0200)]
sd-dhcp6: do basic sanity-checking of supplied DUID

6 years agosd-dhcp6: specify the type explicitly when setting custom DUID
Tom Gundersen [Thu, 2 Oct 2014 14:04:20 +0000 (16:04 +0200)]
sd-dhcp6: specify the type explicitly when setting custom DUID

This would make it simple to verify that the data is on the right format when
the type is known.

6 years agosd-dhcp6: support custom DUID's up to the size specified in the RFC
Tom Gundersen [Thu, 2 Oct 2014 14:00:55 +0000 (16:00 +0200)]
sd-dhcp6: support custom DUID's up to the size specified in the RFC

6 years agosd-dhcp6-client: support custom DUIDs
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]

6 years agosd-bus: sync kdbus.h (ABI break!)
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.

6 years agovirt: detect that we are running inside the docker container
Michal Sekletar [Tue, 9 Sep 2014 16:14:25 +0000 (18:14 +0200)]
virt: detect that we are running inside the docker container

6 years agoFix order and document user unit dirs
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'.

6 years agoRename user_runtime to user_runtime_dir
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.

6 years agoadd a transient user unit directory
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

6 years agojournalctl: add --utc option
Jan Synacek [Thu, 2 Oct 2014 12:39:29 +0000 (14:39 +0200)]
journalctl: add --utc option

Introduce option to display time in UTC.

6 years agolocalectl: always print warnings with log_warning() instead of printf()
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.

6 years agolocalectl: count locale variables from 0, instead of VARIABLE_LANG
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.

6 years agosd-bus: sync kdbus.h (ABI break)
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.

6 years agoCorrect a few typos
Torstein Husebø [Tue, 30 Sep 2014 13:25:47 +0000 (15:25 +0200)]
Correct a few typos

6 years agobarrier: fix up constructor error handling
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.

6 years agoterminal: add helpers to retrieve page dimensions
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.

6 years agoterminal: add term.h header for library users
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.

6 years agoterminal: move unifont-map to datadir
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.

6 years agoterminal: add unifont_get_width/height()
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.

6 years agoterminal: move unifont-internal.h to unifont.h
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.

6 years agosd-bus: use terms from the D-Bus Specification a bit more
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.

6 years agoPORTING-DBUS1: we use :1.%llu not :0.%llu for D-Bus unique bus names
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

6 years agohwdb: Update database of Bluetooth company identifiers
Marcel Holtmann [Thu, 2 Oct 2014 05:53:15 +0000 (07:53 +0200)]
hwdb: Update database of Bluetooth company identifiers

6 years agocore/swap: only make configured units part of swap.target
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

6 years agoRemove repeated includes
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.

6 years agogitignore: add test-set
Thomas Hindoe Paaboel Andersen [Wed, 1 Oct 2014 21:22:02 +0000 (23:22 +0200)]
gitignore: add test-set

6 years agotests: add tests for {hashmap,set}_steal_first
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.

6 years agoshared: util - use nicer idiom to silence Coverity
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.

6 years agotmpfiles: use allocated buffer for path
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

6 years agocore: limit timestamp to sane precision
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.

6 years agotest-fileio: Remove dead check
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

6 years agotest-date: don't fail test if log_max_level is higher than LOG_INFO
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

6 years agotest-path-util: fix a mem leak and avoid confusing coverity
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

6 years agovconsole: silence coverity
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.

6 years agoshared: util - use nicer idiom to silence Coverity
Tom Gundersen [Tue, 30 Sep 2014 09:37:28 +0000 (11:37 +0200)]
shared: util - use nicer idiom to silence Coverity

Suggested by Zbigniew.

6 years agocore: execute - don't leak strv
Tom Gundersen [Tue, 30 Sep 2014 09:34:01 +0000 (11:34 +0200)]
core: execute - don't leak strv

6 years agoudev/hwdb: New Entry for Dell XPS12 9Q33 keyboard
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

6 years agoutil: silence coverity
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.

6 years agonspawn: log when tearing down of loop device fails
Tom Gundersen [Mon, 29 Sep 2014 11:20:54 +0000 (13:20 +0200)]
nspawn: log when tearing down of loop device fails

6 years agoDo not format USEC_INFINITY as NULL
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.

6 years agocore/dbus: simplify handling of CPUQuotaPerSecUSec
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.

6 years agocore/swap: advertise Discard over dbus
Zbigniew Jędrzejewski-Szmek [Mon, 29 Sep 2014 02:13:07 +0000 (22:13 -0400)]
core/swap: advertise Discard over dbus

6 years agocore/swap: follow the configured unit by default
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.

6 years agofstab-generator: properly deal with discard as non-last option
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.

6 years agoswap: introduce Discard property
Jan Synacek [Wed, 24 Sep 2014 12:29:05 +0000 (14:29 +0200)]
swap: introduce Discard property

Process possible "discard" values from /etc/fstab.

6 years agojournal-remote: fix handling of non-blocking sources
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.

6 years agojournalctl: do not output --reboot-- markers when running non-interactively
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.

6 years agobus: use 2M as maximum message size in benchmark
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.

6 years agoterminal: add helper to retrieve the seat of a session
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.

6 years agobus: sync kdbus.h (ABI break!)
David Herrmann [Mon, 29 Sep 2014 13:35:51 +0000 (15:35 +0200)]
bus: sync kdbus.h (ABI break!)

6 years agoterminal: add sysview_seat_switch_to()
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.

6 years agosd-bus: clean up string length calculation
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.

6 years agobootchart: Do not try to access data for non-existing CPU's
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.

6 years agotest-bus-policy: silence 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

6 years agobootchart: check return of strftime
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

6 years agobootchart: parse userinput with safe_atoi
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

6 years agologind: add support for TPS65217 Power Button
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==""

6 years agocatalog: add Polish translation
Piotr Drąg [Sat, 27 Sep 2014 21:30:15 +0000 (23:30 +0200)]
catalog: add Polish translation

6 years agoshell-completion(zsh): journalctl's -b changes
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

6 years agoshutdownd: clean up initialization of struct
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

6 years agotest-bus-policy: load policy files from TEST_DIR
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.

6 years agosystemd-tmpfiles: Fix IGNORE_DIRECTORY_PATH age handling
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.

6 years agomake utmp/wtmp support configurable
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.

6 years agoRevert "only build and install systemd-bus-proxyd if --enable-kdbus"
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.

6 years agodo not install factory/etc/pam.d if --disable-pam
Gustavo Sverzut Barbieri [Thu, 25 Sep 2014 21:12:03 +0000 (18:12 -0300)]
do not install factory/etc/pam.d if --disable-pam

6 years agobuild-sys: do not distribute make-man-rules.py
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.

6 years agoonly build and install systemd-bus-proxyd if --enable-kdbus
Gustavo Sverzut Barbieri [Thu, 25 Sep 2014 21:13:19 +0000 (18:13 -0300)]
only build and install systemd-bus-proxyd if --enable-kdbus

6 years agoman: use <constant> markup for errno value
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.

6 years agoman: document sd_event_add_{defer,post,exit}
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 21:27:40 +0000 (17:27 -0400)]
man: document sd_event_add_{defer,post,exit}

6 years agoman: add sd_event_add_child(3)
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 21:27:33 +0000 (17:27 -0400)]
man: add sd_event_add_child(3)

6 years agoman: add sd_event_add_signal(3)
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 21:27:27 +0000 (17:27 -0400)]
man: add sd_event_add_signal(3)

6 years agobuild-sys: add sd_session_get_desktop to Makefile-man.am
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.

6 years agoman/sd_event_new: tweaks
Zbigniew Jędrzejewski-Szmek [Thu, 25 Sep 2014 21:27:17 +0000 (17:27 -0400)]
man/sd_event_new: tweaks

6 years agojournal: build fix when LZ4 is enabled but XZ is not
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

6 years agojournal-remote: fix counting of events written
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.

6 years agojournal-remote: initialize writer hashmap before use
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.]

6 years agonspawn: check some more return values
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.

6 years agodelta: warn if diff failed
Tom Gundersen [Thu, 25 Sep 2014 16:16:04 +0000 (18:16 +0200)]
delta: warn if diff failed

Found by Coverity. Fixes CID #1237541.

6 years agoreadahead: wipe out readahead
Daniel Buch [Tue, 26 Aug 2014 19:17:22 +0000 (21:17 +0200)]
readahead: wipe out readahead

6 years agobus-proxy: drop one wrong assert()
Tom Gundersen [Thu, 25 Sep 2014 14:21:36 +0000 (16:21 +0200)]
bus-proxy: drop one wrong assert()

6 years agoshared: path-util - try to make PATH_FORECH_PREFIX look less wrong
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.

6 years agobus-proxyd: add some asserts
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.

6 years agolocalectl: print warning when there are options given on kernel cmdline
Michal Sekletar [Wed, 24 Sep 2014 11:17:43 +0000 (13:17 +0200)]
localectl: print warning when there are options given on kernel cmdline

6 years agofileio: make parse_env_file() return number of parsed items
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.