chiark / gitweb /
elogind.git
7 years agobootchart: Fix errno usage.
Auke Kok [Wed, 17 Apr 2013 16:49:03 +0000 (09:49 -0700)]
bootchart: Fix errno usage.

7 years agoupdate TODO
Lennart Poettering [Wed, 17 Apr 2013 16:48:23 +0000 (18:48 +0200)]
update TODO

7 years agobus: replace aligned_alloc() with memalign() everywhere
Lennart Poettering [Wed, 17 Apr 2013 16:45:45 +0000 (18:45 +0200)]
bus: replace aligned_alloc() with memalign() everywhere

aligned_alloc() is C11 and not available everywhere. Also it would
require us to align the size value. So let's just invoke memalign()
instead, which is universally available and doesn't have any alignment
restrictions on the size parameter.

7 years agocore: Remove unnecessary typedef
Henrik Grindal Bakken [Wed, 17 Apr 2013 16:08:37 +0000 (18:08 +0200)]
core: Remove unnecessary typedef

ExecContext isn't used in this header file, and everything seems to
build just fine without this typedef.  The typedef doesn't really belong
here, and at least my gcc-4.4.6 gives an error on type redefined.

7 years agofixup 8c68a7017 and cast to (unsigned long)
Harald Hoyer [Wed, 17 Apr 2013 16:23:17 +0000 (18:23 +0200)]
fixup 8c68a7017 and cast to (unsigned long)

7 years agofixed statfs.f_type signed vs unsigned comparisons
Harald Hoyer [Wed, 17 Apr 2013 16:03:39 +0000 (18:03 +0200)]
fixed statfs.f_type signed vs unsigned comparisons

statfs.f_type is signed but the filesystem magics are unsigned.
Casting the magics to signed will not make the signed.

Problem seen on big-endian 64bit s390x with __fsword_t 8 bytes.

Casting statfs.f_type to unsigned on the other hand will get us what we
need.

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

7 years agoshell-completion: use -a to see "empty" properties
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 14:52:46 +0000 (10:52 -0400)]
shell-completion: use -a to see "empty" properties

7 years agoupdate TODO
Lennart Poettering [Wed, 17 Apr 2013 14:19:05 +0000 (16:19 +0200)]
update TODO

7 years agoTODO: add s.th. like "systemctl set-log-level debug"
Harald Hoyer [Wed, 17 Apr 2013 13:41:18 +0000 (15:41 +0200)]
TODO: add s.th. like "systemctl set-log-level debug"

7 years agocore/execute: report invalid environment variables from files
Harald Hoyer [Wed, 17 Apr 2013 13:25:02 +0000 (15:25 +0200)]
core/execute: report invalid environment variables from files

Because "export key=val" is not supported by systemd, an error is logged
where the invalid assignment is coming from.

Introduce strv_env_clean_log() to log invalid environment assignments,
where logging is possible and allowed.

parse_env_file_internal() is modified to allow WHITESPACE in keys, to
report the issues later on.

7 years agoRevert "man/systemd.xml: change the signal names to kill systemd"
Harald Hoyer [Wed, 17 Apr 2013 12:58:08 +0000 (14:58 +0200)]
Revert "man/systemd.xml: change the signal names to kill systemd"

This reverts commit 432c30d25fc2a7b4939d5ea6c29708e1323a2b9c.

Suggestion was to fix bash instead. :-/

7 years agosystemctl:enable_sysv_units() more _cleanup_free_
Harald Hoyer [Wed, 17 Apr 2013 10:03:20 +0000 (12:03 +0200)]
systemctl:enable_sysv_units() more _cleanup_free_

7 years agofileio:parse_env_file_internal() fix environment file parsing
Harald Hoyer [Wed, 17 Apr 2013 09:02:56 +0000 (11:02 +0200)]
fileio:parse_env_file_internal() fix environment file parsing

parse_env_file_internal() could not parse the following lines correctly:

export key="val"
key="val"#comment

7 years agocore/execute.c: debug log final execve() with argv[]
Harald Hoyer [Wed, 10 Apr 2013 09:29:03 +0000 (11:29 +0200)]
core/execute.c: debug log final execve() with argv[]

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

7 years agoman/systemd.xml: change the signal names to kill systemd
Harald Hoyer [Wed, 17 Apr 2013 07:38:02 +0000 (09:38 +0200)]
man/systemd.xml: change the signal names to kill systemd

Using the signal name to put systemd in debug mode with bash results in:
 $ kill -s SIGRTMIN+22 1
 bash: kill: SIGRTMIN+22: invalid signal specification

whereas this works:
 $ kill -s SIGRTMAX-8 1

/usr/bin/kill understands both signal names, so just change them to the
bash names.

7 years agosystemctl: clarify usage of "--all" versus list-unit-files
Harald Hoyer [Wed, 10 Apr 2013 10:32:27 +0000 (12:32 +0200)]
systemctl: clarify usage of "--all" versus list-unit-files

Novice users might think, that
 $ systemctl --all
is equal to
 $ systemctl list-unit-files

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

7 years agojournalctl: specify "--unit=" and "--user-unit" multiple times
Harald Hoyer [Fri, 12 Apr 2013 07:14:43 +0000 (09:14 +0200)]
journalctl: specify "--unit=" and "--user-unit" multiple times

Previously only one "--unit=" or "--user-unit" could be specified.
With this patch, journalcrtl can show multiple units.

$ journalctl -u systemd-udevd.service -u sshd.service -u crond.service -b
-- Logs begin at Sa 2013-03-23 11:08:45 CET, end at Fr 2013-04-12
09:10:22 CEST. --
Apr 12 08:41:37 lenovo systemd[1]: Started udev Kernel Device Manager.
Apr 12 08:41:37 lenovo systemd[1]: Stopped udev Kernel Device Manager.
Apr 12 08:41:38 lenovo systemd[1]: Started udev Kernel Device Manager.
Apr 12 08:41:38 lenovo crond[291]: (CRON) INFO (Syslog will be used
instead of sendmail.)
Apr 12 08:41:38 lenovo crond[291]: (CRON) INFO (running with inotify
support)
Apr 12 08:41:39 lenovo systemd[1]: Starting OpenSSH server daemon...
Apr 12 08:41:39 lenovo systemd[1]: Started OpenSSH server daemon.
Apr 12 08:41:39 lenovo sshd[355]: Server listening on 0.0.0.0 port 22.
Apr 12 08:41:39 lenovo sshd[355]: Server listening on :: port 22.
Apr 12 08:41:39 lenovo mtp-probe[373]: checking bus 1, device 8:
"/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.6/1-1.5.6.2/1-1.5.6.2.1"

7 years agojournal: add one more level on top with AND
Harald Hoyer [Thu, 11 Apr 2013 13:27:55 +0000 (15:27 +0200)]
journal: add one more level on top with AND

When using "-p" and "-b" in combination with "-u", the output is not
what you would expect. The reason is the sd_journal_add_disjunction()
call in add_matches_for_unit() and add_matches_for_user_unit(), which
adds two ORs without taking the other conditions to every OR.

Adding another level on top with AND and sd_journal_add_conjunction()
solves the problem.

Output before:

$ journalctl -o short-monotonic -ab -p 0 -u sshd.service

-- Reboot --
[    3.216305] lenovo systemd[1]: Starting OpenSSH server daemon...
-- Reboot --
[    3.168666] lenovo systemd[1]: Starting OpenSSH server daemon...
[    3.169639] lenovo systemd[1]: Started OpenSSH server daemon.
[36285.635389] lenovo systemd[1]: Stopped OpenSSH server daemon.
-- Reboot --
[   10.838657] lenovo systemd[1]: Starting OpenSSH server daemon...
[   10.913698] lenovo systemd[1]: Started OpenSSH server daemon.
[ 6881.035183] lenovo systemd[1]: Stopped OpenSSH server daemon.
-- Reboot --
[    6.636228] lenovo systemd[1]: Starting OpenSSH server daemon...
[    6.662573] lenovo systemd[1]: Started OpenSSH server daemon.
[    6.681148] lenovo sshd[397]: Server listening on 0.0.0.0 port 22.
[    6.681379] lenovo sshd[397]: Server listening on :: port 22.

As we see, the output is from _every_ boot and priority 0 is not taken
into account.

Output after patch:

$ journalctl -o short-monotonic -ab -p 0 -u sshd.service
-- Logs begin at Sun 2013-02-24 20:54:44 CET, end at Tue 2013-03-19 14:58:21 CET. --

Increasing the priority:

$ journalctl -o short-monotonic -ab -p 6 -u sshd.service
-- Logs begin at Sun 2013-02-24 20:54:44 CET, end at Tue 2013-03-19 14:59:12 CET. --
[    6.636228] lenovo systemd[1]: Starting OpenSSH server daemon...
[    6.662573] lenovo systemd[1]: Started OpenSSH server daemon.
[    6.681148] lenovo sshd[397]: Server listening on 0.0.0.0 port 22.
[    6.681379] lenovo sshd[397]: Server listening on :: port 22.

7 years agocore/device.c: fix possible segfault
Harald Hoyer [Fri, 12 Apr 2013 09:56:27 +0000 (11:56 +0200)]
core/device.c: fix possible segfault

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

better fail than segfault

systemd[1]: Failed to load device unit: Invalid argument
systemd[1]: Failed to process udev device event: Invalid argument

7 years agoTODO: remove fixed systemctl property bug
Harald Hoyer [Wed, 17 Apr 2013 06:48:07 +0000 (08:48 +0200)]
TODO: remove fixed systemctl property bug

7 years agotimedated: fixed NTP enabled: n/a
Harald Hoyer [Wed, 17 Apr 2013 06:28:41 +0000 (08:28 +0200)]
timedated: fixed NTP enabled: n/a

7 years agoconfigure: use AC_CHECK_TOOL for objcopy, strings and gperf
Martin Jansa [Tue, 16 Apr 2013 12:26:30 +0000 (14:26 +0200)]
configure: use AC_CHECK_TOOL for objcopy, strings and gperf

* using AC_PATH_TOOL does not allow to override it from shell environment
  which is useful when cross-compiling
* with external toolchain I have different HOST_PREFIX and HOST_SYS
  AC_PATH_TOOL is using HOST_SYS as prefix and fails to find objcopy
  which is available only as ${TARGET_PREFIX}-objcopy then it tries
  objcopy without prefix which is found on host, but that objcopy
  does not work for !host (e.g. arm when building on x86) libs

7 years agofileio: also escape $ and ` when writing out env vars
Mantas Mikulėnas [Sun, 14 Apr 2013 11:54:09 +0000 (14:54 +0300)]
fileio: also escape $ and ` when writing out env vars

These are also considered special by sh and bash.

7 years agobuild-sys: make sure kdbus.h is part of tarball
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 03:38:28 +0000 (23:38 -0400)]
build-sys: make sure kdbus.h is part of tarball

Also fix 'update-man-list' rule and add rules for new man pages.

7 years agojournalctl: show fields requested with --field in full
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 03:07:45 +0000 (23:07 -0400)]
journalctl: show fields requested with --field in full

I see little point in silently truncating fields when
they are explictly requested. With this change e.g.
  journalctl -b MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518 --field=BOOTCHART
works as expected.

7 years agosystemd: ignore hw timestamps in containers
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 00:29:59 +0000 (20:29 -0400)]
systemd: ignore hw timestamps in containers

They are irrelevant and misleading.

E.g. systemd-analyze:

  Startup finished in 6d 4h 15min 32.330s (kernel) + 49ms 914us (userspace) = 6d 4h 15min 32.380s

becomes

Startup finished in 53.735ms (userspace) = 53.735ms

which looks much better :)

7 years agobash-completion: --property support
Zbigniew Jędrzejewski-Szmek [Wed, 17 Apr 2013 00:38:41 +0000 (20:38 -0400)]
bash-completion: --property support

Just bash.

7 years agoman: fix syntax in nsenter example
Zbigniew Jędrzejewski-Szmek [Tue, 16 Apr 2013 03:54:56 +0000 (23:54 -0400)]
man: fix syntax in nsenter example

Apparently nsenter doesn't handle options concatenated together.
I'm pretty sure it worked at one point, but it seems like magic,
since each of those options can take arguments.

7 years agosd-messages.h: add new bootchart message id
Zbigniew Jędrzejewski-Szmek [Tue, 16 Apr 2013 02:42:27 +0000 (22:42 -0400)]
sd-messages.h: add new bootchart message id

7 years agocore/main: use _cleanup_
Zbigniew Jędrzejewski-Szmek [Tue, 16 Apr 2013 01:58:22 +0000 (21:58 -0400)]
core/main: use _cleanup_

7 years agoReport about syntax errors with metadata
Zbigniew Jędrzejewski-Szmek [Tue, 16 Apr 2013 02:25:58 +0000 (22:25 -0400)]
Report about syntax errors with metadata

The information about the unit for which files are being parsed
is passed all the way down. This way messages land in the journal
with proper UNIT=... or USER_UNIT=... attribution.

'systemctl status' and 'journalctl -u' not displaying those messages
has been a source of confusion for users, since the journal entry for
a misspelt setting was often logged quite a bit earlier than the
failure to start a unit.

Based-on-a-patch-by: Oleksii Shevchuk <alxchk@gmail.com>
7 years agocore: log a few more things under UNIT=...
Zbigniew Jędrzejewski-Szmek [Mon, 15 Apr 2013 05:40:44 +0000 (01:40 -0400)]
core: log a few more things under UNIT=...

7 years agocore/main: generate 4 parsing functions from a macro
Zbigniew Jędrzejewski-Szmek [Tue, 16 Apr 2013 01:33:43 +0000 (21:33 -0400)]
core/main: generate 4 parsing functions from a macro

7 years agoconf-parser: generate 7 parsing functions from a macro
Zbigniew Jędrzejewski-Szmek [Mon, 15 Apr 2013 02:29:43 +0000 (22:29 -0400)]
conf-parser: generate 7 parsing functions from a macro

Those functions were identical, apart from typos. Log message
is modified to contain the type of destination var (int, double,
...). I think this might make it easier to understand why a value
was rejected (e.g. a minus from an unsigned type).

7 years agopython-systemd: Reader return special fields and _Reader changes
Steven Hiscocks [Sun, 14 Apr 2013 19:55:08 +0000 (20:55 +0100)]
python-systemd: Reader return special fields and _Reader changes

Changes to _Reader make it match closer to C API, by removing `get_next`
and `get_previous`. A `get_all` method added, which returns dictionary
of fields using C API SD_JOURNAL_FOREACH_DATA macro, which can be used
in conjunction with `next`.

_Reader `get`, `next`, `get_{realtime,monotonic,cursor}` and new
`previous` methods are made private. This is so the traversal and
getting of journal fields can be made transparent in the python
interface.

Reader now solely implements `get_next` and `get_previous`, returning a
standard dictionary (future: other mapping types?) with all standard and
special fields through the converters. This makes the output the same as
journalctl json/export format output.

Iterator methods also moved to Reader, as they do not function as intend
with changes to _Reader.

These changes also mean that more optimised journal interfaces can be
made more easily from _Reader, by avoiding getting of unrequired fields
by using the `_get` method, and avoiding field conversions.

7 years agosystemd-python: export new sd_journal_{process,get_events,get_timeout}
Zbigniew Jędrzejewski-Szmek [Sun, 14 Apr 2013 22:37:03 +0000 (18:37 -0400)]
systemd-python: export new sd_journal_{process,get_events,get_timeout}

get_timeout_ms is added as a convenience function, since
it is abysmally hard to call clock_gettime() in Python
versions lower than 3.3. And even for Python 3.3 users
it saves a few lines.

7 years agojournal: fix off-by-one error in native message iovec counting
Michal Schmidt [Tue, 16 Apr 2013 21:07:14 +0000 (23:07 +0200)]
journal: fix off-by-one error in native message iovec counting

Thanks to Cristian Ciupitu for a reproducer.
https://bugzilla.redhat.com/show_bug.cgi?id=924359

7 years agoutil: make generation of profcs PID paths nicer
Lennart Poettering [Tue, 16 Apr 2013 12:50:05 +0000 (14:50 +0200)]
util: make generation of profcs PID paths nicer

7 years agopath-util: unify code for detecting OS trees
Lennart Poettering [Tue, 16 Apr 2013 03:47:04 +0000 (05:47 +0200)]
path-util: unify code for detecting OS trees

This also makes sure we always detect an OS tree the same way, by
checking for /etc/os-release.

7 years agomacro: rework how we define cleanup macros
Lennart Poettering [Tue, 16 Apr 2013 03:25:57 +0000 (05:25 +0200)]
macro: rework how we define cleanup macros

There's now a generic _cleanup_ macro with an argument. The macros for
specific types are now defined using this macro, and in the header files
where they belong.

All cleanup handlers are now inline functions.

7 years agoutil: replace decimal_str_max() by a typesafe macro DECIMAL_STR_WIDTH()
Lennart Poettering [Tue, 16 Apr 2013 03:04:53 +0000 (05:04 +0200)]
util: replace decimal_str_max() by a typesafe macro DECIMAL_STR_WIDTH()

DECIMAL_STR_WIDTH() now works on any numeric type, and is easier to
distingish from DECIMAL_STR_MAX().

This also replaces another manual implementaiton of ulog10 by this macro.

7 years agobus: parse unit/user unit/session from cgroup path
Lennart Poettering [Tue, 16 Apr 2013 02:54:46 +0000 (04:54 +0200)]
bus: parse unit/user unit/session from cgroup path

7 years agoupdate TODO
Lennart Poettering [Tue, 16 Apr 2013 02:41:11 +0000 (04:41 +0200)]
update TODO

7 years agonspawn: introduce the new /machine/ tree in the cgroup tree and move containers there
Lennart Poettering [Tue, 16 Apr 2013 02:36:06 +0000 (04:36 +0200)]
nspawn: introduce the new /machine/ tree in the cgroup tree and move containers there

Containers will now carry a label (normally derived from the root
directory name, but configurable by the user), and the container's root
cgroup is /machine/<label>. This label is called "machine name", and can
cover both containers and VMs (as soon as libvirt also makes use of
/machine/).

libsystemd-login can be used to query the machine name from a process.

This patch also includes numerous clean-ups for the cgroup code.

7 years agoutil: make sure result of hostname_cleanup() passes hostname_is_valid()
Lennart Poettering [Tue, 16 Apr 2013 01:57:50 +0000 (03:57 +0200)]
util: make sure result of hostname_cleanup() passes hostname_is_valid()

7 years agologind: filter configured cgroup controller lists
Lennart Poettering [Tue, 16 Apr 2013 01:54:53 +0000 (03:54 +0200)]
logind: filter configured cgroup controller lists

7 years agologind: when looking for cgroup prefixes, allocate from stack
Lennart Poettering [Tue, 16 Apr 2013 01:52:59 +0000 (03:52 +0200)]
logind: when looking for cgroup prefixes, allocate from stack

7 years agolibudev: remove udev_monitor_new_from_socket() symbol
Michael Biebl [Tue, 16 Apr 2013 00:14:45 +0000 (02:14 +0200)]
libudev: remove udev_monitor_new_from_socket() symbol

This function was removed in v183, so drop it from the symbols
versioning file.

7 years agobus: copy iteration macro from the kernel
Kay Sievers [Tue, 16 Apr 2013 00:10:55 +0000 (02:10 +0200)]
bus: copy iteration macro from the kernel

7 years agohwdb: update
Kay Sievers [Mon, 15 Apr 2013 23:45:44 +0000 (01:45 +0200)]
hwdb: update

7 years agobus: catch up with kernel changes
Kay Sievers [Mon, 15 Apr 2013 23:44:36 +0000 (01:44 +0200)]
bus: catch up with kernel changes

7 years agobootchart: put the bootchart into the journal.
Auke Kok [Mon, 15 Apr 2013 23:23:42 +0000 (16:23 -0700)]
bootchart: put the bootchart into the journal.

This bit of code is mostly stolen from coredump.c. We construct
a simple journal message and append the bootchart file in the
journal automatically.

You can extract the latest bootchart from the current boot with
something like:

$ journalctl -b MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518 --field=BOOTCHART

which prints it to stdout.

None of the other logic is touched. The journal entry is created
even if bootchart was run manually, which is probably wrong.

7 years agobus: fix missing macro argument renaming
Kay Sievers [Mon, 15 Apr 2013 21:39:42 +0000 (23:39 +0200)]
bus: fix missing macro argument renaming

<fdo-vcs> systemd kay master * b1454bf src/libsystemd-bus/ bus-kernel.c kdbus.h
<fdo-vcs> systemd bus: catch up with kernel changes
<kmacleod> kay: randomly looked at your commit, it looks like in KDBUS_FOREACH_ITEM
  you missed changing a (d) to an (i) in (uint8_t*) (d) < (uint8_t*) (k) + (k)->size;  ?
<kay> kmacleod: hah, so there *is* a reason for using _foo in macros :)
<kay> kmacleod: thanks!

7 years agobus: catch up with kernel changes
Kay Sievers [Mon, 15 Apr 2013 21:32:38 +0000 (23:32 +0200)]
bus: catch up with kernel changes

7 years agoaudit: since nspawn now sets CAP_AUDIT_CONTROL for containers we cannot user this...
Lennart Poettering [Mon, 15 Apr 2013 19:55:12 +0000 (21:55 +0200)]
audit: since nspawn now sets CAP_AUDIT_CONTROL for containers we cannot user this anymore to skip audit session ID retrieval

As audit is still broken in containers we need a reliable way how we can
determine whether the audit data we read from 7proc is actually useful.
Previously we used CAP_AUDIT_CONTROL for this, since nspawn removed that
from the nspawn container. This has changed a while back however, which
means we used audit data of host system in the container.

This adds an explicit container check to the audit calls, so that all
audit data is turned off in containers.

This should fix session creation with pam_systemd/logind in nspawn containers.

7 years agocore: let's make our log messages proper sentences with full stops
Lennart Poettering [Mon, 15 Apr 2013 19:55:07 +0000 (21:55 +0200)]
core: let's make our log messages proper sentences with full stops

7 years agocore: always create /user and /machine top-level cgroup dirs
Lennart Poettering [Mon, 15 Apr 2013 19:52:56 +0000 (21:52 +0200)]
core: always create /user and /machine top-level cgroup dirs

This allows clients to put inotify watches on these trees to watch for
state changes, without having to wait until these dirs are created.

This introduces the new top-level /machine cgroup dir as canonical
location where OS containers and VMs shall be located (as discussed with
the libvirt folks).

7 years agoupdate TODO
Lennart Poettering [Mon, 15 Apr 2013 19:52:21 +0000 (21:52 +0200)]
update TODO

7 years agodo not change console to non-unicode for LANG=C
Harald Hoyer [Mon, 15 Apr 2013 16:34:53 +0000 (18:34 +0200)]
do not change console to non-unicode for LANG=C

If systemd-vconsole-setup was started with LANG=C (no locale.conf), then
it would set the console to non-unicode, which is not what we want.

7 years agoFix spelling errors using 'codespell' tool
Anatol Pomozov [Mon, 15 Apr 2013 02:37:54 +0000 (19:37 -0700)]
Fix spelling errors using 'codespell' tool

7 years agosd-login: add a sd_pid_get_user_unit() call
Lennart Poettering [Mon, 15 Apr 2013 12:16:45 +0000 (14:16 +0200)]
sd-login: add a sd_pid_get_user_unit() call

7 years agobus: handle env vars safely
Lennart Poettering [Mon, 15 Apr 2013 12:05:00 +0000 (14:05 +0200)]
bus: handle env vars safely

Make sure that our library is safe for usage in SUID programs when it
comes to env var handling

7 years agokdbus: parse cgroup meta data, too
Lennart Poettering [Sun, 14 Apr 2013 23:50:46 +0000 (01:50 +0200)]
kdbus: parse cgroup meta data, too

7 years agolocalectl: read X11 keymaps from the correct file
Lennart Poettering [Sun, 14 Apr 2013 23:30:18 +0000 (01:30 +0200)]
localectl: read X11 keymaps from the correct file

As reported by Sergey Udaltsov.

7 years agoudev/ata_id: zero out variable properly
Zbigniew Jędrzejewski-Szmek [Sun, 14 Apr 2013 22:48:45 +0000 (18:48 -0400)]
udev/ata_id: zero out variable properly

b8a2b0f76 'use initalization instead of explicit zeroing'
introduced a bug where only the first sizeof(uint_t*) bytes
would be zeroed out, instead of the whole array.

7 years agobus: remove two unused variables
Zbigniew Jędrzejewski-Szmek [Sun, 14 Apr 2013 22:42:44 +0000 (18:42 -0400)]
bus: remove two unused variables

7 years agosystemd-python: fix formatting in docstring
Zbigniew Jędrzejewski-Szmek [Sun, 14 Apr 2013 22:37:38 +0000 (18:37 -0400)]
systemd-python: fix formatting in docstring

7 years agoTODO: bootchart items.
Auke Kok [Sun, 14 Apr 2013 21:11:47 +0000 (14:11 -0700)]
TODO: bootchart items.

7 years agoreadahead: document options and commands.
Auke Kok [Sun, 14 Apr 2013 19:54:54 +0000 (12:54 -0700)]
readahead: document options and commands.

7 years agoreadahead-analyze: avoid division-by-0
Zbigniew Jędrzejewski-Szmek [Sun, 14 Apr 2013 18:29:17 +0000 (14:29 -0400)]
readahead-analyze: avoid division-by-0

Also remove a few casts and use _cleanup_fclose_ to simplify logic.

7 years agoMurmurHash3: actually inline functions
Zbigniew Jędrzejewski-Szmek [Sun, 14 Apr 2013 17:11:06 +0000 (13:11 -0400)]
MurmurHash3: actually inline functions

"__attribute__((always_inline))" does not replace "inline" and they
still need to be used together. This fixes "always_inline function
might not be inlinable [-Wattributes]" warning in gcc 4.7

Idea-from-patch-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
7 years agokdbus: generare bloom filters properly for messages we send
Lennart Poettering [Sun, 14 Apr 2013 15:49:18 +0000 (17:49 +0200)]
kdbus: generare bloom filters properly for messages we send

7 years agokdbus: update kdbus.h from upstream
Lennart Poettering [Sun, 14 Apr 2013 15:47:12 +0000 (17:47 +0200)]
kdbus: update kdbus.h from upstream

7 years agobus: always explicitly rewind read index before passing message to caller or callback
Lennart Poettering [Sun, 14 Apr 2013 15:46:41 +0000 (17:46 +0200)]
bus: always explicitly rewind read index before passing message to caller or callback

7 years agobus: fix counting of argN= matches
Lennart Poettering [Sun, 14 Apr 2013 15:45:26 +0000 (17:45 +0200)]
bus: fix counting of argN= matches

7 years agoutil: introduce alloca0() and use it at a number of places
Lennart Poettering [Sun, 14 Apr 2013 15:43:59 +0000 (17:43 +0200)]
util: introduce alloca0() and use it at a number of places

7 years agobus: zero data structure and catch up with error value change
Kay Sievers [Sun, 14 Apr 2013 14:28:34 +0000 (16:28 +0200)]
bus: zero data structure and catch up with error value change

7 years agokdbus: also parse cmdline message attribute
Lennart Poettering [Sun, 14 Apr 2013 01:20:12 +0000 (03:20 +0200)]
kdbus: also parse cmdline message attribute

7 years agokdbus: make name acquirement ioctls valgrind clean
Lennart Poettering [Sun, 14 Apr 2013 01:19:51 +0000 (03:19 +0200)]
kdbus: make name acquirement ioctls valgrind clean

7 years agoInclude <fcntl.h> instead of <sys/fcntl.h>
Zbigniew Jędrzejewski-Szmek [Sun, 14 Apr 2013 01:02:03 +0000 (21:02 -0400)]
Include <fcntl.h> instead of <sys/fcntl.h>

<fcntl.h> is POSIX. On Linux, <sys/fcntl.h> simply includes
<fcntl.h>, so there should be on difference. On Android
likewise, except that there is some more stuff. QNX has
only <fcntl.h>.

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

7 years agofileio: in envfiles, do not skip lines following empty lines
Zbigniew Jędrzejewski-Szmek [Sun, 14 Apr 2013 00:22:53 +0000 (20:22 -0400)]
fileio: in envfiles, do not skip lines following empty lines

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

7 years agoRemove a few NULLs
Zbigniew Jędrzejewski-Szmek [Fri, 12 Apr 2013 23:19:48 +0000 (19:19 -0400)]
Remove a few NULLs

Just {} is used in a lot of places now, and there's nothing
special abose those few.

7 years agokdbus: parse even more kernel meta data fields
Lennart Poettering [Sat, 13 Apr 2013 19:53:11 +0000 (21:53 +0200)]
kdbus: parse even more kernel meta data fields

7 years agokdbus: update to newest kdbus API
Lennart Poettering [Sat, 13 Apr 2013 18:12:27 +0000 (20:12 +0200)]
kdbus: update to newest kdbus API

7 years agojournal: fix broken tags _SOURCE_REALTIME_TIMESTAMP and _MACHINE_ID
Mirco Tischler [Fri, 12 Apr 2013 23:03:49 +0000 (01:03 +0200)]
journal: fix broken tags _SOURCE_REALTIME_TIMESTAMP and _MACHINE_ID

7 years agosystemctl: new verb 'list-sockets'
Zbigniew Jędrzejewski-Szmek [Thu, 11 Apr 2013 22:59:18 +0000 (18:59 -0400)]
systemctl: new verb 'list-sockets'

LISTEN           UNIT                            ACTIVATES
/dev/initctl     systemd-initctl.socket          systemd-initctl.service
/dev/log         systemd-journald.socket         systemd-journald.service
...
[::]:19531       systemd-journal-gatewayd.socket systemd-journal-gatewayd.service
kobject-uevent 1 systemd-udevd-kernel.socket     systemd-udevd.service

17 sockets listed.
Pass --all to see loaded but inactive sockets, too.

7 years agoutil: add wrapper for realloc to avoid specyfing type
Zbigniew Jędrzejewski-Szmek [Thu, 11 Apr 2013 22:58:45 +0000 (18:58 -0400)]
util: add wrapper for realloc to avoid specyfing type

7 years agokdbus: make our little test pass cleanly again
Lennart Poettering [Fri, 12 Apr 2013 20:51:23 +0000 (22:51 +0200)]
kdbus: make our little test pass cleanly again

7 years agokbdus: add null bloom filter to our messages
Lennart Poettering [Fri, 12 Apr 2013 20:48:34 +0000 (22:48 +0200)]
kbdus: add null bloom filter to our messages

This makes things work again with the requirements of the kernel on
bloom filters.

7 years agokdbus: use a valid service name for testing
Lennart Poettering [Fri, 12 Apr 2013 19:45:14 +0000 (21:45 +0200)]
kdbus: use a valid service name for testing

7 years agokdbus: update kdbus.h from upstream
Lennart Poettering [Fri, 12 Apr 2013 19:44:55 +0000 (21:44 +0200)]
kdbus: update kdbus.h from upstream

7 years agokdbus: make sure msg structure is properly initialized
Lennart Poettering [Fri, 12 Apr 2013 19:44:14 +0000 (21:44 +0200)]
kdbus: make sure msg structure is properly initialized

7 years agobus: don't calculate kmsg message too large
Lennart Poettering [Fri, 12 Apr 2013 19:43:50 +0000 (21:43 +0200)]
bus: don't calculate kmsg message too large

7 years agobus: add kdbus test for name registry
Lennart Poettering [Fri, 12 Apr 2013 18:17:15 +0000 (20:17 +0200)]
bus: add kdbus test for name registry

7 years agodbus: fill in kdbus sender+destination from kdbus data
Lennart Poettering [Fri, 12 Apr 2013 18:17:00 +0000 (20:17 +0200)]
dbus: fill in kdbus sender+destination from kdbus data

7 years agobus: rename KDBUS_CMD_FNAME_POLICY_NONE -> KDBUS_CMD_FNAME_POLICY_OPEN
Kay Sievers [Fri, 12 Apr 2013 19:04:02 +0000 (21:04 +0200)]
bus: rename KDBUS_CMD_FNAME_POLICY_NONE -> KDBUS_CMD_FNAME_POLICY_OPEN

7 years agobus: test - re-enable check for returned error
Kay Sievers [Fri, 12 Apr 2013 18:32:19 +0000 (20:32 +0200)]
bus: test - re-enable check for returned error

7 years agobus: align the buffer we pass to the kernel
Kay Sievers [Fri, 12 Apr 2013 18:08:28 +0000 (20:08 +0200)]
bus: align the buffer we pass to the kernel

7 years agobus: create kdbus bus without an active policy
Kay Sievers [Fri, 12 Apr 2013 14:45:37 +0000 (16:45 +0200)]
bus: create kdbus bus without an active policy

7 years agobus: implement basic name registration with kdbus
Lennart Poettering [Fri, 12 Apr 2013 01:08:14 +0000 (03:08 +0200)]
bus: implement basic name registration with kdbus