chiark / gitweb /
elogind.git
9 years agoutil: make use of kcmp() to compare fds, if it is available
Lennart Poettering [Wed, 7 Jan 2015 01:14:14 +0000 (02:14 +0100)]
util: make use of kcmp() to compare fds, if it is available

9 years agoutil: don't fail recursive bind mounting if we cannot read the mount flags from an...
Lennart Poettering [Wed, 7 Jan 2015 00:32:13 +0000 (01:32 +0100)]
util: don't fail recursive bind mounting if we cannot read the mount flags from an obstructed mounted

9 years agocore: implement serialization/deserialization of fd store elements
Lennart Poettering [Wed, 7 Jan 2015 00:18:13 +0000 (01:18 +0100)]
core: implement serialization/deserialization of fd store elements

9 years agotmpfiles: make gcc shut up
Lennart Poettering [Tue, 6 Jan 2015 19:33:46 +0000 (20:33 +0100)]
tmpfiles: make gcc shut up

9 years agojournal: consider file deletion errors a reason for rotation
Lennart Poettering [Tue, 6 Jan 2015 19:27:29 +0000 (20:27 +0100)]
journal: consider file deletion errors a reason for rotation

9 years agojournald: whenever we rotate a file, btrfs defrag it
Lennart Poettering [Tue, 6 Jan 2015 18:51:03 +0000 (19:51 +0100)]
journald: whenever we rotate a file, btrfs defrag it

Our write pattern is quite awful for CoW file systems (btrfs...), as we
keep updating file parts in the beginning of the file. This results in
fragmented journal files. Hence: when rotating files, defragment them,
since at that point we know that no further write accesses will be made.

9 years agoUpdate TODO
Lennart Poettering [Tue, 6 Jan 2015 18:50:52 +0000 (19:50 +0100)]
Update TODO

9 years agotmpfiles: finish with EXIT_FAILURE if anything failed
Zbigniew Jędrzejewski-Szmek [Tue, 6 Jan 2015 14:53:12 +0000 (09:53 -0500)]
tmpfiles: finish with EXIT_FAILURE if anything failed

Return value is successful only if everything succeeded.

9 years agotree-wide: remove unnecessary LOG_PRI
Zbigniew Jędrzejewski-Szmek [Tue, 6 Jan 2015 05:29:40 +0000 (00:29 -0500)]
tree-wide: remove unnecessary LOG_PRI

LOG_DEBUG is already a log level, there is no need to use LOG_PRI which
is for filtering out the facility.

9 years agojournal-upload: enable curl debug output conditionally
Zbigniew Jędrzejewski-Szmek [Tue, 6 Jan 2015 05:26:26 +0000 (00:26 -0500)]
journal-upload: enable curl debug output conditionally

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

9 years agopo: Initial Hungarian translation
Gabor Kelemen [Fri, 2 Jan 2015 22:02:16 +0000 (23:02 +0100)]
po: Initial Hungarian translation

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

9 years agoman: clarify path escaping and reference systemd-escape
Chris Atkinson [Thu, 1 Jan 2015 21:35:34 +0000 (16:35 -0500)]
man: clarify path escaping and reference systemd-escape

This patch adds more detail to the description of how path escaping
operates and provides a pointer to the systemd-escape program. Either
would serve to answer the question raised in the bug report, so
hopefully this will allow it to be closed.

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

9 years agobuild-sys: add two more missing makefile links
Lennart Poettering [Tue, 6 Jan 2015 02:16:07 +0000 (03:16 +0100)]
build-sys: add two more missing makefile links

9 years agomachined: simplification
Lennart Poettering [Mon, 5 Jan 2015 23:31:38 +0000 (00:31 +0100)]
machined: simplification

9 years agojournald: allow restarting journald without losing stream connections
Lennart Poettering [Mon, 5 Jan 2015 23:30:25 +0000 (00:30 +0100)]
journald: allow restarting journald without losing stream connections

Making use of the fd storage capability of the previous commit, allow
restarting journald by serilizing stream state to /run, and pushing open
fds to PID 1.

9 years agocore: add new logic for services to store file descriptors in PID 1
Lennart Poettering [Mon, 5 Jan 2015 23:26:25 +0000 (00:26 +0100)]
core: add new logic for services to store file descriptors in PID 1

With this change it is possible to send file descriptors to PID 1, via
sd_pid_notify_with_fds() which PID 1 will store individually for each
service, and pass via the usual fd passing logic on next invocation.
This is useful for enable daemon reload schemes where daemons serialize
their state to /run, push their fds into PID 1 and terminate, restoring
their state on next start from the data in /run and passed in from PID
1.

The fds are kept by PID 1 as long as no POLLHUP or POLLERR is seen on
them, and the service they belong to are either not dead or failed, or
have a job queued.

9 years agocgroup: memory limits on / are not supported
Zbigniew Jędrzejewski-Szmek [Tue, 6 Jan 2015 00:03:08 +0000 (19:03 -0500)]
cgroup: memory limits on / are not supported

9 years agocgroup: fix error message
Zbigniew Jędrzejewski-Szmek [Tue, 6 Jan 2015 00:03:23 +0000 (19:03 -0500)]
cgroup: fix error message

systemd[1]: Failed to set memory.limit_in_bytes on : Invalid argument

9 years agojournal: call connect() with dropped privileges
Zbigniew Jędrzejewski-Szmek [Thu, 1 Jan 2015 03:40:41 +0000 (04:40 +0100)]
journal: call connect() with dropped privileges

When systemd starts a service, it first opened /run/systemd/journal/stdout
socket, and only later switched to the right user.group (if they are
specified). Later on, journald looked at the credentials, and saw
root.root, because credentials are stored at the time the socket is
opened. As a result, all messages passed over _TRANSPORT=stdout were
logged with _UID=0, _GID=0.

Drop real uid and gid temporarily to fix the issue.

9 years agocore: rework counting of running jobs
Lennart Poettering [Mon, 5 Jan 2015 16:22:10 +0000 (17:22 +0100)]
core: rework counting of running jobs

Let's unify the code that counts the running jobs a bit, in order to
make sure we are less likely to miss one.

This is related to this bug:

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

However, it probably won't fix it fully, and I cannot reproduce the issue.

The change also adds an explicit assert change when the counter is off.

9 years agopo: add Swedish translation
Josef Andersson [Mon, 5 Jan 2015 16:38:54 +0000 (11:38 -0500)]
po: add Swedish translation

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

9 years agopath-lookup, systemctl: export lookup_paths_init_from_scope() from shared/install...
Ivan Shapovalov [Fri, 19 Dec 2014 14:08:07 +0000 (17:08 +0300)]
path-lookup, systemctl: export lookup_paths_init_from_scope() from shared/install.c and use it

9 years agomachine: add reference to machine-dbus.h to Makefile.am
Filipe Brandenburger [Mon, 29 Dec 2014 23:22:33 +0000 (15:22 -0800)]
machine: add reference to machine-dbus.h to Makefile.am

Commit 003dffde2c1b93 ("machined: Move image discovery logic into src/shared,
so that we can make use of it from nspawn") moved some definitions from
machine.h to a new machine-dbus.h, but did not include it in Makefile.am

Tested that `make distcheck` works after this fix.

9 years agotmpfiles: fix 'D' lines
Lennart Poettering [Mon, 5 Jan 2015 15:32:59 +0000 (16:32 +0100)]
tmpfiles: fix 'D' lines

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

9 years agonss-myhostname: always will in canonical hostname field when resolving addresses...
Lennart Poettering [Mon, 5 Jan 2015 15:23:21 +0000 (16:23 +0100)]
nss-myhostname: always will in canonical hostname field when resolving addresses to hostnames

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

9 years agobus-proxyd: don't allow to acquire org.freedesktop.DBus name
Lukasz Skalski [Mon, 5 Jan 2015 13:45:55 +0000 (14:45 +0100)]
bus-proxyd: don't allow to acquire org.freedesktop.DBus name

9 years agocore: fix typo in log message
Michael Biebl [Mon, 5 Jan 2015 13:12:47 +0000 (14:12 +0100)]
core: fix typo in log message

9 years agomachinectl: remove spurious newline
Lennart Poettering [Mon, 5 Jan 2015 12:46:36 +0000 (13:46 +0100)]
machinectl: remove spurious newline

9 years agopo: update Italian translation
Daniele Medri [Mon, 5 Jan 2015 12:46:18 +0000 (13:46 +0100)]
po: update Italian translation

9 years agosd-bus: sync kdbus.h
Daniel Mack [Mon, 5 Jan 2015 12:41:30 +0000 (13:41 +0100)]
sd-bus: sync kdbus.h

Catch up with latest changes in kdbus.ko:

 * Signals can be sent as unicast now, hence they need to be marked as
   such with the KDBUS_MSG_SIGNAL in the message flags.

 * Follow ioctl number change for KDBUS_CMD_FREE

9 years agoutil: Do not clear parent mount flags when setting up namespaces
Topi Miettinen [Sun, 4 Jan 2015 18:51:17 +0000 (20:51 +0200)]
util: Do not clear parent mount flags when setting up namespaces

When setting up a namespace, mount flags like noexec, nosuid and
nodev are cleared, so the mounts always have exec, suid and dev
flags enabled.

Copy source directory mount flags to target mount when remounting
the bind mounts.

9 years agoudevadm,..: make --help output of udev tools more like the output of the various...
Lennart Poettering [Mon, 5 Jan 2015 12:19:55 +0000 (13:19 +0100)]
udevadm,..: make --help output of udev tools more like the output of the various other tools

9 years agofstab-generator: use more appropriate checks for swap and device availability
Lennart Poettering [Mon, 5 Jan 2015 11:35:08 +0000 (12:35 +0100)]
fstab-generator: use more appropriate checks for swap and device availability

We always should use the same checks when deciding whether swap support
and mounting of devices is supported. Hence, let's make
fstab-generator's logic more similar to the usual logic we follow:

a) Look for /proc/swaps and no container support before activating
swaps.

b) Look for /sys being writable befire supporting device mounts.

9 years agolibsystemd-network: fix typo in lldp
Torstein Husebø [Mon, 5 Jan 2015 08:55:11 +0000 (09:55 +0100)]
libsystemd-network: fix typo in lldp

9 years agoutil: Fix signedness error in lines(), match implementations
Colin Walters [Thu, 1 Jan 2015 19:57:08 +0000 (14:57 -0500)]
util: Fix signedness error in lines(), match implementations

Regression introduced by ed757c0cb03eef50e8d9aeb4682401c3e9486f0b

Mirror the implementation of columns(), since the fd_columns()
functions returns a negative integer for errors.

Also fix columns() to return the unsigned variable instead of the
signed intermediary (they're the same, but better to be explicit).

9 years agoupdate TODO
Lennart Poettering [Mon, 5 Jan 2015 01:58:04 +0000 (02:58 +0100)]
update TODO

9 years agojournald: reuse IOVEC_TOTAL_SIZE() macros where possible
Lennart Poettering [Mon, 5 Jan 2015 01:48:50 +0000 (02:48 +0100)]
journald: reuse IOVEC_TOTAL_SIZE() macros where possible

9 years agojournald: when we detect the journal file we are about to write to has been deleted...
Lennart Poettering [Mon, 5 Jan 2015 01:09:01 +0000 (02:09 +0100)]
journald: when we detect the journal file we are about to write to has been deleted, rotate

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

9 years agosystemctl: properly iterate through service array when dispatching to sysv
Lennart Poettering [Mon, 5 Jan 2015 00:56:47 +0000 (01:56 +0100)]
systemctl: properly iterate through service array when dispatching to sysv

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

9 years agojournald: add some additional checks before we divide by values read from journal...
Lennart Poettering [Mon, 5 Jan 2015 00:20:44 +0000 (01:20 +0100)]
journald: add some additional checks before we divide by values read from journal file headers

Since the file headers might be replaced by zeroed pages now due to
sigbus we should make sure we don't end up dividing by zero because we
don't check values read from journal file headers for changes.

9 years agojournalctl: static variables immediately configured via command line arguments should...
Lennart Poettering [Mon, 5 Jan 2015 00:08:51 +0000 (01:08 +0100)]
journalctl: static variables immediately configured via command line arguments should be prefixed with "arg_"

9 years agojournal: install sigbus handler for journal tools too
Lennart Poettering [Sun, 4 Jan 2015 23:52:47 +0000 (00:52 +0100)]
journal: install sigbus handler for journal tools too

This makes them robust regarding truncation. Ideally, we'd export this
as an API, but given how messy SIGBUS handling is, and the uncertain
ownership logic of signal handlers we should not do this (unless libc
one day invents a scheme how to sanely install SIGBUS handlers for
specific memory areas only). However, for now we can still make all our
own tools robust.

Note that external tools will only have read-access to the journal
anyway, where SIGBUS is much more unlikely, given that only writes are
subject to disk full problems.

9 years agosystemctl: fix waiting for jobs when using direct connections to PID 1 for dbus
Lennart Poettering [Sun, 4 Jan 2015 23:38:31 +0000 (00:38 +0100)]
systemctl: fix waiting for jobs when using direct connections to PID 1 for dbus

9 years agojournald: constify all things
Lennart Poettering [Sun, 4 Jan 2015 23:13:26 +0000 (00:13 +0100)]
journald: constify all things

9 years agomachined,bus-proxy: fix connecting to containers
Lennart Poettering [Sun, 4 Jan 2015 21:20:22 +0000 (22:20 +0100)]
machined,bus-proxy: fix connecting to containers

9 years agojournald: prefix exported calls with "server_", unexport unnecessary calls
Lennart Poettering [Sun, 4 Jan 2015 21:09:07 +0000 (22:09 +0100)]
journald: prefix exported calls with "server_", unexport unnecessary calls

9 years agojournald: process SIGBUS for the memory maps we set up
Lennart Poettering [Tue, 30 Dec 2014 19:57:53 +0000 (20:57 +0100)]
journald: process SIGBUS for the memory maps we set up

Even though we use fallocate() it appears that file systems like btrfs
will trigger SIGBUS on certain low-disk-space situation. We should
handle that, hence catch the signal, add it to a list of invalidated
pages, and replace the page with an empty memory area. After each write
check if SIGBUS was triggered, and consider the write invalid if it was.

This should make journald a lot more robust with file systems where
fallocate() is not reliable, for example all CoW file systems
(btrfs...), where changing written data can fail with disk full errors.

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

9 years agoupdate TODO
Lennart Poettering [Tue, 30 Dec 2014 01:19:04 +0000 (02:19 +0100)]
update TODO

9 years agonspawn: mount most of the cgroup tree read-only in nspawn containers except for the...
Lennart Poettering [Tue, 30 Dec 2014 00:57:23 +0000 (01:57 +0100)]
nspawn: mount most of the cgroup tree read-only in nspawn containers except for the container's own subtree in the name=systemd hierarchy

More specifically mount all other hierarchies in their entirety and the
name=systemd above the container's subtree read-only.

9 years agocgroup: downgrade log messages when we cannot write to cgroup trees that are mounted...
Lennart Poettering [Tue, 30 Dec 2014 00:56:42 +0000 (01:56 +0100)]
cgroup: downgrade log messages when we cannot write to cgroup trees that are mounted read-only

9 years agohwdb: fix a typo
Peter Hutterer [Sun, 4 Jan 2015 21:41:03 +0000 (07:41 +1000)]
hwdb: fix a typo

9 years agohwdb: revert Logitech Optical USB Mouse
Peter Hutterer [Sun, 4 Jan 2015 21:26:18 +0000 (07:26 +1000)]
hwdb: revert Logitech Optical USB Mouse

Reporter says he incorrectly measured the data but the device is not available
anymore to correct it. We'll have to wait for someone else to submit the data.

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

9 years agomachinectl: Check type instead of path before printing the type
Thomas Hindoe Paaboel Andersen [Fri, 2 Jan 2015 19:29:04 +0000 (20:29 +0100)]
machinectl: Check type instead of path before printing the type

Looks like a typo when introduced in fefdc04b38725457a91651218feb7000f6ccc1f4

9 years agopo: update Russian translation
Sergey Ptashnick [Thu, 1 Jan 2015 18:42:47 +0000 (21:42 +0300)]
po: update Russian translation

By analogy with commit 4038d7502f.

9 years agopo: update French translation
Sylvain Plantefève [Thu, 1 Jan 2015 17:02:54 +0000 (18:02 +0100)]
po: update French translation

9 years agomount: do not use -n when running in --user mode
Zbigniew Jędrzejewski-Szmek [Thu, 1 Jan 2015 19:25:18 +0000 (14:25 -0500)]
mount: do not use -n when running in --user mode

-n is only allowed for root. /etc/mtab is nowadays almost always a link to /proc/,
so in practice this does not really matter too much, but should allow .mount units
to work in --user mode.

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

9 years agoType of mount(2) flags is unsigned long
Topi Miettinen [Thu, 1 Jan 2015 17:40:07 +0000 (19:40 +0200)]
Type of mount(2) flags is unsigned long

9 years agoudev: improve help/usage for some more programs
Robert Milasan [Thu, 1 Jan 2015 17:11:22 +0000 (18:11 +0100)]
udev: improve help/usage for some more programs

9 years agonetworkctl: avoid potential use of unitialized variables
Zbigniew Jędrzejewski-Szmek [Thu, 1 Jan 2015 17:00:59 +0000 (12:00 -0500)]
networkctl: avoid potential use of unitialized variables

Those values are based on a file we read from disk, so we should
verify everything we receive, and make sure everything we print
is sensible.

Also, print fractional seconds for TTL.

9 years agonetworkctl: remove unused variable
Zbigniew Jędrzejewski-Szmek [Thu, 1 Jan 2015 16:53:25 +0000 (11:53 -0500)]
networkctl: remove unused variable

9 years agonetwork: fix scanf/printf format
Zbigniew Jędrzejewski-Szmek [Thu, 1 Jan 2015 16:15:50 +0000 (11:15 -0500)]
network: fix scanf/printf format

usec_t is defined as 64 bit wide, but long is 32 bit on many archs.

9 years agomissing: add __NR_renameat2
Zbigniew Jędrzejewski-Szmek [Thu, 1 Jan 2015 15:55:19 +0000 (10:55 -0500)]
missing: add __NR_renameat2

9 years agobuild-sys: Fix install location of systemd.pc
Martin Pitt [Sun, 28 Dec 2014 11:14:25 +0000 (12:14 +0100)]
build-sys: Fix install location of systemd.pc

systemd.pc contains "libdir" which can be architecture specific. Thus it needs
to be installed into libdir/pkgconfig/ instead of datadir/pkgconfig.

As nothing else is using pkgconfigdata any more, remove it entirely.

Note that udev.pc does not contain architecture specific values and thus can be
kept in /usr/share/pkgconfig/.

9 years agoRemove "to allow" from policy messages
Zbigniew Jędrzejewski-Szmek [Thu, 1 Jan 2015 14:44:43 +0000 (09:44 -0500)]
Remove "to allow" from policy messages

It carries no additional information and forces a passive sentence
structure which is longer and harder to parse.

9 years agopo: update Polish translation
Piotr Drąg [Fri, 26 Dec 2014 00:05:29 +0000 (01:05 +0100)]
po: update Polish translation

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

9 years agomachined: fix grammar in org.freedesktop.machine1.policy.in
Piotr Drąg [Thu, 25 Dec 2014 23:55:26 +0000 (00:55 +0100)]
machined: fix grammar in org.freedesktop.machine1.policy.in

[zj: change "in into" to "into".]

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

9 years agobuild-sys: fix build issue with machines.target
Philippe De Swert [Wed, 31 Dec 2014 16:02:12 +0000 (18:02 +0200)]
build-sys: fix build issue with machines.target

When doing "make clean" the unit/machines.target file gets deleted.
This causes a build error later on when trying to rebuild systemd.

V2: The file probably belongs to dist_systemunit_DATA

9 years agoman: Clarify effect when both calendar day and date are listed in timer
Chris Atkinson [Thu, 1 Jan 2015 02:59:16 +0000 (21:59 -0500)]
man: Clarify effect when both calendar day and date are listed in timer

See bug 87859 (https://bugs.freedesktop.org/show_bug.cgi?id=87859). Bug
reporter found the language describing the effect of specifying both a
day and date unclear; hopefully the attached patch will clarify and
allow the bug to be closed.

9 years agolldp: fix sd_lldp_save()
David Herrmann [Wed, 31 Dec 2014 15:28:48 +0000 (16:28 +0100)]
lldp: fix sd_lldp_save()

Fix a bunch of needless memzero() calls, a bunch of use-after-free
regarding _cleanup_free_ and drop unused variables.

Hint: Do NOT use _cleanup_free_ for temporary strappend() helpers that are
freed multiple times. All you safe is the last free() call, which is
really not worth the trouble resetting it to NULL all the time.

9 years agolldp: fix uninitialized cleanup var #2
David Herrmann [Wed, 31 Dec 2014 15:07:17 +0000 (16:07 +0100)]
lldp: fix uninitialized cleanup var #2

Another uninitialized variable marked as _cleanup_. Set it to NULL to
avoid accessing uninitialized memory.

9 years agolldp: fix uninitialized cleanup var
David Herrmann [Wed, 31 Dec 2014 15:04:55 +0000 (16:04 +0100)]
lldp: fix uninitialized cleanup var

Make sure to set _cleanup_ variables to NULL. Otherwise, we free
uninitialized objects.

9 years agoimport: fix mem-leak in CurlGlue
David Herrmann [Wed, 31 Dec 2014 15:01:37 +0000 (16:01 +0100)]
import: fix mem-leak in CurlGlue

Make sure to actually free the underlying object in CurlGlue unref.

9 years agolldp: fix double free
David Herrmann [Wed, 31 Dec 2014 14:58:27 +0000 (15:58 +0100)]
lldp: fix double free

'k' is marked as _cleanup_free_ so reset it to NULL if we free it
explicitly.

9 years agonetworkctl: fix strappend() error checking
David Herrmann [Wed, 31 Dec 2014 14:56:11 +0000 (15:56 +0100)]
networkctl: fix strappend() error checking

Make sure to test the right variable for NULL.

9 years agonetwork: add malloc-assertion in test
David Herrmann [Wed, 31 Dec 2014 14:54:20 +0000 (15:54 +0100)]
network: add malloc-assertion in test

Make sure malloc() really returns non-NULL in lldp test.

9 years agomachinectl: remove dead code
David Herrmann [Wed, 31 Dec 2014 14:52:23 +0000 (15:52 +0100)]
machinectl: remove dead code

'r' is not touched after the previous error-checking 100 lines above. Drop
that code.

9 years agohwdb: mouse DPI data, Logitech USB Laser Mouse M-U0011-O
Christoph Brill [Wed, 31 Dec 2014 13:28:52 +0000 (08:28 -0500)]
hwdb: mouse DPI data, Logitech USB Laser Mouse M-U0011-O

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

9 years agoRevert commit f131770b "tree-wide: spelling fixes"
David Herrmann [Wed, 31 Dec 2014 12:34:21 +0000 (13:34 +0100)]
Revert commit f131770b "tree-wide: spelling fixes"

This partially reverts:

    commit f131770b1465fbf423881f16ba85523a05f846fe
    Author: Veres Lajos <vlajos@gmail.com>
    Date:   Mon Dec 29 09:45:58 2014 +0000

        tree-wide: spelling fixes

The commit in question changed a binary file. I didn't look at the diff in
particular, so I have no idea what exactly was changed. However, the file
is generated and it looked highly suspiciuous. Therefore, I reverted that
part.

Note that this is generated by "make update-unifont" so really no reason
to touch at all.

9 years agotree-wide: spelling fixes
Veres Lajos [Mon, 29 Dec 2014 09:45:58 +0000 (09:45 +0000)]
tree-wide: spelling fixes

https://github.com/vlajos/misspell_fixer

https://github.com/torstehu/systemd/commit/b6fdeb618cf2f3ce1645b3315f15f482710c7ffa
Thanks to Torstein Husebo <torstein@huseboe.net>.

9 years agoaccelerometer: display short options too
Robert Milasan [Tue, 30 Dec 2014 17:58:29 +0000 (18:58 +0100)]
accelerometer: display short options too

9 years agohwdb: mouse DPI data, Logitech M-UAS144
Christoph Brill [Wed, 31 Dec 2014 00:07:28 +0000 (19:07 -0500)]
hwdb: mouse DPI data, Logitech M-UAS144

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

9 years agohwdb: mouse DPI data, Fujitsu Siemens OEM
Christoph Brill [Wed, 31 Dec 2014 00:03:39 +0000 (19:03 -0500)]
hwdb: mouse DPI data, Fujitsu Siemens OEM

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

9 years agohwdb: mouse DPI data, Logitech MK260 aka M-R0011
Christoph Brill [Tue, 30 Dec 2014 23:56:16 +0000 (18:56 -0500)]
hwdb: mouse DPI data, Logitech MK260 aka M-R0011

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

9 years agohwdb: mouse DPI data, Chicony 2.4G Multimedia Wireless Kit
Christoph Brill [Tue, 30 Dec 2014 23:54:24 +0000 (18:54 -0500)]
hwdb: mouse DPI data, Chicony 2.4G Multimedia Wireless Kit

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

9 years agosystemctl: do not repeat hibernate/sleep attempts
Zbigniew Jędrzejewski-Szmek [Tue, 30 Dec 2014 23:38:21 +0000 (18:38 -0500)]
systemctl: do not repeat hibernate/sleep attempts

If some sleep operation was not possible (e.g. because swap is missing),
we would try twice: once through logind, which would result in a clean error:
  Failed to execute operation: Sleep verb not supported
and then second time by starting the appropriate unit directly, which is
more messy. If logind tells us that something is not possible (or already
in progress), report that to the user and quit. If logind is present and working
we should not try to work around it.

Loosely based on https://bugs.freedesktop.org/show_bug.cgi?id=87832.

9 years agobus: replace ENOSYS return codes with EBADR/ENOTSUP
Zbigniew Jędrzejewski-Szmek [Tue, 30 Dec 2014 23:22:53 +0000 (18:22 -0500)]
bus: replace ENOSYS return codes with EBADR/ENOTSUP

ENOSYS is used to signify compiled-out functionality. Using it for
different kinds of error is misleading.

For BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED, logind-action.c uses ENOTSUP
already, so changing it to ENOTSUP makes the dbus and action paths
behave the same.

9 years agoREADME: CONFIG_DEVPTS_MULTIPLE_INSTANCES is necessary
Zbigniew Jędrzejewski-Szmek [Tue, 30 Dec 2014 14:57:01 +0000 (09:57 -0500)]
README: CONFIG_DEVPTS_MULTIPLE_INSTANCES is necessary

https://bugs.debian.org/773932

9 years agoaccelerometer: drop unused -x option
Robert Milasan [Tue, 30 Dec 2014 17:58:05 +0000 (18:58 +0100)]
accelerometer: drop unused -x option

9 years agoman: Fix spelling
Susant Sahani [Tue, 30 Dec 2014 16:41:38 +0000 (22:11 +0530)]
man: Fix spelling

9 years agobus: add sd_bus_emit_object_{added/removed}()
David Herrmann [Tue, 30 Dec 2014 10:37:35 +0000 (11:37 +0100)]
bus: add sd_bus_emit_object_{added/removed}()

This implements two new helpers, discussed on systemd-devel about 1 year
ago:
    sd_bus_emit_object_added()
    sd_bus_emit_object_removed()

Both calls are equivalent to their respective counterpart
sd_bus_emit_interfaces_{added/removed}(), but can figure out the list of
interfaces themselves, instead of requiring the caller to provide them.
Furthermore, both calls properly deal with builtin interfaces provided via
org.freedesktop.DBus.* and alike.

Both calls simply traverse a node and all its parent nodes to figure out a
list of all interfaces registered as vtable or fallback. It then appends
each of them, similar to the interfaces_{added/removed}() helpers.

Note that interfaces_{added/removed}() runs a parent traversal for *each*
passed interface. Therefore, it can simply bail out, once it found a
parent node that implements a given interface.
With object_{added/removed}() we cannot know the registered interfaces in
advance, thus, we cannot run one traversal per node. Instead, we run a
single traversal and remember all interfaces that we added. Therefore, a
child-interface overrides all conflicting parent-interfaces. We keep a
"Set *s" context to track those while climbing up the tree.

9 years agobus: fix capabilities on big-endian
David Herrmann [Tue, 30 Dec 2014 08:09:41 +0000 (09:09 +0100)]
bus: fix capabilities on big-endian

The kernel provides capabilities as a u32 array, sd-bus uses an u8 array.
This works fine on little-endian as both are encoded the same way.
However, this fails on big-endian if we do not perform sufficient
byte-swapping on each u32 entry.

This patch makes sd-bus use u32, too. We avoid changing any kernel
provided data so we can keep pointing into kdbus pool buffers which
contain u32 arrays.

9 years agobus: drop creds->capability_size
David Herrmann [Tue, 30 Dec 2014 07:42:53 +0000 (08:42 +0100)]
bus: drop creds->capability_size

The number of available caps can be read from
/proc/sys/kernel/cap_last_cap during runtime. Our helper cap_last_cap()
does that, so there's no reason to remember the size of any capability
cache. We can just pre-allocate arrays with a suitable size for all
available caps and reject any higher caps.

The kernel capability API uses u32 as base so make sure we do the same.
Note that this is specified by POSIX, so it's unlikely to change.

9 years agomacro: add DIV_ROUND_UP()
David Herrmann [Mon, 29 Dec 2014 16:51:36 +0000 (17:51 +0100)]
macro: add DIV_ROUND_UP()

This macro calculates A / B but rounds up instead of down. We explicitly
do *NOT* use:
        (A + B - 1) / A
as it suffers from an integer overflow, even though the passed values are
properly tested against overflow. Our test-cases show this behavior.

Instead, we use:
        A / B + !!(A % B)

Note that on "Real CPUs" this does *NOT* result in two divisions. Instead,
instructions like idivl@x86 provide both, the quotient and the remainder.
Therefore, both algorithms should perform equally well (I didn't verify
this, though).

9 years agohwdb: Update database of Bluetooth company identifiers
Marcel Holtmann [Mon, 29 Dec 2014 19:47:04 +0000 (20:47 +0100)]
hwdb: Update database of Bluetooth company identifiers

9 years agoupdate TODO
Lennart Poettering [Mon, 29 Dec 2014 19:18:04 +0000 (20:18 +0100)]
update TODO

9 years agoRevert "machined: don't force terminate registered machines"
Lennart Poettering [Mon, 29 Dec 2014 19:00:01 +0000 (20:00 +0100)]
Revert "machined: don't force terminate registered machines"

This reverts commit 206e7a5f7b55ac61188efd895e65ab26e478cbb2.

We actually want to allow shutting down containers that use
RegisterMachine() rather than CreateMachine() to register their own
unit. It should be safe to do so, since the primary usecase for
RegisterMachine() are container managers that run only a single
container within their own unit, such as systemd-nspawn.

9 years agomachined: ignore spurious error
Lennart Poettering [Mon, 29 Dec 2014 18:08:50 +0000 (19:08 +0100)]
machined: ignore spurious error

9 years agonspawn: report back to systemd only very late whether we are OK
Lennart Poettering [Mon, 29 Dec 2014 16:54:04 +0000 (17:54 +0100)]
nspawn: report back to systemd only very late whether we are OK

That way, systemd can actually figure out if everything is OK with
nspawn.

9 years agopreset: enable machines.target by default
Lennart Poettering [Mon, 29 Dec 2014 16:36:57 +0000 (17:36 +0100)]
preset: enable machines.target by default

9 years agoUpdate TODO
Lennart Poettering [Mon, 29 Dec 2014 13:06:25 +0000 (14:06 +0100)]
Update TODO