Zbigniew Jędrzejewski-Szmek [Fri, 3 Oct 2014 23:17:56 +0000 (19:17 -0400)]
core/namespace: remove invalid check
dir cannot be NULL here, because it was allocated with alloca.
CID #
1237768.
Zbigniew Jędrzejewski-Szmek [Fri, 3 Oct 2014 23:16:11 +0000 (19:16 -0400)]
core/namespace: remove invalid check
root cannot be NULL here, because it was allocated with alloca.
CID #
1237769.
Zbigniew Jędrzejewski-Szmek [Fri, 3 Oct 2014 22:49:45 +0000 (18:49 -0400)]
sd-event: check the value of received signal
Appease coverity report #
1237775.
Also rename ss to n, to make it visually different from ss.
Zbigniew Jędrzejewski-Szmek [Fri, 3 Oct 2014 21:44:23 +0000 (17:44 -0400)]
man: use more markup in daemon(7)
David Herrmann [Fri, 3 Oct 2014 13:58:44 +0000 (15:58 +0200)]
console: add user console daemon
This adds a first draft of systemd-consoled. This is still missing a lot
of features and does some rather primitive rendering. However, it shows
the direction this code is going and serves as basis for further testing.
The systemd-consoled binary should be run as `systemd --user' unit. It
automatically picks up any session marked as Desktop=SYSTEMD-CONSOLE.
Therefore, you can use any login-manager you want (ranging from /bin/login
to gdm) to create sessions for systemd-consoled. However, the sessions
managers must be prepared to set the Desktop= variable properly.
The user-session is called `systemd-console', only the daemon providing
the terminal environment is called `systemd-consoled' (mind the 'd').
So far, only a single terminal session is provided on each opened
user-session. However, we support multiple user-sessions (even across
multiple seats) just fine. In the future, the workspace logic will get
extended so you can have multiple terminal sessions in a single
user-session for easier access.
Note that this is still experimental! Instructions on how to run it will
follow shortly.
David Herrmann [Fri, 3 Oct 2014 13:54:21 +0000 (15:54 +0200)]
pty: optimize read loop
As it turns out, I can actually send data to the pty faster than the
terminal can read. Therefore, make sure we read as much data as possible
but bail out early enough to not cause starvation.
Kernel TTY buffers are 4k, so reduce the overall buffer size, but read
more than once if possible (up to 8 times sounds reasonable).
David Herrmann [Fri, 3 Oct 2014 13:27:25 +0000 (15:27 +0200)]
terminal/screen: adjust screen age only on update
Instead of increasing the screen-age on redraw, we now increase it only on
real updates. This is effectively the same, but avoids increased age
counters on backbuffer rendering. Therefore, we can now check age counters
against fronbuffers safely, while rendering frames in background.
David Herrmann [Fri, 3 Oct 2014 12:44:41 +0000 (14:44 +0200)]
terminal/screen: add color converter
Terminals use pseudo color-codes mixed with 8bit and 24bit colors. Provide
a color-converter so external renderers only have to deal with ARGB32
colors.
This requires a color-palette as input as there's no fixed mapping. We
provide a default, but maybe we wanna support external palettes in the
future.
David Herrmann [Fri, 3 Oct 2014 12:42:42 +0000 (14:42 +0200)]
terminal/screen: add cursor rendering
This is the most simple way to render cursors: flip attr->inverse of the
cursor cell. This causes the background and foreground colors of the
cursor-cell to be inversed.
Now that we render cursors ourselves, make subterm not call into the
parent terminal to render cursors.
David Herrmann [Fri, 3 Oct 2014 12:30:37 +0000 (14:30 +0200)]
terminal/screen: mark cursor dirty on enabled/disable
If we hide or show the cursor, we change visual attributes and have to
mark the underlying cell as dirty. Otherwise, the terminal will not be
redrawn.
David Herrmann [Fri, 3 Oct 2014 11:11:08 +0000 (13:11 +0200)]
terminal/idev: add helper to match keyboard shortcuts
Matching keyboard shortcuts on internationalized keyboards is actually
non-trivial. Matching the actual key is easy, but the modifiers can be
used by both, the matching and the translation step. Therefore, XKB
exports "consumed-modifiers" that we use to figure out whether a modifier
was already used by the translation step.
The new IDEV_KBDMATCH() helper can be used to match on any keyboard
shortcut and it will do the right thing.
David Herrmann [Fri, 3 Oct 2014 10:50:41 +0000 (12:50 +0200)]
terminal/screen: add keyboard mapping
Implement the feed_keyboard() handling by mapping XKB keys according to
DEC-VT behavior.
Public information on terminal key-mappings is pretty scarce. We only
implement the most basic mapping for now. Further improvements welcome!
David Herrmann [Fri, 3 Oct 2014 10:48:36 +0000 (12:48 +0200)]
terminal/idev: don't map XKB_KEY_NoSymbol as ASCII 0
XKB_KEY_NoSymbol is defined as 0 but does not correspond to a VT key with
ASCII value 0. No such key exists, so don't try to find such a key.
David Herrmann [Thu, 2 Oct 2014 17:47:21 +0000 (19:47 +0200)]
terminal/unifont: add built-in fallback glyph
In case we cannot render a glyph, we want a fallback we can display
instead. If we rely on the font itself to provide the fallback character,
we have nothing to display if that character is not available. Therefore,
add a static fallback that we can use at any time.
David Herrmann [Thu, 2 Oct 2014 17:34:14 +0000 (19:34 +0200)]
terminal/subterm: use screen renderer
Don't hard-code the screen renderer but use the newly introduced
term_screen_draw() helper.
David Herrmann [Thu, 2 Oct 2014 17:31:43 +0000 (19:31 +0200)]
terminal: add screen renderer
We don't want to expose the term_screen internals for rendering.
Therefore, provide an iterator that allows external renderers to draw
terminals.
David Herrmann [Thu, 2 Oct 2014 16:51:29 +0000 (18:51 +0200)]
terminal/drm: clear 'applied' flag when changing state
If a pipe is enabled/disabled, we have to clear crtc->applied of the
linked CRTC. Otherwise, we will not run a deep modeset, but leave the crtc
in the pre-configured state.
David Herrmann [Thu, 2 Oct 2014 16:47:01 +0000 (18:47 +0200)]
terminal/grdev: allow arbitrary fb-age contexts
Instead of limiting fb-aging to 64bit integers, allow any arbitrary
context together with a release function to free it once the FB is
destroyed.
David Herrmann [Thu, 2 Oct 2014 16:26:06 +0000 (18:26 +0200)]
terminal/grdev: provide front and back buffer to renderers
We really want more sophisticated aging than just 64bit integers. So
always provide front *and* back buffers to renderers so they can compare
arbitrary aging information and decide whether to re-render.
David Herrmann [Thu, 2 Oct 2014 15:59:26 +0000 (17:59 +0200)]
terminal/drm: provide pipe->target() callback
Instead of looking for available back-buffers on each operation, set it to
NULL and wait for the next frame request. It will call back into the pipe
to request the back-buffer via ->target(), where we can do the same and
look for an available backbuffer.
This simplifies the code and avoids double lookups if we run short of
buffers.
David Herrmann [Thu, 2 Oct 2014 15:09:05 +0000 (17:09 +0200)]
terminal/grdev: simplify DRM event parsing
Coverity complained about this code and is partially right. We are not
really protected against integer overflows. Sure, unlikely, but lets just
avoid any overflows and properly protect our parser loop.
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.
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.
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.
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.
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.
Tom Gundersen [Fri, 3 Oct 2014 06:43:53 +0000 (08:43 +0200)]
man: fix sd_event_set_name compilation
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.
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.
Zbigniew Jędrzejewski-Szmek [Fri, 3 Oct 2014 01:14:26 +0000 (21:14 -0400)]
man: add sd_event_set_name(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.
Thomas Hindoe Paaboel Andersen [Thu, 2 Oct 2014 19:26:11 +0000 (21:26 +0200)]
firstboot: silence coverity
CID#
1237537
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...
Lennart Poettering [Thu, 2 Oct 2014 18:37:50 +0000 (20:37 +0200)]
systemctl: remove spurious newline
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
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
Lennart Poettering [Thu, 2 Oct 2014 18:36:23 +0000 (20:36 +0200)]
update TODO
Tom Gundersen [Thu, 2 Oct 2014 14:25:08 +0000 (16:25 +0200)]
sd-dhcp6: do basic sanity-checking of supplied 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.
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
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.