[systemd-commits] stable Branch 'v208-stable' - 48 commits - hwdb/20-bluetooth-vendor-product.hwdb Makefile.am man/busctl.xml man/crypttab.xml man/daemon.xml man/journalctl.xml man/journald.conf.xml man/localtime.xml man/machinectl.xml man/machine-info.xml man/sd-daemon.xml man/sd_journal_print.xml man/sd_journal_stream_fd.xml man/sysctl.d.xml man/systemctl.xml man/systemd-ask-password.xml man/systemd-cat.xml man/systemd-coredumpctl.xml man/systemd-delta.xml man/systemd.exec.xml man/systemd-journald.service.xml man/systemd.journal-fields.xml man/systemd.service.xml man/systemd.socket.xml man/systemd.special.xml man/systemd-system.conf.xml man/systemd-udevd.service.xml man/systemd.xml man/udevadm.xml man/udev.xml README rules/50-udev-default.rules rules/60-persistent-storage.rules shell-completion/bash src/core src/getty-generator src/journal src/libsystemd-bus src/machine src/modules-load src/nspawn src/shared src/stdio-bridge src/test src/udev units/serial-getty at .service.m4 units/systemd-log ind.service.in

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Tue Mar 4 21:56:51 PST 2014


 Makefile.am                               |   12 +
 README                                    |    3 
 hwdb/20-bluetooth-vendor-product.hwdb     |   42 +++++
 man/busctl.xml                            |    4 
 man/crypttab.xml                          |    4 
 man/daemon.xml                            |   21 +-
 man/journalctl.xml                        |    3 
 man/journald.conf.xml                     |    6 
 man/localtime.xml                         |    2 
 man/machine-info.xml                      |    6 
 man/machinectl.xml                        |   12 +
 man/sd-daemon.xml                         |    2 
 man/sd_journal_print.xml                  |    2 
 man/sd_journal_stream_fd.xml              |    4 
 man/sysctl.d.xml                          |   10 +
 man/systemctl.xml                         |   27 +--
 man/systemd-ask-password.xml              |    2 
 man/systemd-cat.xml                       |   14 -
 man/systemd-coredumpctl.xml               |    8 
 man/systemd-delta.xml                     |   68 ++++----
 man/systemd-journald.service.xml          |   18 +-
 man/systemd-system.conf.xml               |    2 
 man/systemd-udevd.service.xml             |   22 +-
 man/systemd.exec.xml                      |   23 ++
 man/systemd.journal-fields.xml            |    2 
 man/systemd.service.xml                   |  252 +++++++++++++++---------------
 man/systemd.socket.xml                    |   36 ++--
 man/systemd.special.xml                   |    2 
 man/systemd.xml                           |    2 
 man/udev.xml                              |  118 ++++++++------
 man/udevadm.xml                           |    2 
 rules/50-udev-default.rules               |    3 
 rules/60-persistent-storage.rules         |    2 
 shell-completion/bash/bootctl             |   60 +++++++
 shell-completion/bash/machinectl          |   97 +++++++++++
 shell-completion/bash/systemd-cat         |   57 ++++++
 shell-completion/bash/systemd-cgls        |   56 ++++++
 shell-completion/bash/systemd-cgtop       |   40 ++++
 shell-completion/bash/systemd-delta       |   61 +++++++
 shell-completion/bash/systemd-detect-virt |   40 ++++
 shell-completion/bash/systemd-nspawn      |   90 ++++++++++
 src/core/dbus-unit.c                      |    3 
 src/core/execute.c                        |    8 
 src/core/load-fragment.c                  |   11 -
 src/core/mount.c                          |   25 ++
 src/core/selinux-setup.c                  |    7 
 src/core/umount.c                         |    2 
 src/core/unit.c                           |   16 -
 src/getty-generator/getty-generator.c     |   28 +++
 src/journal/journal-file.c                |   26 ++-
 src/journal/journal-vacuum.c              |    2 
 src/journal/journalctl.c                  |    7 
 src/journal/sd-journal.c                  |   38 ++--
 src/journal/systemd-journal-feeder.py     |   83 +++++++++
 src/libsystemd-bus/sd-bus.c               |    4 
 src/machine/machinectl.c                  |   24 ++
 src/modules-load/modules-load.c           |    8 
 src/nspawn/nspawn.c                       |    1 
 src/shared/cgroup-util.c                  |    4 
 src/shared/conf-parser.c                  |    6 
 src/shared/conf-parser.h                  |    6 
 src/shared/fileio.c                       |    9 -
 src/shared/logs-show.c                    |    5 
 src/shared/macro.h                        |   13 +
 src/shared/util.c                         |   24 ++
 src/stdio-bridge/stdio-bridge.c           |    2 
 src/test/test-util.c                      |   11 +
 src/udev/cdrom_id/cdrom_id.c              |    2 
 src/udev/udev-builtin-usb_id.c            |    4 
 src/udev/udevadm-hwdb.c                   |   11 -
 units/serial-getty at .service.m4            |    3 
 units/systemd-logind.service.in           |    5 
 72 files changed, 1244 insertions(+), 391 deletions(-)

New commits:
commit d53f421adfe975b86bf1a7f08053acc9b2d17310
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Thu Feb 27 00:11:54 2014 -0500

    journal: forget file after encountering an error
    
    If we encounter an inconsistency in a file, let's just
    ignore it. Otherwise, after previous patch, we would try,
    and fail, to use this file in every invocation of sd_journal_next
    or sd_journal_previous that happens afterwards.
    
    (cherry picked from commit a9a245c128af6c0418085062c60251bc51fa4a94)

diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index b1bd61f..661257b 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -50,6 +50,8 @@
 
 #define DEFAULT_DATA_THRESHOLD (64*1024)
 
+static void remove_file_real(sd_journal *j, JournalFile *f);
+
 static bool journal_pid_changed(sd_journal *j) {
         assert(j);
 
@@ -895,6 +897,7 @@ static int real_journal_next(sd_journal *j, direction_t direction) {
                 r = next_beyond_location(j, f, direction, &o, &p);
                 if (r < 0) {
                         log_debug("Can't iterate through %s, ignoring: %s", f->path, strerror(-r));
+                        remove_file_real(j, f);
                         continue;
                 } else if (r == 0)
                         continue;
@@ -1368,7 +1371,7 @@ static int add_file(sd_journal *j, const char *prefix, const char *filename) {
 }
 
 static int remove_file(sd_journal *j, const char *prefix, const char *filename) {
-        char *path;
+        _cleanup_free_ char *path;
         JournalFile *f;
 
         assert(j);
@@ -1380,10 +1383,17 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename)
                 return -ENOMEM;
 
         f = hashmap_get(j->files, path);
-        free(path);
         if (!f)
                 return 0;
 
+        remove_file_real(j, f);
+        return 0;
+}
+
+static void remove_file_real(sd_journal *j, JournalFile *f) {
+        assert(j);
+        assert(f);
+
         hashmap_remove(j->files, f->path);
 
         log_debug("File %s removed.", f->path);
@@ -1401,8 +1411,6 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename)
         journal_file_close(f);
 
         j->current_invalidate_counter ++;
-
-        return 0;
 }
 
 static int add_directory(sd_journal *j, const char *prefix, const char *dirname) {

commit e649fb0f7b9493b92434ca9e19dbcc7125fd9420
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Thu Feb 27 00:07:29 2014 -0500

    journal: assume that next entry is after previous entry
    
    With a corrupted file, we can get in a situation where two entries
    in the entry array point to the same object. Then journal_file_next_entry
    will find the first one using generic_arrray_bisect, and try to move to
    the second one, but since the address is the same, generic_array_get will
    return the first one. journal_file_next_entry ends up in an infinite loop.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1047039
    (cherry picked from commit fb099c8d2af6620db2709e826a258089d10cdfe8)

diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 4d9787a..57ded0a 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1359,7 +1359,7 @@ int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, const st
 }
 
 typedef struct ChainCacheItem {
-        uint64_t first; /* the array at the begin of the chain */
+        uint64_t first; /* the array at the beginning of the chain */
         uint64_t array; /* the cached array */
         uint64_t begin; /* the first item in the cached array */
         uint64_t total; /* the total number of items in all arrays before this one in the chain */
@@ -1945,7 +1945,7 @@ int journal_file_next_entry(
                 direction_t direction,
                 Object **ret, uint64_t *offset) {
 
-        uint64_t i, n;
+        uint64_t i, n, ofs;
         int r;
 
         assert(f);
@@ -1986,10 +1986,24 @@ int journal_file_next_entry(
         }
 
         /* And jump to it */
-        return generic_array_get(f,
-                                 le64toh(f->header->entry_array_offset),
-                                 i,
-                                 ret, offset);
+        r = generic_array_get(f,
+                              le64toh(f->header->entry_array_offset),
+                              i,
+                              ret, &ofs);
+        if (r <= 0)
+                return r;
+
+        if (p > 0 &&
+            (direction == DIRECTION_DOWN ? ofs <= p : ofs >= p)) {
+                log_debug("%s: entry array corrupted at entry %"PRIu64,
+                          f->path, i);
+                return -EBADMSG;
+        }
+
+        if (offset)
+                *offset = ofs;
+
+        return 1;
 }
 
 int journal_file_skip_entry(

commit 1c01cf8b9d2adfb25694fa3f317d7afa2eb8783c
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Tue Mar 4 23:16:30 2014 +0100

    add bash completion for systemd-cat
    
    (cherry picked from commit 207017017db91232189226bfcf29e61926310a9b)

diff --git a/Makefile.am b/Makefile.am
index dafc428..df476ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -342,6 +342,7 @@ dist_bashcompletion_DATA = \
 	shell-completion/bash/journalctl \
 	shell-completion/bash/systemctl \
 	shell-completion/bash/systemd-analyze \
+	shell-completion/bash/systemd-cat \
 	shell-completion/bash/systemd-cgls \
 	shell-completion/bash/systemd-cgtop \
 	shell-completion/bash/systemd-delta \
diff --git a/shell-completion/bash/systemd-cat b/shell-completion/bash/systemd-cat
new file mode 100644
index 0000000..8d84042
--- /dev/null
+++ b/shell-completion/bash/systemd-cat
@@ -0,0 +1,57 @@
+# systemd-cat(1) completion                  -*- shell-script -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2014 Thomas H.P. Andersen
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
+__contains_word() {
+        local w word=$1; shift
+        for w in "$@"; do
+                [[ $w = "$word" ]] && return
+        done
+}
+
+_systemd_cat() {
+        local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
+        local i verb comps
+
+        local -A OPTS=(
+               [STANDALONE]='-h --help --version'
+                      [ARG]='-t --identifier -p --priority --level-prefix'
+        )
+
+        _init_completion || return
+
+        if __contains_word "$prev" ${OPTS[ARG]}; then
+                case $prev in
+                        --identifier|-t)
+                                comps=''
+                        ;;
+                        --priority|-p)
+                                comps='emerg alert crit err warning notice info debug'
+                        ;;
+                        --level-prefix)
+                                comps='yes no'
+                        ;;
+                esac
+                COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
+                return 0
+        fi
+
+        COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
+}
+
+complete -F _systemd_cat systemd-cat

commit b189ee91c9f1ff74dd2c025dcad1e1f87d30b533
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Tue Mar 4 09:50:26 2014 -0500

    Do not print invalid UTF-8 in error messages
    
    Inexplicably, 550a40ec ('core: do not print invalid utf-8 in error
    messages') only fixed two paths. Convert all of them now.
    
    (cherry picked from commit b5d742138f71e87312541a89aac5657015f50f48)
    
    Conflicts:
    	src/core/load-fragment.c
    	src/shared/conf-parser.c

diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index f01843d..d6ac4f6 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -515,9 +515,7 @@ int config_parse_exec(const char *unit,
                                 }
 
                                 if (!utf8_is_valid(path)) {
-                                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                                                   "Path is not UTF-8 clean, ignoring assignment: %s",
-                                                   rvalue);
+                                        log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
                                         r = 0;
                                         goto fail;
                                 }
@@ -532,9 +530,7 @@ int config_parse_exec(const char *unit,
                                 }
 
                                 if (!utf8_is_valid(c)) {
-                                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                                                   "Path is not UTF-8 clean, ignoring assignment: %s",
-                                                   rvalue);
+                                        log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
                                         r = 0;
                                         goto fail;
                                 }
@@ -1803,8 +1799,7 @@ int config_parse_unit_requires_mounts_for(
                         return log_oom();
 
                 if (!utf8_is_valid(n)) {
-                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                                   "Path is not UTF-8 clean, ignoring assignment: %s", rvalue);
+                        log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
                         continue;
                 }
 
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 6085d33..4ac71ed 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -607,8 +607,7 @@ int config_parse_path(const char *unit,
         assert(data);
 
         if (!utf8_is_valid(rvalue)) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                           "Path is not UTF-8 clean, ignoring assignment: %s", rvalue);
+                log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
                 return 0;
         }
 
@@ -675,8 +674,7 @@ int config_parse_strv(const char *unit,
                         return log_oom();
 
                 if (!utf8_is_valid(n)) {
-                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                                   "String is not UTF-8 clean, ignoring: %s", rvalue);
+                        log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
                         continue;
                 }
 
diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h
index 08428a5..247e562 100644
--- a/src/shared/conf-parser.h
+++ b/src/shared/conf-parser.h
@@ -122,6 +122,12 @@ int log_syntax_internal(const char *unit, int level,
                             config_file, config_line,                   \
                             error, __VA_ARGS__)
 
+#define log_invalid_utf8(unit, level, config_file, config_line, error, rvalue) { \
+        _cleanup_free_ char *__p = utf8_escape_invalid(rvalue);                  \
+        log_syntax(unit, level, config_file, config_line, error,                 \
+                   "String is not UTF-8 clean, ignoring assignment: %s", __p);   \
+        }
+
 #define DEFINE_CONFIG_PARSE_ENUM(function,name,type,msg)                \
         int function(const char *unit,                                  \
                      const char *filename,                              \
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
index 121cd57..0586e33 100644
--- a/src/shared/fileio.c
+++ b/src/shared/fileio.c
@@ -526,15 +526,18 @@ static int load_env_file_push(const char *filename, unsigned line,
         int r;
 
         if (!utf8_is_valid(key)) {
+                _cleanup_free_ char *t = utf8_escape_invalid(key);
+
                 log_error("%s:%u: invalid UTF-8 for key '%s', ignoring.",
-                          filename, line, key);
+                          filename, line, t);
                 return -EINVAL;
         }
 
         if (value && !utf8_is_valid(value)) {
-                /* FIXME: filter UTF-8 */
+                _cleanup_free_ char *t = utf8_escape_invalid(value);
+
                 log_error("%s:%u: invalid UTF-8 value for key %s: '%s', ignoring.",
-                          filename, line, key, value);
+                          filename, line, key, t);
                 return -EINVAL;
         }
 

commit 838c834403dc9aeed0b9c579a2d28982f5067067
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Mon Mar 3 22:16:04 2014 +0100

    add bash completion for systemd-detect-virt
    
    (cherry picked from commit 3bfe58cbd4a9b1d2520f425f95de718f3a583d39)

diff --git a/Makefile.am b/Makefile.am
index 64d44ce..dafc428 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -345,6 +345,7 @@ dist_bashcompletion_DATA = \
 	shell-completion/bash/systemd-cgls \
 	shell-completion/bash/systemd-cgtop \
 	shell-completion/bash/systemd-delta \
+	shell-completion/bash/systemd-detect-virt \
 	shell-completion/bash/systemd-nspawn \
 	shell-completion/bash/systemd-run \
 	shell-completion/bash/udevadm \
diff --git a/shell-completion/bash/systemd-detect-virt b/shell-completion/bash/systemd-detect-virt
new file mode 100644
index 0000000..df06c29
--- /dev/null
+++ b/shell-completion/bash/systemd-detect-virt
@@ -0,0 +1,40 @@
+# systemd-detect-virt(1) completion             -*- shell-script -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2014 Thomas H.P. Andersen
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
+__contains_word() {
+        local w word=$1; shift
+        for w in "$@"; do
+                [[ $w = "$word" ]] && return
+        done
+}
+
+_systemd_detect_virt() {
+        local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
+        local i verb comps
+
+        local -A OPTS=(
+               [STANDALONE]='-h --help --version -c --container -v --vm -q --quiet'
+        )
+
+        _init_completion || return
+
+        COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
+}
+
+complete -F _systemd_detect_virt systemd-detect-virt

commit b0e7aa5558ff540de8d61c3756a9a0999bc4b1e3
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Wed Mar 5 00:44:23 2014 -0500

    execute: free directory path if we fail to remove it because we cannot allocate a thread
    
    Based on 98b47d54ce946ad3524f84eb38d2413498a333dc.

diff --git a/src/core/execute.c b/src/core/execute.c
index 9b85379..ee445d7 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -1611,10 +1611,16 @@ void exec_context_tmp_dirs_done(ExecContext *c) {
                         c->tmp_dir ? c->var_tmp_dir : NULL,
                         NULL};
         char **dirp;
+        int r;
 
         for(dirp = dirs; *dirp; dirp++) {
                 log_debug("Spawning thread to nuke %s", *dirp);
-                asynchronous_job(remove_tmpdir_thread, *dirp);
+
+                r = asynchronous_job(remove_tmpdir_thread, *dirp);
+                if (r < 0) {
+                        log_warning("Failed to nuke %s: %s", *dirp, strerror(-r));
+                        free(*dirp);
+                }
         }
 
         c->tmp_dir = c->var_tmp_dir = NULL;

commit 6772933b7fa165529e2f33bda183b931beeefc83
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Sun Mar 2 22:58:18 2014 +0100

    add bash completion for systemd-cgtop
    
    (cherry picked from commit d9256bac4da4241cb5d97960c899390839f2c6e5)

diff --git a/Makefile.am b/Makefile.am
index d4a65e7..64d44ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -343,6 +343,7 @@ dist_bashcompletion_DATA = \
 	shell-completion/bash/systemctl \
 	shell-completion/bash/systemd-analyze \
 	shell-completion/bash/systemd-cgls \
+	shell-completion/bash/systemd-cgtop \
 	shell-completion/bash/systemd-delta \
 	shell-completion/bash/systemd-nspawn \
 	shell-completion/bash/systemd-run \
diff --git a/shell-completion/bash/systemd-cgtop b/shell-completion/bash/systemd-cgtop
new file mode 100644
index 0000000..d7ea42d
--- /dev/null
+++ b/shell-completion/bash/systemd-cgtop
@@ -0,0 +1,40 @@
+# systemd-cgtop(1) completion                  -*- shell-script -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2014 Thomas H.P. Andersen
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
+__contains_word() {
+        local w word=$1; shift
+        for w in "$@"; do
+                [[ $w = "$word" ]] && return
+        done
+}
+
+_systemd_cgtop() {
+        local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
+        local comps
+
+        local -A OPTS=(
+               [STANDALONE]='-h --help --version -p -t -c -m -i -b --batch -n --iterations -d --delay'
+        )
+
+        _init_completion || return
+
+        COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
+}
+
+complete -F _systemd_cgtop systemd-cgtop

commit f8e71de7270d91d18f93af0e6fd1c92a571bae04
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sun Mar 2 00:05:16 2014 -0500

    Allow fractional parts in disk sizes
    
    It seems natural to be able to say SystemMaxUsage=1.5G.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1047568
    (cherry picked from commit 9480794b277b5ce33e467578ed669996df576bb9)
    
    Conflicts:
    	src/test/test-util.c

diff --git a/src/shared/util.c b/src/shared/util.c
index 7500779..e754747 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -2285,6 +2285,8 @@ int parse_bytes(const char *t, off_t *bytes) {
         p = t;
         do {
                 long long l;
+                unsigned long long l2;
+                double frac = 0;
                 char *e;
                 unsigned i;
 
@@ -2300,14 +2302,32 @@ int parse_bytes(const char *t, off_t *bytes) {
                 if (e == p)
                         return -EINVAL;
 
+                if (*e == '.') {
+                        e++;
+                        if (*e >= '0' && *e <= '9') {
+                                char *e2;
+
+                                /* strotoull itself would accept space/+/- */
+                                l2 = strtoull(e, &e2, 10);
+
+                                if (errno == ERANGE)
+                                        return -errno;
+
+                                /* Ignore failure. E.g. 10.M is valid */
+                                frac = l2;
+                                for (; e < e2; e++)
+                                        frac /= 10;
+                        }
+                }
+
                 e += strspn(e, WHITESPACE);
 
                 for (i = 0; i < ELEMENTSOF(table); i++)
                         if (startswith(e, table[i].suffix)) {
                                 unsigned long long tmp;
-                                if ((unsigned long long) l > ULLONG_MAX / table[i].factor)
+                                if ((unsigned long long) l + (frac > 0) > ULLONG_MAX / table[i].factor)
                                         return -ERANGE;
-                                tmp = l * table[i].factor;
+                                tmp = l * table[i].factor + (unsigned long long) (frac * table[i].factor);
                                 if (tmp > ULLONG_MAX - r)
                                         return -ERANGE;
 

commit 33b2fe7716b465418f956f0ec4292e7ae95c0bbd
Author: Marcel Holtmann <marcel at holtmann.org>
Date:   Sun Mar 2 10:02:10 2014 -0800

    hwdb: Update database of Bluetooth company identifiers
    
    (cherry picked from commit e525326bd07ebf3cabcfd730bc479166723f2d44)

diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb
index db3bc24..0335a71 100644
--- a/hwdb/20-bluetooth-vendor-product.hwdb
+++ b/hwdb/20-bluetooth-vendor-product.hwdb
@@ -902,3 +902,12 @@ bluetooth:v0129*
 
 bluetooth:v012A*
  ID_VENDOR_FROM_DATABASE=Changzhou Yongse Infotech Co., Ltd
+
+bluetooth:v012B*
+ ID_VENDOR_FROM_DATABASE=SportIQ
+
+bluetooth:v012C*
+ ID_VENDOR_FROM_DATABASE=TEMEC Instruments B.V.
+
+bluetooth:v012D*
+ ID_VENDOR_FROM_DATABASE=Sony Corporation

commit 455624a164ba0a50a78fbac659efeca26f1bc507
Author: Marcel Holtmann <marcel at holtmann.org>
Date:   Fri Feb 21 21:41:01 2014 -0800

    hwdb: Update database of Bluetooth company identifiers
    
    (cherry picked from commit 4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57)

diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb
index 6a9dc50..db3bc24 100644
--- a/hwdb/20-bluetooth-vendor-product.hwdb
+++ b/hwdb/20-bluetooth-vendor-product.hwdb
@@ -630,6 +630,9 @@ bluetooth:v00CE*
 bluetooth:v00CF*
  ID_VENDOR_FROM_DATABASE=ARCHOS SA
 
+bluetooth:v00D0*
+ ID_VENDOR_FROM_DATABASE=Dexcom, Inc.
+
 bluetooth:v00D1*
  ID_VENDOR_FROM_DATABASE=Polar Electro Europe B.V.
 
@@ -869,3 +872,33 @@ bluetooth:v011F*
 
 bluetooth:v0120*
  ID_VENDOR_FROM_DATABASE=Porsche AG
+
+bluetooth:v0121*
+ ID_VENDOR_FROM_DATABASE=Sino Wealth Electronic Ltd.
+
+bluetooth:v0122*
+ ID_VENDOR_FROM_DATABASE=AirTurn, Inc.
+
+bluetooth:v0123*
+ ID_VENDOR_FROM_DATABASE=Kinsa, Inc.
+
+bluetooth:v0124*
+ ID_VENDOR_FROM_DATABASE=HID Global
+
+bluetooth:v0125*
+ ID_VENDOR_FROM_DATABASE=SEAT es
+
+bluetooth:v0126*
+ ID_VENDOR_FROM_DATABASE=Promethean Ltd.
+
+bluetooth:v0127*
+ ID_VENDOR_FROM_DATABASE=Salutica Allied Solutions
+
+bluetooth:v0128*
+ ID_VENDOR_FROM_DATABASE=GPSI Group Pty Ltd
+
+bluetooth:v0129*
+ ID_VENDOR_FROM_DATABASE=Nimble Devices Oy
+
+bluetooth:v012A*
+ ID_VENDOR_FROM_DATABASE=Changzhou Yongse Infotech Co., Ltd

commit 7d6ed8b92b7490ddf419d2782d3d8a0d6f827cc7
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Sat Mar 1 23:08:38 2014 +0100

    add bash completion for systemd-cgls
    
    (cherry picked from commit abdab4f602745952030a37b1521cd0374d51d3ea)

diff --git a/Makefile.am b/Makefile.am
index 03a1f91..d4a65e7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -342,6 +342,7 @@ dist_bashcompletion_DATA = \
 	shell-completion/bash/journalctl \
 	shell-completion/bash/systemctl \
 	shell-completion/bash/systemd-analyze \
+	shell-completion/bash/systemd-cgls \
 	shell-completion/bash/systemd-delta \
 	shell-completion/bash/systemd-nspawn \
 	shell-completion/bash/systemd-run \
diff --git a/shell-completion/bash/systemd-cgls b/shell-completion/bash/systemd-cgls
new file mode 100644
index 0000000..0570438
--- /dev/null
+++ b/shell-completion/bash/systemd-cgls
@@ -0,0 +1,56 @@
+# systemd-cgls(1) completion                  -*- shell-script -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2014 Thomas H.P. Andersen
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
+__contains_word() {
+        local w word=$1; shift
+        for w in "$@"; do
+                [[ $w = "$word" ]] && return
+        done
+}
+
+__get_machines() {
+        local a b
+        machinectl list --no-legend --no-pager | { while read a b; do echo " $a"; done; };
+}
+
+_systemd_cgls() {
+        local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
+        local i verb comps
+
+        local -A OPTS=(
+               [STANDALONE]='-h --help --version --all -l --full -k --no-pager'
+                      [ARG]='-M --machine'
+        )
+
+        _init_completion || return
+
+        if __contains_word "$prev" ${OPTS[ARG]}; then
+                case $prev in
+                        --machine|-M)
+                                comps=$( __get_machines )
+                        ;;
+                esac
+                COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
+                return 0
+        fi
+
+        COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
+}
+
+complete -F _systemd_cgls systemd-cgls

commit a18b0404be6c4b84d556479c0fbb8691dd9792e1
Author: Thomas Andersen <phomes at localhost.localdomain>
Date:   Sat Mar 1 03:27:49 2014 +0100

    bash: add completion for systemd-nspawn
    
    (cherry picked from commit 0d6883b6a870b66c8c70e43695d22de96aab68e7)

diff --git a/Makefile.am b/Makefile.am
index 703925a..03a1f91 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -343,6 +343,7 @@ dist_bashcompletion_DATA = \
 	shell-completion/bash/systemctl \
 	shell-completion/bash/systemd-analyze \
 	shell-completion/bash/systemd-delta \
+	shell-completion/bash/systemd-nspawn \
 	shell-completion/bash/systemd-run \
 	shell-completion/bash/udevadm \
 	shell-completion/bash/kernel-install
diff --git a/shell-completion/bash/systemd-nspawn b/shell-completion/bash/systemd-nspawn
new file mode 100644
index 0000000..0e8a30c
--- /dev/null
+++ b/shell-completion/bash/systemd-nspawn
@@ -0,0 +1,90 @@
+# systemd-nspawn(1) completion                  -*- shell-script -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2014 Thomas H.P. Andersen
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
+__contains_word() {
+        local w word=$1; shift
+        for w in "$@"; do
+                [[ $w = "$word" ]] && return
+        done
+}
+
+__get_users() {
+        local a b
+        loginctl list-users --no-legend --no-pager | { while read a b; do echo " $b"; done; };
+}
+
+__get_slices() {
+        local a b
+        systemctl list-units -t slice --no-legend --no-pager | { while read a b; do echo " $a"; done; };
+}
+
+_systemd_nspawn() {
+        local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
+        local i verb comps
+
+        local -A OPTS=(
+               [STANDALONE]='-h --help --version --private-network -b --boot --read-only -q --quiet --share-system --keep-unit --network-veth -j'
+                      [ARG]='-D --directory -u --user --uuid --capability --drop-capability --link-journal --bind --bind-ro -M --machine
+                             -S --slice'
+        )
+
+        _init_completion || return
+
+        if __contains_word "$prev" ${OPTS[ARG]}; then
+                case $prev in
+                        --directory|-D)
+                                comps=$(compgen -A directory -- "$cur" )
+                        ;;
+                        --user|-u)
+                                comps=$( __get_users )
+                        ;;
+                        --uuid)
+                                comps=''
+                        ;;
+                        --capability)
+                                comps='CAP_BLOCK_SUSPEND CAP_IPC_LOCK CAP_MAC_ADMIN CAP_MAC_OVERRIDE CAP_SYS_MODULE CAP_SYS_PACCT CAP_SYS_RAWIO
+                                       CAP_SYS_TIME CAP_SYSLOG CAP_WAKE_ALARM CAP_NET_ADMIN'
+                        ;;
+                        --drop-capability)
+                                comps='CAP_AUDIT_CONTROL CAP_AUDIT_WRITE CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH CAP_FOWNER CAP_FSETID
+                                       CAP_IPC_OWNER CAP_KILL CAP_LEASE CAP_LINUX_IMMUTABLE CAP_MKNOD CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+                                       CAP_NET_BROADCAST CAP_NET_RAW CAP_SETFCAP CAP_SETGID CAP_SETPCAP CAP_SETUID CAP_SYS_ADMIN CAP_SYS_BOOT
+                                       CAP_SYS_CHROOT CAP_SYS_NICE CAP_SYS_PTRACE CAP_SYS_RESOURCE CAP_SYS_TTY_CONFIG'
+                        ;;
+                        --link-journal)
+                                comps='no auto guest host'
+                        ;;
+                        --bind|--bind-ro)
+                                comps=''
+                        ;;
+                        --machine|-M)
+                                comps=''
+                        ;;
+                        --slice|-S)
+                                comps=$( __get_slices )
+                        ;;
+                esac
+                COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
+                return 0
+        fi
+
+        COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
+}
+
+complete -F _systemd_nspawn systemd-nspawn

commit dd3afc0c52462d845b2939e4beb343fbe9548e3a
Author: Lukas Nykryn <lnykryn at redhat.com>
Date:   Thu Feb 27 11:19:09 2014 +0100

    udev/rules: setup tty permissions and group for sclp_line, ttysclp and 3270/tty
    
    (cherry picked from commit c594cccee264cfd98f183ae6ec289b11e70f2d6c)

diff --git a/rules/50-udev-default.rules b/rules/50-udev-default.rules
index 679dfdf..0bccf67 100644
--- a/rules/50-udev-default.rules
+++ b/rules/50-udev-default.rules
@@ -15,6 +15,9 @@ ACTION!="add", GOTO="default_permissions_end"
 SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666"
 SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666"
 SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620"
+SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620"
+SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620"
+SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620"
 SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty"
 KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
 

commit 34a3cc7eabb3777bcf118e895668259ae0ffa770
Author: Lukas Nykryn <lnykryn at redhat.com>
Date:   Thu Feb 27 11:06:37 2014 +0100

    cdrom_id: use the old MMC fallback
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1038015
    The problem seems to be that the your virtual DVD is emulating a really
    old DVD device, and doing it kind of strangely.
    
    > dracut:# /lib/udev/cdrom_id --debug /dev/sr0
    > probing: '/dev/sr0'
    > INQUIRY: [IMM     ][Virtual CD/DVD   ][0316]
    > GET CONFIGURATION failed with SK=5h/ASC=24h/ACQ=00h
    
    So your virtual drive rejects the GET CONFIGURATION command as illegal.
    
    Other pre-MMC2 drives that don't accept this command usually return the
    error
    SK=5h,ASC=20h (invalid/unsupported command code), in which case cdrom_id
    tries an older method, and then ID_CDROM_MEDIA_TRACK_COUNT_DATA gets set
    and all the /dev/disk/by-label (etc) links get set up.
    
    The virtual drive returns the error SK=5h,ASC=24h (invalid field in
    Command Descriptor Block), which cdrom_id doesn't handle, so it gives up
    and the links never get made.
    
    The ideal solution would be to make the IMM to emulate a device that's
    less than 15 years old, but I'm not going to hold my breath waiting for
    that.
    
    So probably cdrom_id should also use the old MMC fallback when the error
    is SK=5h,ASC=24h, and then all of this would work as expected.
    
    Suggested-by:Luca Miccini <lmiccini at redhat.com>
    (cherry picked from commit a14f14976094650e17d39f3a7d15a1c68c93c333)

diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c
index 1fc0dfa..dac35a6 100644
--- a/src/udev/cdrom_id/cdrom_id.c
+++ b/src/udev/cdrom_id/cdrom_id.c
@@ -555,7 +555,7 @@ static int cd_profiles(struct udev *udev, int fd)
         if ((err != 0)) {
                 info_scsi_cmd_err(udev, "GET CONFIGURATION", err);
                 /* handle pre-MMC2 drives which do not support GET CONFIGURATION */
-                if (SK(err) == 0x5 && ASC(err) == 0x20) {
+                if (SK(err) == 0x5 && (ASC(err) == 0x20 || ASC(err) == 0x24)) {
                         log_debug("drive is pre-MMC2 and does not support 46h get configuration command");
                         log_debug("trying to work around the problem");
                         ret = cd_profiles_old_mmc(udev, fd);

commit 1aebc805e5f46fa03439f11a00f955a5031cd355
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Wed Feb 26 23:01:43 2014 -0500

    journalctl: refuse extra arguments with --verify and similar
    
    Positional arguments only make sense with the default action.
    For other actions, complain instead of ignoring them silently.
    
    (cherry picked from commit 0b6b7c2004317da48e5bbd3078c5662d8f0061b6)

diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 5b0be27..6f52467 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -646,6 +646,11 @@ static int parse_argv(int argc, char *argv[]) {
                 return -EINVAL;
         }
 
+        if (arg_action != ACTION_SHOW && optind < argc) {
+                log_error("Extraneous arguments starting with '%s'", argv[optind]);
+                return -EINVAL;
+        }
+
         return 1;
 }
 

commit 0f9825cc7807f1af6c12709b86c76b141f366630
Author: Uoti Urpala <uoti.urpala at pp1.inet.fi>
Date:   Thu Feb 20 03:00:09 2014 +0200

    logs-show: fix corrupt output with empty messages
    
    If a message had zero length, journalctl would print no newline, and
    two output lines would be concatenated. Fix. The problem was
    introduced in commit 31f7bf199452 ("logs-show: print multiline
    messages"). Affected short and verbose output modes.
    
    Before fix:
    
    Feb 09 21:16:17 glyph dhclient[1323]: Feb 09 21:16:17 glyph NetworkManager[788]: <info> (enp4s2): DHCPv4 state changed nbi -> preinit
    
    after:
    
    Feb 09 21:16:17 glyph dhclient[1323]:
    Feb 09 21:16:17 glyph NetworkManager[788]: <info> (enp4s2): DHCPv4 state changed nbi -> preinit
    
    (cherry picked from commit 47d80904a1f72d559962cc5ad32fffd46672a34a)

diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index 7bb19b4..91eefb3 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -121,6 +121,11 @@ static bool print_multiline(FILE *f, unsigned prefix, unsigned n_columns, Output
                 }
         }
 
+        /* A special case: make sure that we print a newline when
+           the message is empty. */
+        if (message_len == 0)
+                fputs("\n", f);
+
         for (pos = message;
              pos < message + message_len;
              pos = end + 1, line++) {

commit 672f89e96aa251c3174d340541609e100882172c
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 26 04:28:37 2014 +0100

    mount: don't fire PropertiesChanged signals for mounts that are stopped
    
    (cherry picked from commit aef831369cd2a7a1bd4a58dd96ff8628ed6a85f9)

diff --git a/src/core/mount.c b/src/core/mount.c
index 0a0ef82..65ea3f9 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1691,20 +1691,20 @@ void mount_fd_event(Manager *m, int events) {
                 Mount *mount = MOUNT(u);
 
                 if (!mount->is_mounted) {
-                        /* This has just been unmounted. */
 
                         mount->from_proc_self_mountinfo = false;
 
                         switch (mount->state) {
 
                         case MOUNT_MOUNTED:
+                                /* This has just been unmounted by
+                                 * somebody else, follow the state
+                                 * change. */
                                 mount_enter_dead(mount, MOUNT_SUCCESS);
                                 break;
 
                         default:
-                                mount_set_state(mount, mount->state);
                                 break;
-
                         }
 
                 } else if (mount->just_mounted || mount->just_changed) {
@@ -1715,6 +1715,9 @@ void mount_fd_event(Manager *m, int events) {
 
                         case MOUNT_DEAD:
                         case MOUNT_FAILED:
+                                /* This has just been mounted by
+                                 * somebody else, follow the state
+                                 * change. */
                                 mount_enter_mounted(mount, MOUNT_SUCCESS);
                                 break;
 

commit bd46db0b848f202fa11d876ecb0f48b982abfb3f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 26 04:27:50 2014 +0100

    mount: don't send out PropertiesChanged message if actually nothing got changed
    
    (cherry picked from commit ff5f34d08c191c326c41a083745522383ac86cae)
    
    Conflicts:
    	src/core/mount.c

diff --git a/src/core/mount.c b/src/core/mount.c
index c0445a6..0a0ef82 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1412,9 +1412,10 @@ static int mount_add_one(
                 const char *fstype,
                 int passno,
                 bool set_flags) {
+
         int r;
         Unit *u;
-        bool delete;
+        bool delete, changed = false;
         char *e, *w = NULL, *o = NULL, *f = NULL;
         MountParameters *p;
         bool load_extras = false;
@@ -1483,6 +1484,7 @@ static int mount_add_one(
                 }
 
                 unit_add_to_load_queue(u);
+                changed = true;
         } else {
                 delete = false;
                 free(e);
@@ -1502,6 +1504,7 @@ static int mount_add_one(
                         /* Load in the extras later on, after we
                          * finished initialization of the unit */
                         load_extras = true;
+                        changed = true;
                 }
         }
 
@@ -1513,10 +1516,16 @@ static int mount_add_one(
         }
 
         p = &MOUNT(u)->parameters_proc_self_mountinfo;
+
+        changed = changed ||
+                !streq_ptr(p->options, options) ||
+                !streq_ptr(p->what, what) ||
+                !streq_ptr(p->fstype, fstype);
+
         if (set_flags) {
                 MOUNT(u)->is_mounted = true;
                 MOUNT(u)->just_mounted = !MOUNT(u)->from_proc_self_mountinfo;
-                MOUNT(u)->just_changed = !streq_ptr(p->options, o);
+                MOUNT(u)->just_changed = changed;
         }
 
         MOUNT(u)->from_proc_self_mountinfo = true;
@@ -1538,7 +1547,8 @@ static int mount_add_one(
                         goto fail;
         }
 
-        unit_add_to_dbus_queue(u);
+        if (changed)
+                unit_add_to_dbus_queue(u);
 
         return 0;
 

commit 017c73f0c1112dd3e315173e35ba1bd357f6e5b4
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Tue Feb 25 21:26:31 2014 -0500

    Use /var/run/dbus/system_bus_socket for the D-Bus socket
    
    (cherry picked from commit 1ae383a8a3ae4824453e297352fda603d2d3fd5e)
    (cherry picked from commit d5194bbb174d0b9a87e81d465644624ab455bbf6)
    
    Conflicts:
    	man/systemd-bus-proxyd at .service.xml
    	src/libsystemd/sd-bus/PORTING-DBUS1
    	src/shared/def.h
    	units/systemd-bus-proxyd.socket

diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index db0880f..8dc3f6e 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -972,8 +972,8 @@ int sd_bus_open_system(sd_bus **ret) {
                         goto fail;
         } else {
                 b->sockaddr.un.sun_family = AF_UNIX;
-                strncpy(b->sockaddr.un.sun_path, "/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path));
-                b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + sizeof("/run/dbus/system_bus_socket") - 1;
+                strncpy(b->sockaddr.un.sun_path, "/var/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path));
+                b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/var/run/dbus/system_bus_socket");
         }
 
         b->bus_client = true;
diff --git a/src/stdio-bridge/stdio-bridge.c b/src/stdio-bridge/stdio-bridge.c
index ab1a43a..f2a26c0 100644
--- a/src/stdio-bridge/stdio-bridge.c
+++ b/src/stdio-bridge/stdio-bridge.c
@@ -62,7 +62,7 @@ int main(int argc, char *argv[]) {
                 goto finish;
         }
 
-        r = sd_bus_set_address(a, "unix:path=/run/dbus/system_bus_socket");
+        r = sd_bus_set_address(a, "unix:path=/var/run/dbus/system_bus_socket");
         if (r < 0) {
                 log_error("Failed to set address to connect to: %s", strerror(-r));
                 goto finish;

commit e3a2cced777977487ac7be6a199292fcda72ef36
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 26 02:54:37 2014 +0100

    README: document that /var/run must be a symlink → /run
    
    (cherry picked from commit 47bc23c18cbc87471dc832534c8565625e4a9d16)
    (cherry picked from commit 10acd244847eb8689e79efbf95475aef8818bb51)

diff --git a/README b/README
index cf0a18d..fa433be 100644
--- a/README
+++ b/README
@@ -189,6 +189,9 @@ WARNINGS:
         about this, since this kind of file system setup is not really
         supported anymore by the basic set of Linux OS components.
 
+        systemd requires that the /run mount point exists. systemd also
+        requires that /var/run is a a symlink → /run.
+
         For more information on this issue consult
         http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
 

commit e9327994f09d2b59dc51c322cdd9878c23181e2c
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Mon Feb 24 08:02:28 2014 -0500

    units/serial-getty at .service: add [Install] section
    
    This makes it easier to manually enable and disable
    specific gettys, and also mirrors getty at .service.
    
    http://lists.freedesktop.org/archives/systemd-devel/2014-February/017329.html
    (cherry picked from commit 7143555ce8f94b002d06b9b058d7d90c3a4901a9)

diff --git a/units/serial-getty at .service.m4 b/units/serial-getty at .service.m4
index e32c6b7..aea078f 100644
--- a/units/serial-getty at .service.m4
+++ b/units/serial-getty at .service.m4
@@ -33,3 +33,6 @@ TTYVHangup=yes
 KillMode=process
 IgnoreSIGPIPE=no
 SendSIGHUP=yes
+
+[Install]
+WantedBy=getty.target

commit e485d9fa1e43c164a322cf4db11f511597d6e635
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Feb 24 03:59:50 2014 +0100

    getty-generator: verify ttys before we make use of them
    
    The ttyS[0-3] devices are weird. They may be enumerated, but when one
    actually tries to open and use them they return EIO, because they don't
    actually exist. Because they may be enumerated they may be specified on
    the kernel command line as console=. And some people do that as default.
    As response to that we'll spawn a getty on the tty that will quickly
    fail, and we retry a couple of time before giving up. That is quite
    noisy.
    
    With this new change we will validate all serial terminals configured
    with console= on the kernel cmdline before adding gettys on them, and
    remove the invalid ones. THis should remove the noise later on.
    
    This should make Eric Paris happy!
    
    (cherry picked from commit 543407517e05688915128cfc544c5d7f97f240ef)

diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c
index 40374b5..625a87e 100644
--- a/src/getty-generator/getty-generator.c
+++ b/src/getty-generator/getty-generator.c
@@ -22,6 +22,7 @@
 #include <string.h>
 #include <errno.h>
 #include <unistd.h>
+#include <fcntl.h>
 
 #include "log.h"
 #include "util.h"
@@ -86,6 +87,30 @@ static int add_serial_getty(const char *tty) {
         return r;
 }
 
+static int verify_tty(const char *name) {
+        _cleanup_close_ int fd = -1;
+        const char *p;
+
+        /* Some TTYs are weird and have been enumerated but don't work
+         * when you try to use them, such as classic ttyS0 and
+         * friends. Let's check that and open the device and run
+         * isatty() on it. */
+
+        p = strappenda("/dev/", name);
+
+        /* O_NONBLOCK is essential here, to make sure we don't wait
+         * for DCD */
+        fd = open(p, O_RDWR|O_NONBLOCK|O_NOCTTY|O_CLOEXEC|O_NOFOLLOW);
+        if (fd < 0)
+                return -errno;
+
+        errno = 0;
+        if (isatty(fd) <= 0)
+                return errno ? -errno : -EIO;
+
+        return 0;
+}
+
 int main(int argc, char *argv[]) {
 
         static const char virtualization_consoles[] =
@@ -146,6 +171,9 @@ int main(int argc, char *argv[]) {
                                 continue;
                         }
 
+                        if (verify_tty(tty) < 0)
+                                continue;
+
                         /* We assume that gettys on virtual terminals are
                          * started via manual configuration and do this magic
                          * only for non-VC terminals. */

commit 97a7eeadeee5bed4e219b56c3414d3d72504234a
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Feb 24 03:20:54 2014 +0100

    core: gc half-created stub units
    
    (cherry picked from commit c35fa384d00dc5dc7d9f339113b015a3f8a5cf79)

diff --git a/src/core/unit.c b/src/core/unit.c
index 8e2a7c4..de34ddc 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -249,9 +249,6 @@ int unit_set_description(Unit *u, const char *description) {
 bool unit_check_gc(Unit *u) {
         assert(u);
 
-        if (u->load_state == UNIT_STUB)
-                return true;
-
         if (UNIT_VTABLE(u)->no_gc)
                 return true;
 

commit d5fdaa66bf7f31a49cc7938264aaedc9261f78ef
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Feb 23 17:05:37 2014 +0100

    journal: downgrade vaccuum message to debug level
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1047148
    (cherry picked from commit 3bb621e1e66b704c0c2dcef31c66f7c646dd47f6)

diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
index 8b07f65..695e518 100644
--- a/src/journal/journal-vacuum.c
+++ b/src/journal/journal-vacuum.c
@@ -334,7 +334,7 @@ finish:
                 free(list[i].filename);
         free(list);
 
-        log_info("Vacuuming done, freed %"PRIu64" bytes", freed);
+        log_debug("Vacuuming done, freed %"PRIu64" bytes", freed);
 
         return r;
 }

commit 536e62fefffdc7726c7bf5b83e8f1cb155960e28
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Feb 23 16:43:19 2014 +0100

    man: document that per-interface sysctl variables are applied as network interfaces show up
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1062955
    (cherry picked from commit 8f03fd08911016d8bbcad5892b2c07b30a4c2306)

diff --git a/man/sysctl.d.xml b/man/sysctl.d.xml
index 5544283..00a857b 100644
--- a/man/sysctl.d.xml
+++ b/man/sysctl.d.xml
@@ -103,6 +103,16 @@
                 <filename>/dev/null</filename> in
                 <filename>/etc/sysctl.d/</filename> bearing the
                 same filename.</para>
+
+                <para>The settings configured with
+                <filename>sysctl.d</filename> files will be applied
+                early on boot. The network interface-specific options
+                will also be applied individually for each network
+                interface as it shows up in the system. (More
+                specifically, that is
+                <filename>net.ipv4.conf.*</filename>,
+                <filename>net.ipv6.conf.*</filename>,
+                <filename>net.ipv4.neigh.*</filename> and <filename>net.ipv6.neigh.*</filename>)</para>
         </refsect1>
 
         <refsect1>

commit 095743031d97f244530be341c29643344c3cbedf
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Feb 21 15:06:44 2014 +0100

    man: there is no ExecStopPre= for service units
    
    https://bugs.freedesktop.org/show_bug.cgi?id=73177
    (cherry picked from commit c32acc96ef74d13d0059a680cdede5f05db1981a)

diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 4d672f0..50b19a8 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -674,7 +674,7 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 processes specified with
                                 <varname>ExecStartPre=</varname>,
                                 <varname>ExecStartPost=</varname>,
-                                <varname>ExecStopPre=</varname>,
+                                <varname>ExecStop=</varname>,
                                 <varname>ExecStopPost=</varname>, or
                                 <varname>ExecReload=</varname>.
                                 When the death of the process is a

commit a8b34088546fdd1505c5def6879e76bc69f03df6
Author: Colin Walters <walters at verbum.org>
Date:   Fri Feb 21 03:29:00 2014 +0100

    selinux: Don't attempt to load policy in initramfs if it doesn't exist
    
    Currently on at least Fedora, SELinux policy does not come in the
    initramfs.  systemd will attempt to load *both* in the initramfs and
    in the real root.
    
    Now, the selinux_init_load_policy() API has a regular error return
    value, as well as an "enforcing" boolean.  To determine enforcing
    state, it looks for /etc/selinux/config as well as the presence of
    "enforcing=" on the kernel command line.
    
    Ordinarily, neither of those exist in the initramfs, so it will return
    "unknown" for enforcing, and systemd will simply ignore the failure to
    load policy.
    
    (cherry picked from commit 37f78db2f4a33474fc349f406b0a0a48e9c573a2)

diff --git a/src/core/selinux-setup.c b/src/core/selinux-setup.c
index 7a32ed5..9a5d6b2 100644
--- a/src/core/selinux-setup.c
+++ b/src/core/selinux-setup.c
@@ -58,6 +58,13 @@ int selinux_setup(bool *loaded_policy) {
        cb.func_log = null_log;
        selinux_set_callback(SELINUX_CB_LOG, cb);
 
+       /* Don't load policy in the initrd if we don't appear to have
+        * it.  For the real root, we check below if we've already
+        * loaded policy, and return gracefully.
+        */
+       if (in_initrd() && access(selinux_path(), F_OK) < 0)
+               return 0;
+
        /* Already initialized by somebody else? */
        r = getcon_raw(&con);
        if (r == 0) {

commit 3646a66d0935ec54d4aebbf1daac6b83812f6ed1
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Thu Feb 20 23:12:02 2014 +0100

    bootctl: add bash completion
    
    (cherry picked from commit 95fe27d9307628a4a593e63794000c09ecb91b95)

diff --git a/Makefile.am b/Makefile.am
index 9049fed..703925a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1748,6 +1748,9 @@ bootctl_LDADD = \
 bin_PROGRAMS += \
 	bootctl
 
+dist_bashcompletion_DATA += \
+	shell-completion/bash/bootctl
+
 dist_zshcompletion_DATA += \
 	shell-completion/zsh/_bootctl
 
diff --git a/shell-completion/bash/bootctl b/shell-completion/bash/bootctl
new file mode 100644
index 0000000..c86ec7e
--- /dev/null
+++ b/shell-completion/bash/bootctl
@@ -0,0 +1,60 @@
+# bootctl(1) completion                               -*- shell-script -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2014 Thomas H.P. Andersen
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
+__contains_word () {
+        local w word=$1; shift
+        for w in "$@"; do
+                [[ $w = "$word" ]] && return
+        done
+}
+
+_bootctl() {
+        local i verb comps
+        local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
+        local -A OPTS=(
+               [STANDALONE]='-h --help --version'
+        )
+
+        if [[ "$cur" = -* ]]; then
+                COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
+                return 0
+        fi
+
+        local -A VERBS=(
+                [STANDALONE]='status'
+        )
+
+        for ((i=0; i < COMP_CWORD; i++)); do
+                if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]}; then
+                        verb=${COMP_WORDS[i]}
+                        break
+                fi
+        done
+
+        if [[ -z $verb ]]; then
+                comps=${VERBS[*]}
+        elif __contains_word "$verb" ${VERBS[STANDALONE]}; then
+                comps=''
+        fi
+
+        COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
+        return 0
+}
+
+complete -F _bootctl bootctl

commit bafeb54696d57d063052ea19286aa72e1a3cc0be
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 19 17:51:08 2014 +0100

    udev: make sure we always return a valid error code in trie_store()
    
    (cherry picked from commit d4f1ef4437e59b2cb69a201bb086ab23070ea72d)
    
    Conflicts:
    	src/udev/udevadm-hwdb.c

diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
index fe56758..141db57 100644
--- a/src/udev/udevadm-hwdb.c
+++ b/src/udev/udevadm-hwdb.c
@@ -341,7 +341,7 @@ static int trie_store(struct trie *trie, const char *filename) {
         struct trie_f t = {
                 .trie = trie,
         };
-        char *filename_tmp;
+        _cleanup_free_ char *filename_tmp = NULL;
         int64_t pos;
         int64_t root_off;
         int64_t size;
@@ -385,8 +385,8 @@ static int trie_store(struct trie *trie, const char *filename) {
                 err = -errno;
         fclose(t.f);
         if (err < 0 || rename(filename_tmp, filename) < 0) {
-                unlink(filename_tmp);
-                goto out;
+                unlink_noerrno(filename_tmp);
+                return err < 0 ? err : -errno;
         }
 
         log_debug("=== trie on-disk ===");
@@ -400,9 +400,8 @@ static int trie_store(struct trie *trie, const char *filename) {
                   (unsigned long long)t.values_count * sizeof(struct trie_value_entry_f), (unsigned long long)t.values_count);
         log_debug("string store:     %8llu bytes", (unsigned long long)trie->strings->len);
         log_debug("strings start:    %8llu", (unsigned long long) t.strings_off);
-out:
-        free(filename_tmp);
-        return err;
+
+        return 0;
 }
 
 static int insert_data(struct trie *trie, struct udev_list *match_list,

commit e19b6a48bfeddc3102b757df36f9da17c5215c5b
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 19 17:49:50 2014 +0100

    journal: don't clobber return parameters of sd_journal_get_cutoff_realtime_usec() on failure
    
    (cherry picked from commit 581483bf59ea62147739e71dd2216477be03411c)

diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index f4af1f6..b1bd61f 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -2359,6 +2359,7 @@ _public_ int sd_journal_get_cutoff_realtime_usec(sd_journal *j, uint64_t *from,
         Iterator i;
         JournalFile *f;
         bool first = true;
+        uint64_t fmin = 0, tmax = 0;
         int r;
 
         if (!j)
@@ -2382,19 +2383,20 @@ _public_ int sd_journal_get_cutoff_realtime_usec(sd_journal *j, uint64_t *from,
                         continue;
 
                 if (first) {
-                        if (from)
-                                *from = fr;
-                        if (to)
-                                *to = t;
+                        fmin = fr;
+                        tmax = t;
                         first = false;
                 } else {
-                        if (from)
-                                *from = MIN(fr, *from);
-                        if (to)
-                                *to = MAX(t, *to);
+                        fmin = MIN(fr, fmin);
+                        tmax = MAX(t, tmax);
                 }
         }
 
+        if (from)
+                *from = fmin;
+        if (to)
+                *to = tmax;
+
         return first ? 0 : 1;
 }
 

commit 840ad04cd8ab038ee90a787e2914ad0e46945f99
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Wed Feb 19 17:02:45 2014 +0100

    man: busctl typo fix
    
    (cherry picked from commit f5ca75f4a1f9f97a23c8bb70ee89cf669f9bb425)

diff --git a/man/busctl.xml b/man/busctl.xml
index 854eb38..6200643 100644
--- a/man/busctl.xml
+++ b/man/busctl.xml
@@ -184,7 +184,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
         <listitem><para>Dump messages being exchanged. If
         <replaceable>NAME</replaceable> is specified, show messages
-        to or from this endpoint. Otherwsise, show all messages on the
+        to or from this endpoint. Otherwise, show all messages on the
         bus.</para></listitem>
       </varlistentry>
     </variablelist>

commit 360ac98ec365f55ea198e07d2c5b86deef14bc6c
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 19 02:54:00 2014 +0100

    man: document $MAINPID
    
    (cherry picked from commit b67f562c9cac44bd78b24f5aae78a1797c5d4182)

diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
index 630a28c..d8dab36 100644
--- a/man/systemd.exec.xml
+++ b/man/systemd.exec.xml
@@ -472,7 +472,7 @@
                         <varlistentry>
                                 <term><varname>StandardError=</varname></term>
                                 <listitem><para>Controls where file
-                                descriptor 2 (standard error) of the
+                                descriptor 2 (STDERR) of the
                                 executed processes is connected to.
                                 The available options are identical to
                                 those of
@@ -1067,6 +1067,17 @@
                         </varlistentry>
 
                         <varlistentry>
+                                <term><varname>$MAINPID</varname></term>
+
+                                <listitem><para>The PID of the units
+                                main process if it is known. This is
+                                only set for control processes as
+                                invoked by
+                                <varname>ExecReload=</varname> and
+                                similar.  </para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
                                 <term><varname>$MANAGERPID</varname></term>
 
                                 <listitem><para>The PID of the user

commit 8d04b9ce22bd716b19695e36c9ca0caf24c2ca25
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Tue Feb 18 22:20:26 2014 +0100

    delta: add bash completion
    
    (cherry picked from commit 0bc8e31b358a872ec2631874bd2109ba4e009ccf)

diff --git a/Makefile.am b/Makefile.am
index 033bbfa..9049fed 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -342,6 +342,7 @@ dist_bashcompletion_DATA = \
 	shell-completion/bash/journalctl \
 	shell-completion/bash/systemctl \
 	shell-completion/bash/systemd-analyze \
+	shell-completion/bash/systemd-delta \
 	shell-completion/bash/systemd-run \
 	shell-completion/bash/udevadm \
 	shell-completion/bash/kernel-install
diff --git a/shell-completion/bash/systemd-delta b/shell-completion/bash/systemd-delta
new file mode 100644
index 0000000..cb17328
--- /dev/null
+++ b/shell-completion/bash/systemd-delta
@@ -0,0 +1,61 @@
+# systemd-delta(1) completion                      -*- shell-script -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2014 Thomas H.P. Andersen
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
+__contains_word() {
+        local w word=$1; shift
+        for w in "$@"; do
+                [[ $w = "$word" ]] && return
+        done
+}
+
+_systemd-delta() {
+        local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
+        local comps
+
+        local -A OPTS=(
+               [STANDALONE]='--help -h --no-pager --version'
+                      [ARG]='--diff --type -t'
+        )
+
+        _init_completion || return
+
+
+        if __contains_word "$prev" ${OPTS[ARG]}; then
+                case $prev in
+                        --diff)
+                                comps='yes no'
+                        ;;
+                        --type|-t)
+                                comps='masked equivalent redirected overridden unchanged extended default'
+                        ;;
+                esac
+                COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
+                return 0
+        fi
+
+        if [[ "$cur" = -* ]]; then
+                COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
+                return 0
+        fi
+
+        COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
+        return 0
+}
+
+complete -F _systemd-delta systemd-delta

commit a3772fb0d46a99641b0713e669fcb47c364f20bd
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Tue Feb 18 21:09:05 2014 +0100

    machinectl: add bash completion
    
    (cherry picked from commit e56056e93d33619a3acf13e483900b4f8938228f)
    
    Default to --no-legend if !on_tty().
    
    Conflicts:
    	man/machinectl.xml
    	src/machine/machinectl.c

diff --git a/Makefile.am b/Makefile.am
index 6233a7f..033bbfa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3726,6 +3726,9 @@ machinectl_LDADD = \
 rootbin_PROGRAMS += \
 	machinectl
 
+dist_bashcompletion_DATA += \
+	shell-completion/bash/machinectl
+
 test_machine_tables_SOURCES = \
 	src/machine/test-machine-tables.c
 
diff --git a/man/machinectl.xml b/man/machinectl.xml
index bb88395..f00d212 100644
--- a/man/machinectl.xml
+++ b/man/machinectl.xml
@@ -130,6 +130,14 @@
                         </varlistentry>
 
                         <varlistentry>
+                                <term><option>--no-legend</option></term>
+
+                                <listitem><para>Do not print the legend,
+                                        i.e. the column headers and the
+                                        footer.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
                                 <term><option>--no-ask-password</option></term>
 
                                 <listitem><para>Do not query the user
diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl
new file mode 100644
index 0000000..3789492
--- /dev/null
+++ b/shell-completion/bash/machinectl
@@ -0,0 +1,97 @@
+# machinectl(1) completion                      -*- shell-script -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2014 Thomas H.P. Andersen
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
+__contains_word() {
+        local w word=$1; shift
+        for w in "$@"; do
+                [[ $w = "$word" ]] && return
+        done
+}
+
+__get_machines() {
+        local a b
+        machinectl list --no-legend --no-pager | { while read a b; do echo " $a"; done; };
+}
+
+_machinectl() {
+        local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
+        local i verb comps
+
+        local -A OPTS=(
+               [STANDALONE]='--all -a --full --help -h --no-ask-password --no-legend --no-pager --version'
+                      [ARG]='--host -H --kill-who -M --machine --property -p --signal -s'
+        )
+
+        local -A VERBS=(
+               [STANDALONE]='list'
+                 [MACHINES]='status show terminate kill reboot login'
+        )
+
+        _init_completion || return
+
+        for ((i=0; i <= COMP_CWORD; i++)); do
+                if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} &&
+                 ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
+                        verb=${COMP_WORDS[i]}
+                        break
+                fi
+        done
+
+        if __contains_word "$prev" ${OPTS[ARG]}; then
+                case $prev in
+                        --signal|-s)
+                                comps=$(compgen -A signal)
+                        ;;
+                        --kill-who)
+                                comps='all leader'
+                        ;;
+                        --host|-H)
+                                comps=$(compgen -A hostname)
+                        ;;
+                        --machine|-M)
+                                comps=$( __get_machines )
+                        ;;
+                        --property|-p)
+                                comps=''
+                        ;;
+                esac
+                COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
+                return 0
+        fi
+
+        if [[ "$cur" = -* ]]; then
+                COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
+                return 0
+        fi
+
+        if [[ -z $verb ]]; then
+                comps=${VERBS[*]}
+
+        elif __contains_word "$verb" ${VERBS[STANDALONE]}; then
+                comps=''
+
+        elif __contains_word "$verb" ${VERBS[MACHINES]}; then
+                comps=$( __get_machines )
+        fi
+
+        COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
+        return 0
+}
+
+complete -F _machinectl machinectl
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index 97c2193..88cf8d5 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -43,6 +43,7 @@ static char **arg_property = NULL;
 static bool arg_all = false;
 static bool arg_full = false;
 static bool arg_no_pager = false;
+static bool arg_legend = true;
 static const char *arg_kill_who = NULL;
 static int arg_signal = SIGTERM;
 static enum transport {
@@ -90,11 +91,11 @@ static int list_machines(DBusConnection *bus, char **args, unsigned n) {
                 return -EIO;
         }
 
-        dbus_message_iter_recurse(&iter, &sub);
-
-        if (on_tty())
+        if (arg_legend)
                 printf("%-32s %-9s %-16s\n", "MACHINE", "CONTAINER", "SERVICE");
 
+        dbus_message_iter_recurse(&iter, &sub);
+
         while (dbus_message_iter_get_arg_type(&sub) != DBUS_TYPE_INVALID) {
                 const char *name, *class, *service, *object;
 
@@ -120,7 +121,7 @@ static int list_machines(DBusConnection *bus, char **args, unsigned n) {
                 dbus_message_iter_next(&sub);
         }
 
-        if (on_tty())
+        if (arg_legend)
                 printf("\n%u machines listed.\n", k);
 
         return 0;
@@ -559,10 +560,12 @@ static int help(void) {
                "     --kill-who=WHO      Who to send signal to\n"
                "  -l --full              Do not ellipsize output\n"
                "  -s --signal=SIGNAL     Which signal to send\n"
-               "     --no-ask-password   Don't prompt for password\n"
                "  -H --host=[USER@]HOST  Show information for remote host\n"
                "  -P --privileged        Acquire privileges before execution\n"
-               "     --no-pager          Do not pipe output into a pager\n\n"
+               "     --no-pager          Do not pipe output into a pager\n"
+               "     --no-legend         Do not show the headers and footers\n"
+               "     --no-ask-password   Don't prompt for password\n\n"
+
                "Commands:\n"
                "  list                   List running VMs and containers\n"
                "  status [NAME...]       Show VM/container status\n"
@@ -579,6 +582,7 @@ static int parse_argv(int argc, char *argv[]) {
         enum {
                 ARG_VERSION = 0x100,
                 ARG_NO_PAGER,
+                ARG_NO_LEGEND,
                 ARG_KILL_WHO,
                 ARG_NO_ASK_PASSWORD,
         };
@@ -590,6 +594,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "all",             no_argument,       NULL, 'a'                 },
                 { "full",            no_argument,       NULL, 'l'                 },
                 { "no-pager",        no_argument,       NULL, ARG_NO_PAGER        },
+                { "no-legend",       no_argument,       NULL, ARG_NO_LEGEND       },
                 { "kill-who",        required_argument, NULL, ARG_KILL_WHO        },
                 { "signal",          required_argument, NULL, 's'                 },
                 { "host",            required_argument, NULL, 'H'                 },
@@ -645,6 +650,10 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_no_pager = true;
                         break;
 
+                case ARG_NO_LEGEND:
+                        arg_legend = false;
+                        break;
+
                 case ARG_NO_ASK_PASSWORD:
                         arg_ask_password = false;
                         break;
@@ -679,6 +688,9 @@ static int parse_argv(int argc, char *argv[]) {
                 }
         }
 
+        if (!on_tty())
+                arg_legend = false;
+
         return 1;
 }
 

commit 743b0038f679e6f8825594dd936f287404c4b1b6
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Feb 18 21:23:16 2014 +0100

    load-modules: properly return a failing error code if some module fails to load
    
    This is the missing part of b857193b1def5172e3641ca1d5bc9e08ae81aac4.
    
    (cherry picked from commit 4b462d1a28461b302586b117736ef288fba1012f)

diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c
index 9789398..ba7d417 100644
--- a/src/modules-load/modules-load.c
+++ b/src/modules-load/modules-load.c
@@ -306,9 +306,11 @@ int main(int argc, char *argv[]) {
                                 r = k;
                 }
 
-                r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
-                if (r < 0) {
-                        log_error("Failed to enumerate modules-load.d files: %s", strerror(-r));
+                k = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
+                if (k < 0) {
+                        log_error("Failed to enumerate modules-load.d files: %s", strerror(-k));
+                        if (r == 0)
+                                r = k;
                         goto finish;
                 }
 

commit 7e7ef00585dd145c6a66144ef8c71c99289ca07f
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Tue Feb 18 16:39:17 2014 +0100

    man: machinectl: there is no command 'kill-machine'
    
    (cherry picked from commit 773e264d13cac53cbf7e0b174e1883dabb4c9bc2)

diff --git a/man/machinectl.xml b/man/machinectl.xml
index 2ed9f2e..bb88395 100644
--- a/man/machinectl.xml
+++ b/man/machinectl.xml
@@ -141,7 +141,7 @@
                                 <term><option>--kill-who=</option></term>
 
                                 <listitem><para>When used with
-                                <command>kill-machine</command>,
+                                <command>kill</command>,
                                 choose which processes to kill. Must
                                 be one of <option>leader</option>, or
                                 <option>all</option> to select whether
@@ -156,7 +156,7 @@
                                 <term><option>--signal=</option></term>
 
                                 <listitem><para>When used with
-                                <command>kill-machine</command>, choose
+                                <command>kill</command>, choose
                                 which signal to send to selected
                                 processes. Must be one of the
                                 well-known signal specifiers, such as

commit 7aa2e98b2a8cf8720f957516a7ae368c8cd39d85
Author: Jan Engelhardt <jengelh at inai.de>
Date:   Mon Feb 17 03:58:37 2014 +0100

    doc: properly use XML entities
    
    (cherry picked from commit 3c8fa0fd0f99996088e42c5d48e164fdae4ada40)
    
    Conflicts:
    	man/sd_bus_error.xml

diff --git a/man/localtime.xml b/man/localtime.xml
index b7fd1ba..dbf2379 100644
--- a/man/localtime.xml
+++ b/man/localtime.xml
@@ -55,7 +55,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>/etc/localtime</filename> -> <filename>../usr/share/zoneinfo/…</filename></para>
+                <para><filename>/etc/localtime</filename> -> <filename>../usr/share/zoneinfo/…</filename></para>
         </refsynopsisdiv>
 
         <refsect1>

commit aaad88a2eb3a9be24b75e36aefbea9a77b9927b4
Author: Jan Engelhardt <jengelh at inai.de>
Date:   Mon Feb 17 02:49:45 2014 +0100

    doc: choose different words to improve clarity
    
    I suggest the following changes to improve the way the text reads
    ("flows").
    
    (cherry picked from commit dc968941bfc9be464e1df15afa05693dec3ec192)
    
    Conflicts:
    	man/crypttab.xml
    	man/sd_bus_creds_get_pid.xml
    	man/sd_bus_message_get_monotonic_usec.xml

diff --git a/man/crypttab.xml b/man/crypttab.xml
index 5f386e5..4b6d12e 100644
--- a/man/crypttab.xml
+++ b/man/crypttab.xml
@@ -171,7 +171,7 @@
                                 If the key slot does not match the given
                                 passphrase or key, but another would, the
                                 setup of the device will fail regardless.
-                                This implies <varname>luks</varname>. See
+                                This option implies <varname>luks</varname>. See
                                 <citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                                 for possible values. The default is to try
                                 all key slots in sequential order.</para></listitem>
@@ -275,7 +275,7 @@
                                 <term><varname>tcrypt-hidden</varname></term>
 
                                 <listitem><para>Use the hidden TrueCrypt volume.
-                                This implies <varname>tcrypt</varname>.</para>
+                                This option implies <varname>tcrypt</varname>.</para>
 
                                 <para>This will map the hidden volume that is
                                 inside of the volume provided in the second
diff --git a/src/journal/systemd-journal-feeder.py b/src/journal/systemd-journal-feeder.py
new file mode 100644
index 0000000..5cfab82
--- /dev/null
+++ b/src/journal/systemd-journal-feeder.py
@@ -0,0 +1,83 @@
+import argparse
+import subprocess
+import collections
+import struct
+from systemd import journal
+
+options = argparse.ArgumentParser()
+options.add_argument('-H', '--host', default='localhost')
+options.add_argument('-p', '--port', default=19531)
+options.add_argument('-b', '--boot', default='no',
+                     action='store_const', const='yes')
+options.add_argument('-f', '--follow', default='no',
+                     action='store_const', const='yes')
+options.add_argument('-s', '--submit', action='store_true')
+
+def spawn_curl(host, port, boot, follow):
+    "Spawn curl to get events from systemd-journal-gatewayd"
+    url = 'http://{host}:{port}/entries?follow={follow}&boot={boot}'.format(
+        host=host, port=port, follow=follow, boot=boot)
+    cmdline = ['curl', '-HAccept: application/vnd.fdo.journal',
+               '--silent', '--show-error',
+               url]
+    child = subprocess.Popen(cmdline,
+                             stdin=subprocess.DEVNULL,
+                             stdout=subprocess.PIPE)
+    return child
+
+def _read_one(inp):
+    fields = collections.OrderedDict()
+
+    while inp:
+        line = inp.readline()
+        line = line[:-1] # remove newline
+        if not line:
+            break
+        left, split, right = line.partition(b'=')
+        name = left.decode('ascii')
+        if split:
+            value = right.decode()
+        else:
+            flen_ = inp.read(8)
+            flen = struct.unpack('<lL', flen_)[0]
+            value = inp.read(flen)
+            newline = inp.read(1)
+            assert newline == b'\n', newline
+            name = name[:-1]
+        fields[name] = value
+
+    return fields
+
+def split_stream(stream):
+    "Parse journal events from stream"
+    while stream:
+        fields = _read_one(stream)
+        yield fields
+
+def cat_events(stream):
+    for event in split_stream(stream):
+        print('event MESSAGE=' + event.get('MESSAGE', '(no message)')
+              + ' ' + ','.join(event.keys()))
+
+def push_events(stream):
+    i = 0
+    for event in split_stream(stream):
+        #print(event)
+        v = [key.encode('utf-8') + b'=' + val
+             if isinstance(val, bytes)
+             else key + '=' + val
+             for key,val in event.items()]
+        print('\n'.join(v))
+        journal.sendv(*v)
+        i += 1
+        if i == 1:
+                break
+
+if __name__ == '__main__':
+    args = options.parse_args()
+    curl = spawn_curl(args.host, args.port,
+                      args.boot, args.follow)
+    if args.submit:
+        push_events(curl.stdout)
+    else:
+        cat_events(curl.stdout)

commit a7f8bd7d142ef6342e95be9a428df695a951034b
Author: Jan Engelhardt <jengelh at inai.de>
Date:   Mon Feb 17 03:37:18 2014 +0100

    doc: resolve missing/extraneous words or inappropriate forms
    
    Issues fixed:
    * missing words required by grammar
    * duplicated or extraneous words
    * inappropriate forms (e.g. singular/plural), and declinations
    * orthographic misspellings
    
    (cherry picked from commit 66f756d437658cc464bfb5647c97efd0cf77f933)
    
    Conflicts:
    	man/pam_systemd.xml
    	man/sd_bus_creds_get_pid.xml
    	man/sd_bus_error.xml
    	man/sd_bus_open_user.xml
    	man/systemctl.xml
    	man/systemd-nspawn.xml
    	man/systemd-system.conf.xml
    	man/systemd.exec.xml
    	man/udev.xml

diff --git a/man/busctl.xml b/man/busctl.xml
index 0c5f05a..854eb38 100644
--- a/man/busctl.xml
+++ b/man/busctl.xml
@@ -151,7 +151,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
           <term><option>--activatable</option></term>
 
           <listitem><para>When showing the list of endpoints, show
-          only endpoints which haven't actually been activated yet,
+          only endpoints which have actually not been activated yet,
           but may be started automatically if accessed.</para>
           </listitem>
       </varlistentry>
diff --git a/man/journalctl.xml b/man/journalctl.xml
index b695b3d..623d966 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -370,7 +370,7 @@
                                                         terse output only
                                                         showing the actual
                                                         message of each journal
-                                                        entry with no meta data,
+                                                        entry with no metadata,
                                                         not even a timestamp.
                                                         </para>
                                                 </listitem>
diff --git a/man/journald.conf.xml b/man/journald.conf.xml
index e0796e1..27c326e 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
@@ -269,12 +269,12 @@
                                 violated when systemd-journald is
                                 started, the value will be raised to
                                 percentage that is actually free. This
-                                means that if before there was enough
-                                free space and journal files were
+                                means that if there was enough
+                                free space before and journal files were
                                 created, and subsequently something
                                 else causes the file system to fill
                                 up, journald will stop using more
-                                space, but it'll will not removing
+                                space, but it will not be removing
                                 existing files to go reduce footprint
                                 either.</para>
 
diff --git a/man/machine-info.xml b/man/machine-info.xml
index ddf8f8b..7448e68 100644
--- a/man/machine-info.xml
+++ b/man/machine-info.xml
@@ -55,7 +55,7 @@
                 <title>Description</title>
 
                 <para>The <filename>/etc/machine-info</filename> file
-                contains machine meta data.</para>
+                contains machine metadata.</para>
 
                 <para>The basic file format of
                 <filename>machine-info</filename> is a
@@ -68,7 +68,7 @@
                 execution engine.</para>
 
                 <para><filename>/etc/machine-info</filename> contains
-                meta data about the machine that is set by the user or
+                metadata about the machine that is set by the user or
                 administrator.</para>
 
                 <para>Depending on the operating system other
@@ -84,7 +84,7 @@
         <refsect1>
                 <title>Options</title>
 
-                <para>The following machine meta data parameters may
+                <para>The following machine metadata parameters may
                 be set using
                 <filename>/etc/machine-info</filename>:</para>
 
diff --git a/man/sd_journal_print.xml b/man/sd_journal_print.xml
index a716cc3..871baff 100644
--- a/man/sd_journal_print.xml
+++ b/man/sd_journal_print.xml
@@ -203,7 +203,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 be guaranteed. Using
                 <function>sd_journal_print()</function> has the
                 benefit of logging source code line, filenames, and
-                functions as meta data along all entries, and
+                functions as metadata along all entries, and
                 guaranteeing chronological ordering with structured
                 log entries that are generated via
                 <function>sd_journal_send()</function>. Using
diff --git a/man/systemd-coredumpctl.xml b/man/systemd-coredumpctl.xml
index 286ff14..4318a2f 100644
--- a/man/systemd-coredumpctl.xml
+++ b/man/systemd-coredumpctl.xml
@@ -135,7 +135,7 @@
 
                                 <listitem><para>Extract the last coredump
                                 matching specified characteristics.
-                                Coredump will be written on standard output,
+                                The coredump will be written on standard output,
                                 unless an output file is specified with
                                 <option>-o/--output</option>.
                                 </para></listitem>
diff --git a/man/systemd-journald.service.xml b/man/systemd-journald.service.xml
index 0a20e21..4d2cb40 100644
--- a/man/systemd-journald.service.xml
+++ b/man/systemd-journald.service.xml
@@ -66,10 +66,10 @@
                 <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call, from standard input and standard error of system
                 services or via its native API. It will implicitly
-                collect numerous meta data fields for each log
+                collect numerous metadata fields for each log
                 messages in a secure and unfakeable way. See
                 <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
-                for more information about the collected meta data.
+                for more information about the collected metadata.
                 </para>
 
                 <para>Log data collected by the journal is primarily
diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
index 9a1a99f..6f36930 100644
--- a/man/systemd-system.conf.xml
+++ b/man/systemd-system.conf.xml
@@ -135,7 +135,7 @@
                                 <listitem><para>Configures the initial
                                 CPU affinity for the init
                                 process. Takes a space-separated list
-                                of CPU indexes.</para></listitem>
+                                of CPU indices.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml
index 0e49fa0..bb04694 100644
--- a/man/systemd-udevd.service.xml
+++ b/man/systemd-udevd.service.xml
@@ -83,7 +83,7 @@
         <term><option>--exec-delay=</option></term>
         <listitem>
           <para>Delay the execution of <varname>RUN</varname>
-          instruction by the given number of seconds. This option
+          instructions by the given number of seconds. This option
           might be useful when debugging system crashes during
           coldplug caused by loading non-working kernel
           modules.</para>
@@ -148,7 +148,7 @@
         <term><varname>udev.exec-delay=</varname></term>
         <term><varname>rd.udev.exec-delay=</varname></term>
         <listitem>
-          <para>Delay the execution of RUN instruction by the given
+          <para>Delay the execution of RUN instructions by the given
           number of seconds. This option might be useful when
           debugging system crashes during coldplug caused by loading
           non-working kernel modules.</para>
diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
index ae134f2..630a28c 100644
--- a/man/systemd.exec.xml
+++ b/man/systemd.exec.xml
@@ -248,7 +248,7 @@
                                 <listitem><para>Controls the CPU
                                 affinity of the executed
                                 processes. Takes a space-separated
-                                list of CPU indexes. This option may
+                                list of CPU indices. This option may
                                 be specified more than once in which
                                 case the specificed CPU affinity masks
                                 are merged. If the empty string is
diff --git a/man/systemd.journal-fields.xml b/man/systemd.journal-fields.xml
index bb89ed5..b492aae 100644
--- a/man/systemd.journal-fields.xml
+++ b/man/systemd.journal-fields.xml
@@ -529,7 +529,7 @@
                 JSON Format</ulink>, the addresses of journal entries
                 are serialized into fields prefixed with double
                 underscores. Note that these are not proper fields when
-                stored in the journal but for addressing meta data of
+                stored in the journal but for addressing metadata of
                 entries. They cannot be written as part of structured
                 log entries via calls such as
                 <citerefentry><refentrytitle>sd_journal_send</refentrytitle><manvolnum>3</manvolnum></citerefentry>. They
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
index 3e1dd88..67267b2 100644
--- a/man/systemd.socket.xml
+++ b/man/systemd.socket.xml
@@ -90,9 +90,9 @@
                 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 for more information about .service files). The name
                 of the .service unit is by default the same as the
-                name of the .socket unit, but can be altered with
+                name of the .socket unit, but can be altered with the
                 <option>Service=</option> option described below.
-                Depending on the setting of <option>Accept=</option>
+                Depending on the setting of the <option>Accept=</option>
                 option described below, this .service unit must either
                 be named like the .socket unit, but with the suffix
                 replaced, unless overridden with
@@ -135,7 +135,7 @@
                 <para>Socket units may be used to implement on-demand
                 starting of services, as well as parallelized starting
                 of services. See the blog stories linked at the end
-                for introduction.</para>
+                for an introduction.</para>
 
                 <para>Note that the daemon software configured for
                 socket activation with socket units needs to be able

commit e9511e0450e97fe28f66c231e347d64c9730f539
Author: Jan Engelhardt <jengelh at inai.de>
Date:   Mon Feb 17 03:37:13 2014 +0100

    doc: update punctuation
    
    Resolve spotted issues related to missing or extraneous commas, dashes.
    
    (cherry picked from commit 73e231abde39f22097df50542c745e01de879836)
    
    Conflicts:
    	man/journalctl.xml
    	man/sd_bus_error.xml
    	man/sd_bus_new.xml
    	man/systemctl.xml
    	man/systemd-networkd.service.xml
    	man/systemd-nspawn.xml
    	man/systemd-system.conf.xml
    	man/systemd.exec.xml
    	man/systemd.kill.xml
    	man/systemd.service.xml
    	man/systemd.timer.xml
    	src/backlight/backlight.c
    	src/core/cgroup.c
    	src/libsystemd/sd-bus/bus-kernel.c

diff --git a/man/journalctl.xml b/man/journalctl.xml
index d75c758..b695b3d 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -509,6 +509,7 @@
                                 and additional matches for messages
                                 from systemd and messages about
                                 coredumps for the specified unit.</para>
+
                                 <para>This parameter can be specified multiple times.
                                 </para></listitem>
                         </varlistentry>
diff --git a/man/systemd-cat.xml b/man/systemd-cat.xml
index 16a8eb4..e61a6ac 100644
--- a/man/systemd-cat.xml
+++ b/man/systemd-cat.xml
@@ -189,7 +189,7 @@
                 <para>Even though the two examples have very similar
                 effects the first is preferable since only one process
                 is running at a time, and both stdout and stderr are
-                captured while in the second example only stdout is
+                captured while in the second example, only stdout is
                 captured.</para>
         </refsect1>
 
diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml
index b3bca2f..0e49fa0 100644
--- a/man/systemd-udevd.service.xml
+++ b/man/systemd-udevd.service.xml
@@ -93,10 +93,10 @@
         <term><option>--resolve-names=</option></term>
         <listitem>
           <para>Specify when systemd-udevd should resolve names of users and groups.
-          When set to <option>early</option> (the default) names will be
+          When set to <option>early</option> (the default), names will be
           resolved when the rules are parsed.  When set to
-          <option>late</option> names will be resolved for every event.
-          When set to <option>never</option> names will never be resolved
+          <option>late</option>, names will be resolved for every event.
+          When set to <option>never</option>, names will never be resolved
           and all devices will be owned by root.</para>
         </listitem>
       </varlistentry>
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 0f4be71..4d672f0 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -748,27 +748,27 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 definitions can either be numeric exit
                                 codes or termination signal names,
                                 separated by spaces. For example:
-				<programlisting>SuccessExitStatus=1 2 8 <constant>SIGKILL</constant></programlisting>
-				ensures that exit codes 1, 2, 8 and
-				the termination signal
-				<constant>SIGKILL</constant> are
-				considered clean service terminations.
-			        </para>
-
-				<para>Note that if a process has a
-				signal handler installed and exits by
-				calling
-				<citerefentry><refentrytitle>_exit</refentrytitle><manvolnum>2</manvolnum></citerefentry>
-				in response to a signal, the
-				information about the signal is lost.
-				Programs should instead perform cleanup and kill themselves with the same signal instead. See
-				<ulink url="http://www.cons.org/cracauer/sigint.html">Proper handling of SIGINT/SIGQUIT — How to be a proper program</ulink>.</para>
-
-				<para>This option may appear more than once
-				in which case the list of successful
-				exit statuses is merged. If the empty
-				string is assigned to this option, the
-				list is reset, all prior assignments
+                                <programlisting>SuccessExitStatus=1 2 8 <constant>SIGKILL</constant></programlisting>
+                                ensures that exit codes 1, 2, 8 and
+                                the termination signal
+                                <constant>SIGKILL</constant> are
+                                considered clean service terminations.
+                                </para>
+
+                                <para>Note that if a process has a
+                                signal handler installed and exits by
+                                calling
+                                <citerefentry><refentrytitle>_exit</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+                                in response to a signal, the
+                                information about the signal is lost.
+                                Programs should instead perform cleanup and kill themselves with the same signal instead. See
+                                <ulink url="http://www.cons.org/cracauer/sigint.html">Proper handling of SIGINT/SIGQUIT — How to be a proper program</ulink>.</para>
+
+                                <para>This option may appear more than once,
+                                in which case the list of successful
+                                exit statuses is merged. If the empty
+                                string is assigned to this option, the
+                                list is reset, all prior assignments
                                 of this option will have no
                                 effect.</para></listitem>
                         </varlistentry>
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
index 39fba51..3e1dd88 100644
--- a/man/systemd.socket.xml
+++ b/man/systemd.socket.xml
@@ -84,7 +84,7 @@
                 which configure resource control settings for the
                 processes of the socket.</para>
 
-                <para>For each socket file a matching service file
+                <para>For each socket file, a matching service file
                 must exist, describing the service to start on
                 incoming traffic on the socket (see
                 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
@@ -254,7 +254,7 @@
                                 before the interface it is configured
                                 on is up and running, and even
                                 regardless of whether it will be up and
-                                running at any point. To deal with this
+                                running at any point. To deal with this,
                                 it is recommended to set the
                                 <varname>FreeBind=</varname> option
                                 described below.</para></listitem>
@@ -720,7 +720,7 @@
                                 <varname>Accept=no</varname>. It
                                 defaults to the service that bears the
                                 same name as the socket (with the
-                                suffix replaced). In most cases it
+                                suffix replaced). In most cases, it
                                 should not be necessary to use this
                                 option.</para></listitem>
                         </varlistentry>
diff --git a/man/systemd.special.xml b/man/systemd.special.xml
index 76bb5cd..8ccccc2 100644
--- a/man/systemd.special.xml
+++ b/man/systemd.special.xml
@@ -820,7 +820,7 @@
                 services. These targets are generally not part of the
                 initial boot transaction, unless they are explicitly
                 pulled in by one of the implementing services. Note
-                specifically, that these <emphasis>passive</emphasis>
+                specifically that these <emphasis>passive</emphasis>
                 target units are generally not pulled in by the
                 consumer of a service, but by the provider of the
                 service. This means: a consuming service should order
diff --git a/man/systemd.xml b/man/systemd.xml
index 23a0c26..76d977d 100644
--- a/man/systemd.xml
+++ b/man/systemd.xml
@@ -407,7 +407,7 @@
                 and ordering dependencies are placed between two
                 units. Also note that the majority of dependencies are
                 implicitly created and maintained by systemd. In most
-                cases it should be unnecessary to declare additional
+                cases, it should be unnecessary to declare additional
                 dependencies manually, however it is possible to do
                 this.</para>
 
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
index 154ffd9..4f7163d 100644
--- a/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules
@@ -33,7 +33,7 @@ KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{type}==
 
 # Run ata_id on non-removable USB Mass Storage (SATA/PATA disks in enclosures)
 KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", ATTR{removable}=="0", SUBSYSTEMS=="usb", IMPORT{program}="ata_id --export $devnode"
-# Otherwise fall back to using usb_id for USB devices
+# Otherwise, fall back to using usb_id for USB devices
 KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
 
 # scsi devices
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index ccd96b2..5b0be27 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -715,7 +715,7 @@ static int add_matches(sd_journal *j, char **args) {
                                         t = strappend("_COMM=", comm);
 
                                         /* Append _EXE only if the interpreter is not a link.
-                                           Otherwise it might be outdated often. */
+                                           Otherwise, it might be outdated often. */
                                         if (lstat(interpreter, &st) == 0 &&
                                             !S_ISLNK(st.st_mode)) {
                                                 t2 = strappend("_EXE=", interpreter);
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 46c3feb..f4af1f6 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -472,7 +472,7 @@ static int compare_entry_order(JournalFile *af, Object *_ao,
 
         if (sd_id128_equal(ao->entry.boot_id, bo->entry.boot_id)) {
 
-                /* If the boot id matches compare monotonic time */
+                /* If the boot id matches, compare monotonic time */
                 a = le64toh(ao->entry.monotonic);
                 b = le64toh(bo->entry.monotonic);
 
@@ -482,7 +482,7 @@ static int compare_entry_order(JournalFile *af, Object *_ao,
                         return 1;
         }
 
-        /* Otherwise compare UTC time */
+        /* Otherwise, compare UTC time */
         a = le64toh(ao->entry.realtime);
         b = le64toh(bo->entry.realtime);
 
diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c
index 8a4edda..3c64e62 100644
--- a/src/shared/cgroup-util.c
+++ b/src/shared/cgroup-util.c
@@ -1115,7 +1115,7 @@ int cg_mangle_path(const char *path, char **result) {
         assert(path);
         assert(result);
 
-        /* First check if it already is a filesystem path */
+        /* First, check if it already is a filesystem path */
         if (path_startswith(path, "/sys/fs/cgroup")) {
 
                 t = strdup(path);
@@ -1127,7 +1127,7 @@ int cg_mangle_path(const char *path, char **result) {
                 return 0;
         }
 
-        /* Otherwise treat it as cg spec */
+        /* Otherwise, treat it as cg spec */
         r = cg_split_spec(path, &c, &p);
         if (r < 0)
                 return r;
diff --git a/src/udev/udev-builtin-usb_id.c b/src/udev/udev-builtin-usb_id.c
index 1b9f824..883e11e 100644
--- a/src/udev/udev-builtin-usb_id.c
+++ b/src/udev/udev-builtin-usb_id.c
@@ -219,9 +219,9 @@ static int dev_if_packed_info(struct udev_device *dev, char *ifs_str, size_t len
  * A unique USB identification is generated like this:
  *
  * 1.) Get the USB device type from InterfaceClass and InterfaceSubClass
- * 2.) If the device type is 'Mass-Storage/SPC-2' or 'Mass-Storage/RBC'
+ * 2.) If the device type is 'Mass-Storage/SPC-2' or 'Mass-Storage/RBC',
  *     use the SCSI vendor and model as USB-Vendor and USB-model.
- * 3.) Otherwise use the USB manufacturer and product as
+ * 3.) Otherwise, use the USB manufacturer and product as
  *     USB-Vendor and USB-model. Any non-printable characters
  *     in those strings will be skipped; a slash '/' will be converted
  *     into a full stop '.'.

commit 878ca1ee66efe252c3dee848ef874ca6a6f78f5b
Author: Jan Engelhardt <jengelh at inai.de>
Date:   Sun Feb 16 13:58:18 2014 +0100

    core: more exact test on the procfs special string "(deleted)"
    
    In other parts of systemd, the code checks for " (deleted)",
    but in one instance, it did not (yet). Make it do the same.
    
    (cherry picked from commit a87f0f726ca6dc9fde11eea6591a244e77d2d182)

diff --git a/src/core/umount.c b/src/core/umount.c
index 99dbe27..fbd7e1c 100644
--- a/src/core/umount.c
+++ b/src/core/umount.c
@@ -170,7 +170,7 @@ static int swap_list_get(MountPoint **head) {
                         continue;
                 }
 
-                if (endswith(dev, "(deleted)")) {
+                if (endswith(dev, " (deleted)")) {
                         free(dev);
                         continue;
                 }

commit 39899c866206a14dfdd19497763c84ea19f15f8a
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Feb 17 01:58:33 2014 +0100

    core: fix property changes in transient units
    
    (cherry picked from commit 6d2357247b198314d972932415d65a42f83a9b6e)

diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index 2ea59b2..a185f5c 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -962,9 +962,6 @@ int bus_unit_set_properties(
         assert(u);
         assert(iter);
 
-        if (u->transient)
-                mode &= UNIT_RUNTIME;
-
         /* We iterate through the array twice. First run we just check
          * if all passed data is valid, second run actually applies
          * it. This is to implement transaction-like behaviour without
diff --git a/src/core/unit.c b/src/core/unit.c
index 49833d1..8e2a7c4 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2785,7 +2785,6 @@ static int drop_in_file(Unit *u, UnitSetPropertiesMode mode, const char *name, c
         assert(name);
         assert(_p);
         assert(_q);
-        assert(mode & (UNIT_PERSISTENT|UNIT_RUNTIME));
 
         b = xescape(name, "/.");
         if (!b)
@@ -2804,7 +2803,7 @@ static int drop_in_file(Unit *u, UnitSetPropertiesMode mode, const char *name, c
                         return -ENOENT;
 
                 p = strjoin(c, "/", u->id, ".d", NULL);
-        } else if (mode & UNIT_PERSISTENT)
+        } else if (mode == UNIT_PERSISTENT && !u->transient)
                 p = strjoin("/etc/systemd/system/", u->id, ".d", NULL);
         else
                 p = strjoin("/run/systemd/system/", u->id, ".d", NULL);
@@ -2830,7 +2829,7 @@ int unit_write_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *name, co
         assert(name);
         assert(data);
 
-        if (!(mode & (UNIT_PERSISTENT|UNIT_RUNTIME)))
+        if (!IN_SET(mode, UNIT_PERSISTENT, UNIT_RUNTIME))
                 return 0;
 
         r = drop_in_file(u, mode, name, &p, &q);
@@ -2850,7 +2849,7 @@ int unit_write_drop_in_format(Unit *u, UnitSetPropertiesMode mode, const char *n
         assert(name);
         assert(format);
 
-        if (!(mode & (UNIT_PERSISTENT|UNIT_RUNTIME)))
+        if (!IN_SET(mode, UNIT_PERSISTENT, UNIT_RUNTIME))
                 return 0;
 
         va_start(ap, format);
@@ -2873,7 +2872,7 @@ int unit_write_drop_in_private(Unit *u, UnitSetPropertiesMode mode, const char *
         if (!UNIT_VTABLE(u)->private_section)
                 return -EINVAL;
 
-        if (!(mode & (UNIT_PERSISTENT|UNIT_RUNTIME)))
+        if (!IN_SET(mode, UNIT_PERSISTENT, UNIT_RUNTIME))
                 return 0;
 
         ndata = strjoin("[", UNIT_VTABLE(u)->private_section, "]\n", data, NULL);
@@ -2892,7 +2891,7 @@ int unit_write_drop_in_private_format(Unit *u, UnitSetPropertiesMode mode, const
         assert(name);
         assert(format);
 
-        if (!(mode & (UNIT_PERSISTENT|UNIT_RUNTIME)))
+        if (!IN_SET(mode, UNIT_PERSISTENT, UNIT_RUNTIME))
                 return 0;
 
         va_start(ap, format);
@@ -2911,7 +2910,7 @@ int unit_remove_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *name) {
 
         assert(u);
 
-        if (!(mode & (UNIT_PERSISTENT|UNIT_RUNTIME)))
+        if (!IN_SET(mode, UNIT_PERSISTENT, UNIT_RUNTIME))
                 return 0;
 
         r = drop_in_file(u, mode, name, &p, &q);

commit edc8c0565efe09c404e0588fcdb1027b1c61faa8
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Dec 2 23:08:25 2013 +0100

    macro: add a macro to test whether a value is in a specified list
    
    Introduce IN_SET() macro to nicely check whether a value a is one of a
    few listed values.
    
    This makes writing this:
    
            if (a == 1 || a == 7 || a == 8 || a == 9)
    
    nicer, by allowing this:
    
            if (IN_SET(a, 1, 7, 8, 9))
    
    This is particularly useful for state machine enums.
    
    (cherry picked from commit cabb78068899232c152f4585f19d023e373aa73d)

diff --git a/src/shared/macro.h b/src/shared/macro.h
index bc5b3c1..5f3e522 100644
--- a/src/shared/macro.h
+++ b/src/shared/macro.h
@@ -294,4 +294,17 @@ do {                                                                    \
 #define SET_FLAG(v, flag, b) \
         (v) = (b) ? ((v) | (flag)) : ((v) & ~(flag))
 
+#define IN_SET(x, ...) ({                                               \
+        typeof(x) _x = (x);                                             \
+        unsigned _i;                                                    \
+        bool _found = false;                                            \
+        for (_i = 0; _i < sizeof((typeof(_x)[]) { __VA_ARGS__ })/sizeof(typeof(_x)); _i++) \
+                if (((typeof(_x)[]) { __VA_ARGS__ })[_i] == _x) {       \
+                        _found = true;                                  \
+                        break;                                          \
+                }                                                       \
+        _found;                                                         \
+        })
+
+
 #include "log.h"
diff --git a/src/test/test-util.c b/src/test/test-util.c
index c5762ed..7566adc 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -591,6 +591,16 @@ static void test_get_files_in_directory(void) {
         assert_se(get_files_in_directory(".", NULL) >= 0);
 }
 
+static void test_in_set(void) {
+        assert_se(IN_SET(1, 1));
+        assert_se(IN_SET(1, 1, 2, 3, 4));
+        assert_se(IN_SET(2, 1, 2, 3, 4));
+        assert_se(IN_SET(3, 1, 2, 3, 4));
+        assert_se(IN_SET(4, 1, 2, 3, 4));
+        assert_se(!IN_SET(0, 1));
+        assert_se(!IN_SET(0, 1, 2, 3, 4));
+}
+
 int main(int argc, char *argv[]) {
         test_streq_ptr();
         test_first_word();
@@ -628,6 +638,7 @@ int main(int argc, char *argv[]) {
         test_split_pair();
         test_fstab_node_to_udev_node();
         test_get_files_in_directory();
+        test_in_set();
 
         return 0;
 }

commit 05b3ce6df1c334f91f5b62dd547062dd6986c80a
Author: Jason St. John <jstjohn at purdue.edu>
Date:   Fri Feb 14 22:07:22 2014 -0500

    man: use spaces instead of tabs
    
    Several sections of the man pages included intermixed tabs and spaces;
    this commit replaces all tabs with spaces.
    
    (cherry picked from commit b200a92cdc47b204e2ed7fbdd1eaf15abfd019c6)
    
    Conflicts:
    	man/crypttab.xml
    	man/sd_bus_creds_get_pid.xml
    	man/systemd.service.xml

diff --git a/man/systemd-delta.xml b/man/systemd-delta.xml
index f802aa5..23fb8d1 100644
--- a/man/systemd-delta.xml
+++ b/man/systemd-delta.xml
@@ -50,8 +50,8 @@
         <refsynopsisdiv>
                 <cmdsynopsis>
                         <command>systemd-delta</command>
-			<arg choice="opt" rep="repeat">OPTIONS</arg>
-			<arg choice="opt" rep="repeat"><replaceable>PREFIX</replaceable><optional>/<replaceable>SUFFIX</replaceable></optional>|<replaceable>SUFFIX</replaceable></arg>
+                        <arg choice="opt" rep="repeat">OPTIONS</arg>
+                        <arg choice="opt" rep="repeat"><replaceable>PREFIX</replaceable><optional>/<replaceable>SUFFIX</replaceable></optional>|<replaceable>SUFFIX</replaceable></arg>
                 </cmdsynopsis>
         </refsynopsisdiv>
 
@@ -78,27 +78,27 @@
                 the name of the main configuration file, must match).
                 For a fuller explanation, see
                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
-		</para>
-
-		<para>The command line argument will be split into a
-		prefix and a suffix. Either is optional. The prefix
-		must be one of the directories containing
-		configuration files (<filename>/etc</filename>,
-		<filename>/run</filename>,
-		<filename>/usr/lib</filename>, ...). If it is given,
-		only overriding files contained in this directory will
-		be shown. Otherwise, all overriding files will be
-		shown. The suffix must be a name of a subdirectory
-		containing configuration files like
-		<filename>tmpfiles.d</filename>,
-		<filename>sysctl.d</filename> or
-		<filename>systemd/system</filename>. If it is given,
-		only configuration files in this subdirectory (across
-		all configuration paths) will be analyzed. Otherwise,
-		all configuration files will be analyzed. If the
-		commandline argument is not given at all, all
-		configuration files will be analyzed. See below for
-		some examples.</para>
+                </para>
+
+                <para>The command line argument will be split into a
+                prefix and a suffix. Either is optional. The prefix
+                must be one of the directories containing
+                configuration files (<filename>/etc</filename>,
+                <filename>/run</filename>,
+                <filename>/usr/lib</filename>, ...). If it is given,
+                only overriding files contained in this directory will
+                be shown. Otherwise, all overriding files will be
+                shown. The suffix must be a name of a subdirectory
+                containing configuration files like
+                <filename>tmpfiles.d</filename>,
+                <filename>sysctl.d</filename> or
+                <filename>systemd/system</filename>. If it is given,
+                only configuration files in this subdirectory (across
+                all configuration paths) will be analyzed. Otherwise,
+                all configuration files will be analyzed. If the
+                commandline argument is not given at all, all
+                configuration files will be analyzed. See below for
+                some examples.</para>
         </refsect1>
 
         <refsect1>
@@ -200,21 +200,21 @@
                 </variablelist>
         </refsect1>
 
-	<refsect1>
-		<title>Examples</title>
+        <refsect1>
+                <title>Examples</title>
 
-		<para>To see all local configuration:</para>
-		<programlisting>systemd-delta</programlisting>
+                <para>To see all local configuration:</para>
+                <programlisting>systemd-delta</programlisting>
 
-		<para>To see all runtime configuration:</para>
-		<programlisting>systemd-delta /run</programlisting>
+                <para>To see all runtime configuration:</para>
+                <programlisting>systemd-delta /run</programlisting>
 
-		<para>To see all system unit configuration changes:</para>
-		<programlisting>systemd-delta systemd/system</programlisting>
+                <para>To see all system unit configuration changes:</para>
+                <programlisting>systemd-delta systemd/system</programlisting>
 
-		<para>To see all runtime "drop-in" changes for system units:</para>
-		<programlisting>systemd-delta --type=extended /run/systemd/system</programlisting>
-	</refsect1>
+                <para>To see all runtime "drop-in" changes for system units:</para>
+                <programlisting>systemd-delta --type=extended /run/systemd/system</programlisting>
+        </refsect1>
 
         <refsect1>
                 <title>Exit status</title>
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index c116a9b..0f4be71 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -769,8 +769,8 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
 				exit statuses is merged. If the empty
 				string is assigned to this option, the
 				list is reset, all prior assignments
-				of this option will have no
-				effect.</para></listitem>
+                                of this option will have no
+                                effect.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
index da0f2aa..39fba51 100644
--- a/man/systemd.socket.xml
+++ b/man/systemd.socket.xml
@@ -121,16 +121,16 @@
                 boot or late system shutdown should disable this
                 option.</para>
 
-		<para>Socket units will have a
-		<varname>Before=</varname> dependency on the service
-		which they trigger added implicitly. No implicit
-		<varname>WantedBy=</varname> or
-		<varname>RequiredBy=</varname> dependency from the
-		socket to the service is added. This means that the
-		service may be started without the socket, in which
-		case it must be able to open sockets by itself. To
-		prevent this, an explicit <varname>Requires=</varname>
-		dependency may be added.</para>
+                <para>Socket units will have a
+                <varname>Before=</varname> dependency on the service
+                which they trigger added implicitly. No implicit
+                <varname>WantedBy=</varname> or
+                <varname>RequiredBy=</varname> dependency from the
+                socket to the service is added. This means that the
+                service may be started without the socket, in which
+                case it must be able to open sockets by itself. To
+                prevent this, an explicit <varname>Requires=</varname>
+                dependency may be added.</para>
 
                 <para>Socket units may be used to implement on-demand
                 starting of services, as well as parallelized starting

commit cd93a7ed60d621631e242d0654f21b7cc88b2e08
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Fri Feb 14 22:00:06 2014 -0500

    man: replace STDOUT with standard output, etc.
    
    Actually 'STDOUT' is something that doesn't appear anywhere: in the
    stdlib we have 'stdin', and there's only the constant STDOUT_FILENO,
    so there's no reason to use capitals. When refering to code,
    STDOUT/STDOUT/STDERR are replaced with stdin/stdout/stderr, and in
    other places they are replaced with normal phrases like standard
    output, etc.
    
    (cherry picked from commit 6db2742802b70938f0f2d373110ed734d4fb9813)
    
    Conflicts:
    	man/systemctl.xml
    	man/systemd-bus-proxyd.xml

diff --git a/man/daemon.xml b/man/daemon.xml
index 17d9dd6..26ba600 100644
--- a/man/daemon.xml
+++ b/man/daemon.xml
@@ -74,8 +74,8 @@
 
                         <orderedlist>
                                 <listitem><para>Close all open file
-                                descriptors except STDIN, STDOUT,
-                                STDERR (i.e. the first three file
+                                descriptors except stdin, stdout,
+                                stderr (i.e. the first three file
                                 descriptors 0, 1, 2). This ensures
                                 that no accidentally passed file
                                 descriptor stays around in the daemon
@@ -128,8 +128,8 @@
 
                                 <listitem><para>In the daemon process,
                                 connect <filename>/dev/null</filename>
-                                to STDIN, STDOUT,
-                                STDERR.</para></listitem>
+                                to standard input, output, and error.
+                                </para></listitem>
 
                                 <listitem><para>In the daemon process,
                                 reset the umask to 0, so that the file
@@ -223,15 +223,16 @@
                         service.</para>
 
                         <para>Note that new-style init systems
-                        guarantee execution of daemon processes in
-                        a clean process context: it is guaranteed that
+                        guarantee execution of daemon processes in a
+                        clean process context: it is guaranteed that
                         the environment block is sanitized, that the
                         signal handlers and mask is reset and that no
                         left-over file descriptors are passed. Daemons
-                        will be executed in their own session, and
-                        STDIN/STDOUT/STDERR connected to
+                        will be executed in their own session, with
+                        standard input/output/error connected to
                         <filename>/dev/null</filename> unless
-                        otherwise configured. The umask is reset.</para>
+                        otherwise configured. The umask is reset.
+                        </para>
 
                         <para>It is recommended for new-style daemons
                         to implement the following:</para>
@@ -324,7 +325,7 @@
                                 <listitem><para>Instead of using the
                                 <function>syslog()</function> call to log directly to the
                                 system syslog service, a new-style daemon may
-                                choose to simply log to STDERR via
+                                choose to simply log to standard error via
                                 <function>fprintf()</function>, which is then forwarded to
                                 syslog by the init system. If log
                                 priorities are necessary, these can be
diff --git a/man/sd-daemon.xml b/man/sd-daemon.xml
index b48eac9..555d1ac 100644
--- a/man/sd-daemon.xml
+++ b/man/sd-daemon.xml
@@ -96,7 +96,7 @@
 #define SD_DEBUG   "<7>"  /* debug-level messages */</programlisting>
 
                 <para>These prefixes are intended to be used in
-                conjunction with STDERR-based logging as implemented
+                conjunction with stderr-based logging as implemented
                 by systemd. If a systemd service definition file is
                 configured with <varname>StandardError=syslog</varname>
                 or <varname>StandardError=kmsg</varname>, these
diff --git a/man/sd_journal_stream_fd.xml b/man/sd_journal_stream_fd.xml
index a8dc8fd..646fe15 100644
--- a/man/sd_journal_stream_fd.xml
+++ b/man/sd_journal_stream_fd.xml
@@ -69,8 +69,8 @@
                 messages written to this file descriptor as simple
                 newline-separated text strings are written to the
                 journal. This file descriptor can be used internally
-                by applications or be made STDOUT/STDERR of other
-                processes executed.</para>
+                by applications or be made standard output or standard
+                error of other processes executed.</para>
 
                 <para><function>sd_journal_stream_fd()</function>
                 takes a short program identifier string as first
diff --git a/man/systemctl.xml b/man/systemctl.xml
index cde1694..d4048a8 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -666,21 +666,23 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
 
           <listitem>
             <para>Check whether any of the specified units are active
-            (i.e. running). Returns an exit code 0 if at least one is
-            active, non-zero otherwise. Unless <option>--quiet</option>
-            is specified, this will also print the current unit state to
-            STDOUT.</para>
+            (i.e. running). Returns an exit code
+            <constant>0</constant> if at least one is active, or
+            non-zero otherwise. Unless <option>--quiet</option> is
+            specified, this will also print the current unit state to
+            standard output.</para>
           </listitem>
         </varlistentry>
         <varlistentry>
           <term><command>is-failed <replaceable>NAME</replaceable>...</command></term>
 
           <listitem>
-            <para>Check whether any of the specified units are in a "failed" state.
-            Returns an exit code 0 if at least one has failed, non-zero
-            otherwise. Unless <option>--quiet</option> is specified, this
-            will also print the current unit state to
-            STDOUT.</para>
+            <para>Check whether any of the specified units are in a
+            "failed" state. Returns an exit code
+            <constant>0</constant> if at least one has failed,
+            non-zero otherwise. Unless <option>--quiet</option> is
+            specified, this will also print the current unit state to
+            standard output.</para>
           </listitem>
         </varlistentry>
         <varlistentry>
@@ -1069,9 +1071,10 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
           <listitem>
             <para>Create a snapshot. If a snapshot name is specified,
             the new snapshot will be named after it. If none is
-            specified, an automatic snapshot name is generated. In either
-            case, the snapshot name used is printed to STDOUT, unless
-            <option>--quiet</option> is specified.</para>
+            specified, an automatic snapshot name is generated. In
+            either case, the snapshot name used is printed to standard
+            output, unless <option>--quiet</option> is specified.
+            </para>
 
             <para>A snapshot refers to a saved state of the systemd
             manager. It is implemented itself as a unit that is
diff --git a/man/systemd-ask-password.xml b/man/systemd-ask-password.xml
index 79902cb..db5cb20 100644
--- a/man/systemd-ask-password.xml
+++ b/man/systemd-ask-password.xml
@@ -60,7 +60,7 @@
                 used to query a system password or passphrase from the
                 user, using a question message specified on the
                 command line. When run from a TTY it will query a
-                password on the TTY and print it to STDOUT. When run
+                password on the TTY and print it to standard output. When run
                 with no TTY or with <option>--no-tty</option> it will
                 query the password system-wide and allow active users
                 to respond via several agents. The latter is
diff --git a/man/systemd-cat.xml b/man/systemd-cat.xml
index ba7a2cf..16a8eb4 100644
--- a/man/systemd-cat.xml
+++ b/man/systemd-cat.xml
@@ -60,18 +60,18 @@
                 <title>Description</title>
 
                 <para><command>systemd-cat</command> may be used to
-                connect STDOUT and STDERR of a process with the
+                connect the standard input and output of a process to the
                 journal, or as a filter tool in a shell pipeline to
                 pass the output the previous pipeline element
                 generates to the journal.</para>
 
                 <para>If no parameter is passed,
                 <command>systemd-cat</command> will write
-                everything it reads from standard input (STDIN) to the journal.</para>
+                everything it reads from standard input (stdin) to the journal.</para>
 
                 <para>If parameters are passed, they are executed as
-                command line with standard output (STDOUT) and standard
-                error output (STDERR) connected to the journal, so
+                command line with standard output (stdout) and standard
+                error output (stderr) connected to the journal, so
                 that all it writes is stored in the journal.</para>
         </refsect1>
 
@@ -169,7 +169,7 @@
                         <title>Invoke a program</title>
 
                         <para>This calls <filename noindex='true'>/bin/ls</filename>
-                        with STDOUT/STDERR connected to the
+                        with standard output and error connected to the
                         journal:</para>
 
                         <programlisting># systemd-cat ls</programlisting>
@@ -188,8 +188,8 @@
 
                 <para>Even though the two examples have very similar
                 effects the first is preferable since only one process
-                is running at a time, and both STDOUT and STDERR are
-                captured while in the second example only STDOUT is
+                is running at a time, and both stdout and stderr are
+                captured while in the second example only stdout is
                 captured.</para>
         </refsect1>
 
diff --git a/man/systemd-coredumpctl.xml b/man/systemd-coredumpctl.xml
index c096f6d..286ff14 100644
--- a/man/systemd-coredumpctl.xml
+++ b/man/systemd-coredumpctl.xml
@@ -135,8 +135,8 @@
 
                                 <listitem><para>Extract the last coredump
                                 matching specified characteristics.
-                                Coredump will be written on STDOUT, unless
-                                an output file is specified with
+                                Coredump will be written on standard output,
+                                unless an output file is specified with
                                 <option>-o/--output</option>.
                                 </para></listitem>
                         </varlistentry>
diff --git a/man/systemd-journald.service.xml b/man/systemd-journald.service.xml
index 2f877f5..0a20e21 100644
--- a/man/systemd-journald.service.xml
+++ b/man/systemd-journald.service.xml
@@ -59,15 +59,15 @@
                 <title>Description</title>
 
                 <para><filename>systemd-journald</filename> is a
-                system service that collects and stores logging
-                data. It creates and maintains structured, indexed
-                journals based on logging information that is received
-                from the kernel, from user processes via the libc
+                system service that collects and stores logging data.
+                It creates and maintains structured, indexed journals
+                based on logging information that is received from the
+                kernel, from user processes via the libc
                 <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-                call, from STDOUT/STDERR of system services or via its
-                native API. It will implicitly collect numerous meta
-                data fields for each log messages in a secure and
-                unfakeable way. See
+                call, from standard input and standard error of system
+                services or via its native API. It will implicitly
+                collect numerous meta data fields for each log
+                messages in a secure and unfakeable way. See
                 <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                 for more information about the collected meta data.
                 </para>
diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml
index 50a1076..b3bca2f 100644
--- a/man/systemd-udevd.service.xml
+++ b/man/systemd-udevd.service.xml
@@ -70,7 +70,7 @@
       <varlistentry>
         <term><option>--debug</option></term>
         <listitem>
-          <para>Print debug messages to STDERR.</para>
+          <para>Print debug messages to standard error.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
@@ -82,10 +82,11 @@
       <varlistentry>
         <term><option>--exec-delay=</option></term>
         <listitem>
-          <para>Delay the execution of RUN instruction by the given
-          number of seconds. This option might be useful when
-          debugging system crashes during coldplug caused by loading
-          non-working kernel modules.</para>
+          <para>Delay the execution of <varname>RUN</varname>
+          instruction by the given number of seconds. This option
+          might be useful when debugging system crashes during
+          coldplug caused by loading non-working kernel
+          modules.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
index 5ba1aac..ae134f2 100644
--- a/man/systemd.exec.xml
+++ b/man/systemd.exec.xml
@@ -472,9 +472,9 @@
                         <varlistentry>
                                 <term><varname>StandardError=</varname></term>
                                 <listitem><para>Controls where file
-                                descriptor 2 (STDERR) of the executed
-                                processes is connected to. The
-                                available options are identical to
+                                descriptor 2 (standard error) of the
+                                executed processes is connected to.
+                                The available options are identical to
                                 those of
                                 <varname>StandardOutput=</varname>,
                                 with one exception: if set to
@@ -491,8 +491,8 @@
                         <varlistentry>
                                 <term><varname>TTYPath=</varname></term>
                                 <listitem><para>Sets the terminal
-                                device node to use if STDIN, STDOUT,
-                                or STDERR are connected to a
+                                device node to use if standard input, output,
+                                or error are connected to a
                                 TTY (see above). Defaults to
                                 <filename>/dev/console</filename>.</para></listitem>
                         </varlistentry>
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index d23904e..c116a9b 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -858,7 +858,7 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 for all file descriptors passed via
                                 socket-based activation. If true, all
                                 file descriptors >= 3 (i.e. all except
-                                STDIN/STDOUT/STDERR) will have
+                                stdin, stdout, and stderr) will have
                                 the <constant>O_NONBLOCK</constant> flag
                                 set and hence are in
                                 non-blocking mode. This option is only
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
index 570a6fb..da0f2aa 100644
--- a/man/systemd.socket.xml
+++ b/man/systemd.socket.xml
@@ -144,8 +144,8 @@
                 <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 for details) or via the traditional
                 <citerefentry><refentrytitle>inetd</refentrytitle><manvolnum>8</manvolnum></citerefentry>-style
-                socket passing (i.e. sockets passed in via STDIN and
-                STDOUT, using <varname>StandardInput=socket</varname>
+                socket passing (i.e. sockets passed in via standard input and
+                output, using <varname>StandardInput=socket</varname>
                 in the service file).</para>
         </refsect1>
 
diff --git a/man/udev.xml b/man/udev.xml
index 82e7478..25a3ea9 100644
--- a/man/udev.xml
+++ b/man/udev.xml
@@ -255,7 +255,7 @@
             <para>Execute a program to determine whether there
             is a match; the key is true if the program returns
             successfully. The device properties are made available to the
-            executed program in the environment. The program's STDOUT
+            executed program in the environment. The program's standard ouput
             is available in the <varname>RESULT</varname> key.</para>
             <para>This can only be used for very short-running foreground tasks. For details,
             see <varname>RUN</varname>.</para>
diff --git a/man/udevadm.xml b/man/udevadm.xml
index 32bf480..b172266 100644
--- a/man/udevadm.xml
+++ b/man/udevadm.xml
@@ -72,7 +72,7 @@
       <varlistentry>
         <term><option>--debug</option></term>
         <listitem>
-          <para>Print debug messages to STDERR.</para>
+          <para>Print debug messages to standard error.</para>
         </listitem>
       </varlistentry>
       <varlistentry>

commit 4f6569d919c82aff74e4cfe40f988585f7d3d133
Author: Jason St. John <jstjohn at purdue.edu>
Date:   Thu Feb 13 20:25:23 2014 -0500

    man: fix grammatical errors and other formatting issues
    
    * standardize capitalization of STDIN, STDOUT, and STDERR
    * reword some sentences for clarity
    * reflow some very long lines to be shorter than ~80 characters
    * add some missing <literal>, <constant>, <varname>, <option>, and <filename> tags
    
    (cherry picked from commit bcddd5bf8033b0c9cb15a9d017b7714ebe21473a)
    
    Conflicts:
    	man/systemd-bus-proxyd.xml
    	man/systemd.service.xml
    	man/udev.xml

diff --git a/man/systemd-coredumpctl.xml b/man/systemd-coredumpctl.xml
index 67f75d1..c096f6d 100644
--- a/man/systemd-coredumpctl.xml
+++ b/man/systemd-coredumpctl.xml
@@ -135,7 +135,7 @@
 
                                 <listitem><para>Extract the last coredump
                                 matching specified characteristics.
-                                Coredump will be written on stdout, unless
+                                Coredump will be written on STDOUT, unless
                                 an output file is specified with
                                 <option>-o/--output</option>.
                                 </para></listitem>
@@ -200,8 +200,8 @@
 
         <refsect1>
                 <title>Exit status</title>
-                <para>On success, 0 is returned, a non-zero failure
-                code otherwise. Not finding any matching coredumps is treated
+                <para>On success, 0 is returned; otherwise, a non-zero failure
+                code is returned. Not finding any matching coredumps is treated
                 as failure.
                 </para>
         </refsect1>
diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml
index 7fce300..50a1076 100644
--- a/man/systemd-udevd.service.xml
+++ b/man/systemd-udevd.service.xml
@@ -70,7 +70,7 @@
       <varlistentry>
         <term><option>--debug</option></term>
         <listitem>
-          <para>Print debug messages to stderr.</para>
+          <para>Print debug messages to STDERR.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
@@ -82,7 +82,6 @@
       <varlistentry>
         <term><option>--exec-delay=</option></term>
         <listitem>
-
           <para>Delay the execution of RUN instruction by the given
           number of seconds. This option might be useful when
           debugging system crashes during coldplug caused by loading
@@ -158,7 +157,7 @@
         <term><varname>net.ifnames=</varname></term>
         <listitem>
           <para>Network interfaces are renamed to give them predictable names
-          when possible. It is enabled by default, specifying 0 disables it.</para>
+          when possible. It is enabled by default; specifying 0 disables it.</para>
         </listitem>
       </varlistentry>
     </variablelist>
diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
index c8414d4..5ba1aac 100644
--- a/man/systemd.exec.xml
+++ b/man/systemd.exec.xml
@@ -491,8 +491,8 @@
                         <varlistentry>
                                 <term><varname>TTYPath=</varname></term>
                                 <listitem><para>Sets the terminal
-                                device node to use if standard input,
-                                output or stderr are connected to a
+                                device node to use if STDIN, STDOUT,
+                                or STDERR are connected to a
                                 TTY (see above). Defaults to
                                 <filename>/dev/console</filename>.</para></listitem>
                         </varlistentry>
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index e8bb02c..d23904e 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -103,7 +103,7 @@
                 script. This is useful for compatibility with
                 SysV. Note that this compatibility is quite
                 comprehensive but not 100%. For details about the
-                incompatibilities see the <ulink
+                incompatibilities, see the <ulink
                 url="http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities">Incompatibilities
                 with SysV</ulink> document.
                 </para>
@@ -172,13 +172,13 @@
                                 <varname>PIDFile=</varname> option, so
                                 that systemd can identify the main
                                 process of the daemon. systemd will
-                                proceed starting follow-up units as
-                                soon as the parent process
+                                proceed with starting follow-up units
+                                as soon as the parent process
                                 exits.</para>
 
                                 <para>Behavior of
                                 <option>oneshot</option> is similar
-                                to <option>simple</option>, however
+                                to <option>simple</option>; however,
                                 it is expected that the process has to
                                 exit before systemd starts follow-up
                                 units. <varname>RemainAfterExit=</varname>
@@ -187,13 +187,13 @@
 
                                 <para>Behavior of
                                 <option>dbus</option> is similar to
-                                <option>simple</option>, however it is
+                                <option>simple</option>; however, it is
                                 expected that the daemon acquires a
                                 name on the D-Bus bus, as configured
                                 by
                                 <varname>BusName=</varname>. systemd
-                                will proceed starting follow-up units
-                                after the D-Bus bus name has been
+                                will proceed with starting follow-up
+                                units after the D-Bus bus name has been
                                 acquired. Service units with this
                                 option configured implicitly gain
                                 dependencies on the
@@ -204,12 +204,12 @@
 
                                 <para>Behavior of
                                 <option>notify</option> is similar to
-                                <option>simple</option>, however it is
+                                <option>simple</option>; however, it is
                                 expected that the daemon sends a
                                 notification message via
                                 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-                                or an equivalent call when it finished
-                                starting up. systemd will proceed
+                                or an equivalent call when it has finished
+                                starting up. systemd will proceed with
                                 starting follow-up units after this
                                 notification message has been sent. If
                                 this option is used,
@@ -227,7 +227,7 @@
 
                                 <para>Behavior of
                                 <option>idle</option> is very similar
-                                to <option>simple</option>, however
+                                to <option>simple</option>; however,
                                 actual execution of the service
                                 binary is delayed until all jobs are
                                 dispatched. This may be used to avoid
@@ -260,7 +260,7 @@
                                 is set and <option>PIDFile=</option>
                                 is unset because for the other types
                                 or with an explicitly configured PID
-                                file the main PID is always known. The
+                                file, the main PID is always known. The
                                 guessing algorithm might come to
                                 incorrect conclusions if a daemon
                                 consists of more than one process. If
@@ -292,14 +292,13 @@
                                 <term><varname>BusName=</varname></term>
 
                                 <listitem><para>Takes a D-Bus bus
-                                name, that this service is reachable
+                                name that this service is reachable
                                 as. This option is mandatory for
                                 services where
                                 <varname>Type=</varname> is set to
                                 <option>dbus</option>, but its use
-                                is otherwise recommended as well if
-                                the process takes a name on the D-Bus
-                                bus.</para>
+                                is otherwise recommended if the process
+                                takes a name on the D-Bus bus.</para>
                                 </listitem>
                         </varlistentry>
 
@@ -318,7 +317,7 @@
                                 <varname>Type=oneshot</varname> is
                                 used, more than one command may be
                                 specified. Multiple command lines may
-                                be concatenated in a single directive,
+                                be concatenated in a single directive
                                 by separating them with semicolons
                                 (these semicolons must be passed as
                                 separate words). Alternatively, this
@@ -362,12 +361,12 @@
 
                                 <para>If more than one command is
                                 specified, the commands are invoked
-                                one by one sequentially in the order
-                                they appear in the unit file. If one
-                                of the commands fails (and is not
-                                prefixed with <literal>-</literal>),
-                                other lines are not executed and the
-                                unit is considered failed.</para>
+                                sequentially in the order they appear
+                                in the unit file. If one of the
+                                commands fails (and is not prefixed
+                                with <literal>-</literal>), other lines
+                                are not executed, and the unit is
+                                considered failed.</para>
 
                                 <para>Unless
                                 <varname>Type=forking</varname> is
@@ -387,7 +386,7 @@
                                 <para>Basic environment variable
                                 substitution is supported. Use
                                 <literal>${FOO}</literal> as part of a
-                                word, or as a word of its own on the
+                                word, or as a word of its own, on the
                                 command line, in which case it will be
                                 replaced by the value of the
                                 environment variable including all
@@ -410,12 +409,12 @@
                                 fashion may be defined through
                                 <varname>Environment=</varname> and
                                 <varname>EnvironmentFile=</varname>.
-                                In addition, variables listed in
+                                In addition, variables listed in the
                                 section "Environment variables in
                                 spawned processes" in
-                                <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                                <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                                 which are considered "static
-                                configuration" may used (this includes
+                                configuration", may be used (this includes
                                 e.g. <varname>$USER</varname>, but not
                                 <varname>$TERM</varname>).</para>
 
@@ -447,10 +446,10 @@
                                 <programlisting>ExecStart=/bin/echo one ; /bin/echo "two two"</programlisting>
                                 <para>This will execute
                                 <command>/bin/echo</command> two
-                                times, each time with one argument,
+                                times, each time with one argument:
                                 <literal>one</literal> and
                                 <literal>two two</literal>,
-                                respectively. Since two commands are
+                                respectively. Because two commands are
                                 specified,
                                 <varname>Type=oneshot</varname> must
                                 be used.</para>
@@ -512,8 +511,8 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 here following the same scheme as for
                                 <varname>ExecStart=</varname>.</para>
 
-                                <para>One additional special
-                                environment variables is set: if known
+                                <para>One additional, special
+                                environment variable is set: if known,
                                 <varname>$MAINPID</varname> is set to
                                 the main process of the daemon, and
                                 may be used for command lines like the
@@ -532,15 +531,15 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 following the same scheme as described
                                 for <varname>ExecStart=</varname>
                                 above. Use of this setting is
-                                optional. All processes remaining for
-                                a service after the commands
-                                configured in this option are run are
+                                optional. After the commands configured
+                                in this option are run, all processes
+                                remaining for a service are
                                 terminated according to the
                                 <varname>KillMode=</varname> setting
                                 (see
                                 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>). If
                                 this option is not specified, the
-                                process is terminated right-away when
+                                process is terminated immediately when
                                 service stop is requested. Specifier
                                 and environment variable substitution
                                 is supported (including
@@ -586,15 +585,16 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 daemon service does not signal
                                 start-up completion within the
                                 configured time, the service will be
-                                considered failed and be shut down
-                                again.
+                                considered failed and will be shut
+                                down again.
                                 Takes a unit-less value in seconds, or a
                                 time span value such as "5min
-                                20s". Pass 0 to disable the timeout
-                                logic. Defaults to <varname>TimeoutStartSec=</varname> in
-                                manager configuration file, except when
-                                <varname>Type=oneshot</varname> is
-                                used in which case the timeout
+                                20s". Pass <literal>0</literal> to
+                                disable the timeout logic. Defaults to
+                                <varname>TimeoutStartSec=</varname> from
+                                the manager configuration file, except
+                                when <varname>Type=oneshot</varname> is
+                                used, in which case the timeout
                                 is disabled by default.
                                 </para></listitem>
                         </varlistentry>
@@ -603,17 +603,18 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 <term><varname>TimeoutStopSec=</varname></term>
                                 <listitem><para>Configures the time to
                                 wait for stop. If a service is asked
-                                to stop but does not terminate in the
+                                to stop, but does not terminate in the
                                 specified time, it will be terminated
-                                forcibly via <constant>SIGTERM</constant>, and after
-                                another delay of this time with
-                                <constant>SIGKILL</constant> (See
+                                forcibly via <constant>SIGTERM</constant>,
+                                and after another timeout of equal duration
+                                with <constant>SIGKILL</constant> (see
                                 <varname>KillMode=</varname>
                                 in <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
                                 Takes a unit-less value in seconds, or a
                                 time span value such as "5min
-                                20s". Pass 0 to disable the timeout
-                                logic. Defaults to <varname>TimeoutStartSec=</varname> in
+                                20s". Pass <literal>0</literal> to disable
+                                the timeout logic. Defaults to
+                                <varname>TimeoutStartSec=</varname> from the
                                 manager configuration file.
                                 </para></listitem>
                         </varlistentry>
@@ -634,11 +635,11 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 watchdog is activated when the start-up is
                                 completed. The service must call
                                 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-                                regularly with "WATCHDOG=1" (i.e. the
-                                "keep-alive ping"). If the time
+                                regularly with <literal>WATCHDOG=1</literal>
+                                (i.e. the "keep-alive ping"). If the time
                                 between two such calls is larger than
                                 the configured time, then the service
-                                is placed in a failure state. By
+                                is placed in a failed state. By
                                 setting <varname>Restart=</varname> to
                                 <option>on-failure</option> or
                                 <option>always</option>, the service
@@ -669,8 +670,8 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 service process exits, is killed,
                                 or a timeout is reached. The service
                                 process may be the main service
-                                process, but also one of the processes
-                                specified with
+                                process, but it may also be one of the
+                                processes specified with
                                 <varname>ExecStartPre=</varname>,
                                 <varname>ExecStartPost=</varname>,
                                 <varname>ExecStopPre=</varname>,
@@ -698,12 +699,15 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 exits cleanly.
                                 In this context, a clean exit means
                                 an exit code of 0, or one of the signals
-                                <constant>SIGHUP</constant>, <constant>SIGINT</constant>, <constant>SIGTERM</constant>, or <constant>SIGPIPE</constant>, and
+                                <constant>SIGHUP</constant>,
+                                <constant>SIGINT</constant>,
+                                <constant>SIGTERM</constant>,
+                                or <constant>SIGPIPE</constant>, and
                                 additionally, exit statuses and signals
                                 specified in <varname>SuccessExitStatus=</varname>.
                                 If set to <option>on-failure</option>,
                                 the service will be restarted when the
-                                process exits with an nonzero exit code,
+                                process exits with a non-zero exit code,
                                 is terminated by a signal (including on
                                 core dump), when an operation (such as
                                 service reload) times out, and when the
@@ -722,7 +726,7 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 <option>always</option>, the service
                                 will be restarted regardless of whether
                                 it exited cleanly or not, got
-                                terminated abnormally by a signal or
+                                terminated abnormally by a signal, or
                                 hit a timeout.</para>
 
                                 <para>In addition to the above settings,
@@ -774,7 +778,7 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 <listitem><para>Takes a list of exit
                                 status definitions that when returned
                                 by the main service process will
-                                prevent automatic service restarts
+                                prevent automatic service restarts,
                                 regardless of the restart setting
                                 configured with
                                 <varname>Restart=</varname>. Exit
@@ -782,19 +786,20 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 numeric exit codes or termination
                                 signal names, and are separated by
                                 spaces. Defaults to the empty list, so
-                                that by default no exit status is
+                                that, by default, no exit status is
                                 excluded from the configured restart
                                 logic. Example:
                                 <literal>RestartPreventExitStatus=1 6
                                 SIGABRT</literal>, ensures that exit
                                 codes 1 and 6 and the termination
-                                signal SIGABRT will not result in
-                                automatic service restarting. This
-                                option may appear more than once in
-                                which case the list of restart preventing
+                                signal <constant>SIGABRT</constant> will
+                                not result in automatic service
+                                restarting. This
+                                option may appear more than once, in
+                                which case the list of restart-preventing
                                 statuses is merged. If the empty
                                 string is assigned to this option, the
-                                list is reset, all prior assignments
+                                list is reset and all prior assignments
                                 of this option will have no
                                 effect.</para></listitem>
                         </varlistentry>
@@ -802,20 +807,20 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                         <varlistentry>
                                 <term><varname>PermissionsStartOnly=</varname></term>
                                 <listitem><para>Takes a boolean
-                                argument. If true, the permission
-                                related execution options as
+                                argument. If true, the permission-related
+                                execution options, as
                                 configured with
                                 <varname>User=</varname> and similar
                                 options (see
                                 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-                                for more information) are only applied
+                                for more information), are only applied
                                 to the process started with
                                 <varname>ExecStart=</varname>, and not
                                 to the various other
                                 <varname>ExecStartPre=</varname>,
                                 <varname>ExecStartPost=</varname>,
                                 <varname>ExecReload=</varname>,
-                                <varname>ExecStop=</varname>,
+                                <varname>ExecStop=</varname>, and
                                 <varname>ExecStopPost=</varname>
                                 commands. If false, the setting is
                                 applied to all configured commands the
@@ -826,19 +831,19 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                         <varlistentry>
                                 <term><varname>RootDirectoryStartOnly=</varname></term>
                                 <listitem><para>Takes a boolean
-                                argument. If true, the root directory
+                                argument. If true, the root directory,
                                 as configured with the
                                 <varname>RootDirectory=</varname>
                                 option (see
                                 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-                                for more information) is only applied
+                                for more information), is only applied
                                 to the process started with
                                 <varname>ExecStart=</varname>, and not
                                 to the various other
                                 <varname>ExecStartPre=</varname>,
                                 <varname>ExecStartPost=</varname>,
                                 <varname>ExecReload=</varname>,
-                                <varname>ExecStop=</varname>,
+                                <varname>ExecStop=</varname>, and
                                 <varname>ExecStopPost=</varname>
                                 commands. If false, the setting is
                                 applied to all configured commands the
@@ -848,12 +853,14 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
 
                         <varlistentry>
                                 <term><varname>NonBlocking=</varname></term>
-                                <listitem><para>Set O_NONBLOCK flag
+                                <listitem><para>Set the
+                                <constant>O_NONBLOCK</constant> flag
                                 for all file descriptors passed via
                                 socket-based activation. If true, all
                                 file descriptors >= 3 (i.e. all except
                                 STDIN/STDOUT/STDERR) will have
-                                the O_NONBLOCK flag set and hence are in
+                                the <constant>O_NONBLOCK</constant> flag
+                                set and hence are in
                                 non-blocking mode. This option is only
                                 useful in conjunction with a socket
                                 unit, as described in
@@ -909,8 +916,8 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 passed to multiple processes at the
                                 same time. Also note that a different
                                 service may be activated on incoming
-                                traffic than inherits the sockets. Or
-                                in other words: the
+                                traffic than that which inherits the
+                                sockets. Or in other words: the
                                 <varname>Service=</varname> setting of
                                 <filename>.socket</filename> units
                                 does not have to match the inverse of
@@ -923,7 +930,7 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 once, in which case the list of socket
                                 units is merged. If the empty string
                                 is assigned to this option, the list of
-                                sockets is reset, all prior uses of
+                                sockets is reset, and all prior uses of
                                 this setting will have no
                                 effect.</para></listitem>
                         </varlistentry>
@@ -934,10 +941,10 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
 
                                 <listitem><para>Configure service
                                 start rate limiting. By default,
-                                services which are started more often
-                                than 5 times within 10s are not
+                                services which are started more
+                                than 5 times within 10 seconds are not
                                 permitted to start any more times
-                                until the 10s interval ends. With
+                                until the 10 second interval ends. With
                                 these two options, this rate limiting
                                 may be modified. Use
                                 <varname>StartLimitInterval=</varname>
@@ -952,18 +959,18 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 manager configuration file). These
                                 configuration options are particularly
                                 useful in conjunction with
-                                <varname>Restart=</varname>, however
-                                apply to all kinds of starts
+                                <varname>Restart=</varname>; however,
+                                they apply to all kinds of starts
                                 (including manual), not just those
                                 triggered by the
                                 <varname>Restart=</varname> logic.
                                 Note that units which are configured
                                 for <varname>Restart=</varname> and
                                 which reach the start limit are not
-                                attempted to be restarted anymore,
-                                however they may still be restarted
-                                manually at a later point from which
-                                point on the restart logic is again
+                                attempted to be restarted anymore;
+                                however, they may still be restarted
+                                manually at a later point, from which
+                                point on, the restart logic is again
                                 activated. Note that
                                 <command>systemctl
                                 reset-failed</command> will cause the
@@ -987,18 +994,17 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 hit. Takes one of
                                 <option>none</option>,
                                 <option>reboot</option>,
-                                <option>reboot-force</option> or
+                                <option>reboot-force</option>, or
                                 <option>reboot-immediate</option>. If
                                 <option>none</option> is set,
                                 hitting the rate limit will trigger no
                                 action besides that the start will not
-                                be
-                                permitted. <option>reboot</option>
+                                be permitted. <option>reboot</option>
                                 causes a reboot following the normal
                                 shutdown procedure (i.e. equivalent to
-                                <command>systemctl reboot</command>),
+                                <command>systemctl reboot</command>).
                                 <option>reboot-force</option> causes
-                                an forced reboot which will terminate
+                                a forced reboot which will terminate
                                 all processes forcibly but should
                                 cause no dirty file systems on reboot
                                 (i.e. equivalent to <command>systemctl
@@ -1007,7 +1013,7 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 causes immediate execution of the
                                 <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
                                 system call, which might result in
-                                data loss.  Defaults to
+                                data loss. Defaults to
                                 <option>none</option>.</para></listitem>
                         </varlistentry>
 
@@ -1037,19 +1043,19 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 in relation to SysV services lacking
                                 LSB headers. This option is only
                                 necessary to fix ordering in relation
-                                to legacy SysV services, that have no
+                                to legacy SysV services that have no
                                 ordering information encoded in the
-                                script headers. As such it should only
-                                be used as temporary compatibility
-                                option, and not be used in new unit
-                                files. Almost always it is a better
+                                script headers. As such, it should only
+                                be used as a temporary compatibility
+                                option and should not be used in new unit
+                                files. Almost always, it is a better
                                 choice to add explicit ordering
                                 directives via
                                 <varname>After=</varname> or
                                 <varname>Before=</varname>,
-                                instead. For more details see
-                                <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. If
-                                used, pass an integer value in the
+                                instead. For more details, see
+                                <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+                                If used, pass an integer value in the
                                 range 0-99.</para></listitem>
                         </varlistentry>
 
diff --git a/man/udev.xml b/man/udev.xml
index f107482..82e7478 100644
--- a/man/udev.xml
+++ b/man/udev.xml
@@ -255,9 +255,9 @@
             <para>Execute a program to determine whether there
             is a match; the key is true if the program returns
             successfully. The device properties are made available to the
-            executed program in the environment. The program's stdout
-            is available in the RESULT key.</para>
-            <para>This can only be used for very short-running foreground tasks. For details
+            executed program in the environment. The program's STDOUT
+            is available in the <varname>RESULT</varname> key.</para>
+            <para>This can only be used for very short-running foreground tasks. For details,
             see <varname>RUN</varname>.</para>
           </listitem>
         </varlistentry>
@@ -265,8 +265,9 @@
         <varlistentry>
           <term><varname>RESULT</varname></term>
           <listitem>
-            <para>Match the returned string of the last PROGRAM call. This key can
-            be used in the same or in any later rule after a PROGRAM call.</para>
+            <para>Match the returned string of the last <varname>PROGRAM</varname> call.
+            This key can be used in the same or in any later rule after a
+            <varname>PROGRAM</varname> call.</para>
           </listitem>
         </varlistentry>
       </variablelist>
@@ -293,9 +294,10 @@
             example, the pattern string <literal>tty[SR]</literal>
             would match either <literal>ttyS</literal> or <literal>ttyR</literal>.
             Ranges are also supported via the <literal>-</literal> character.
-            For example, to match on the range of all digits, the pattern [0-9] could
-            be used. If the first character following the <literal>[</literal> is a
-            <literal>!</literal>, any characters not enclosed are matched.</para>
+            For example, to match on the range of all digits, the pattern
+            <literal>[0-9]</literal> could be used. If the first character
+            following the <literal>[</literal> is a <literal>!</literal>,
+            any characters not enclosed are matched.</para>
           </listitem>
         </varlistentry>
       </variablelist>
@@ -353,7 +355,8 @@
           <listitem>
             <para>Set a device property value. Property names with a leading <literal>.</literal>
             are neither stored in the database nor exported to events or
-            external tools (run by, say, the PROGRAM match key).</para>
+            external tools (run by, for example, the <varname>PROGRAM</varname>
+            match key).</para>
           </listitem>
         </varlistentry>
 
@@ -373,24 +376,26 @@
         <varlistentry>
           <term><varname>RUN{<replaceable>type</replaceable>}</varname></term>
           <listitem>
-            <para>Add a program to the list of programs to be executed after processing all the
-            rules for a specific event, depending on <literal>type</literal>:</para>
+            <para>Add a program to the list of programs to be executed after
+            processing all the rules for a specific event, depending on
+            <literal>type</literal>:</para>
             <variablelist>
               <varlistentry>
                 <term><literal>program</literal></term>
                 <listitem>
                   <para>Execute an external program specified as the assigned
-                  value. If no absolute path is given, the program is expected to live in
-                  /usr/lib/udev, otherwise the absolute path must be specified.</para>
-                  <para>This is the default if no <replaceable>type</replaceable> is
-                  specified.</para>
+                  value. If no absolute path is given, the program is expected
+                  to live in <filename>/usr/lib/udev</filename>; otherwise, the
+                  absolute path must be specified.</para>
+                  <para>This is the default if no <replaceable>type</replaceable>
+                  is specified.</para>
                 </listitem>
               </varlistentry>
               <varlistentry>
                 <term><literal>builtin</literal></term>
                 <listitem>
-                  <para>As <varname>program</varname>, but use one of the built-in programs rather
-                  than an external one.</para>
+                  <para>As <varname>program</varname>, but use one of the
+                  built-in programs rather than an external one.</para>
                 </listitem>
               </varlistentry>
             </variablelist>
@@ -399,7 +404,7 @@
             <para>This can only be used for very short-running foreground tasks. Running an
             event process for a long period of time may block all further events for
             this or a dependent device.</para>
-            <para>Starting daemons or other long running processes is not appropriate
+            <para>Starting daemons or other long-running processes is not appropriate
             for udev; the forked processes, detached or not, will be unconditionally
             killed after the event handling has finished.</para>
           </listitem>
@@ -408,14 +413,14 @@
         <varlistentry>
           <term><varname>LABEL</varname></term>
           <listitem>
-            <para>A named label to which a GOTO may jump.</para>
+            <para>A named label to which a <varname>GOTO</varname> may jump.</para>
           </listitem>
         </varlistentry>
 
         <varlistentry>
           <term><varname>GOTO</varname></term>
           <listitem>
-            <para>Jumps to the next LABEL with a matching name.</para>
+            <para>Jumps to the next <varname>LABEL</varname> with a matching name.</para>
           </listitem>
         </varlistentry>
 
@@ -518,21 +523,24 @@
               <varlistentry>
                 <term><option>static_node=</option></term>
                 <listitem>
-                  <para>Apply the permissions specified in this rule to the static device node with
-                  the specified name. Also, for every tag specified in this rule, create a symlink
+                  <para>Apply the permissions specified in this rule to the
+                  static device node with the specified name. Also, for every
+                  tag specified in this rule, create a symlink
                   in the directory
                   <filename>/run/udev/static_node-tags/<replaceable>tag</replaceable></filename>
-                  pointing at the static device node with the specified name. Static device node
-                  creation is performed by systemd-tmpfiles before systemd-udevd is started. The
-                  static nodes might not have a corresponding kernel device; they are used to
-                  trigger automatic kernel module loading when they are accessed.</para>
+                  pointing at the static device node with the specified name.
+                  Static device node creation is performed by systemd-tmpfiles
+                  before systemd-udevd is started. The static nodes might not
+                  have a corresponding kernel device; they are used to trigger
+                  automatic kernel module loading when they are accessed.</para>
                 </listitem>
               </varlistentry>
               <varlistentry>
                 <term><option>watch</option></term>
                 <listitem>
-                  <para>Watch the device node with inotify; when the node is closed after being opened for
-                  writing, a change uevent is synthesized.</para>
+                  <para>Watch the device node with inotify; when the node is
+                  closed after being opened for writing, a change uevent is
+                  synthesized.</para>
                 </listitem>
               </varlistentry>
               <varlistentry>
@@ -546,13 +554,15 @@
         </varlistentry>
       </variablelist>
 
-      <para>The <varname>NAME</varname>, <varname>SYMLINK</varname>, <varname>PROGRAM</varname>,
-      <varname>OWNER</varname>, <varname>GROUP</varname>, <varname>MODE</varname>  and  <varname>RUN</varname>
-      fields support simple string substitutions. The <varname>RUN</varname>
-      substitutions are performed after all rules have been processed, right before the program
-      is executed, allowing for the use of device properties set by earlier matching
-      rules. For all other fields, substitutions are performed while the individual rule is
-      being processed. The available substitutions are:</para>
+      <para>The <varname>NAME</varname>, <varname>SYMLINK</varname>,
+      <varname>PROGRAM</varname>, <varname>OWNER</varname>,
+      <varname>GROUP</varname>, <varname>MODE</varname>, and
+      <varname>RUN</varname> fields support simple string substitutions.
+      The <varname>RUN</varname> substitutions are performed after all rules
+      have been processed, right before the program is executed, allowing for
+      the use of device properties set by earlier matching rules. For all other
+      fields, substitutions are performed while the individual rule is being
+      processed. The available substitutions are:</para>
       <variablelist class='udev-directives'>
         <varlistentry>
           <term><option>$kernel</option>, <option>%k</option></term>
@@ -565,7 +575,8 @@
           <term><option>$number</option>, <option>%n</option></term>
           <listitem>
             <para>The kernel number for this device. For example,
-            <literal>sda3</literal> has kernel number <literal>3</literal>.</para>
+              <literal>sda3</literal> has kernel number <literal>3</literal>.
+            </para>
           </listitem>
         </varlistentry>
 
@@ -579,8 +590,9 @@
         <varlistentry>
           <term><option>$id</option>, <option>%b</option></term>
           <listitem>
-            <para>The name of the device matched while searching the devpath upwards for
-              <option>SUBSYSTEMS</option>, <option>KERNELS</option>, <option>DRIVERS</option> and <option>ATTRS</option>.
+            <para>The name of the device matched while searching the devpath
+              upwards for <option>SUBSYSTEMS</option>, <option>KERNELS</option>,
+              <option>DRIVERS</option>, and <option>ATTRS</option>.
             </para>
           </listitem>
         </varlistentry>
@@ -588,8 +600,10 @@
         <varlistentry>
           <term><option>$driver</option></term>
           <listitem>
-            <para>The driver name of the device matched while searching the devpath upwards for
-              <option>SUBSYSTEMS</option>, <option>KERNELS</option>, <option>DRIVERS</option> and <option>ATTRS</option>.
+            <para>The driver name of the device matched while searching the
+              devpath upwards for <option>SUBSYSTEMS</option>,
+              <option>KERNELS</option>, <option>DRIVERS</option>, and
+              <option>ATTRS</option>.
             </para>
           </listitem>
         </varlistentry>
@@ -598,12 +612,15 @@
           <term><option>$attr{<replaceable>file</replaceable>}</option>, <option>%s{<replaceable>file</replaceable>}</option></term>
           <listitem>
             <para>The value of a sysfs attribute found at the device where
-            all keys of the rule have matched. If the matching device does not have
-            such an attribute, and a previous KERNELS, SUBSYSTEMS, DRIVERS, or
-            ATTRS test selected a parent device, then the attribute from that
-            parent device is used.</para>
-            <para>If the attribute is a symlink, the last element of the symlink target is
-            returned as the value.</para>
+              all keys of the rule have matched. If the matching device does not
+              have such an attribute, and a previous <option>KERNELS</option>,
+              <option>SUBSYSTEMS</option>, <option>DRIVERS</option>, or
+              <option>ATTRS</option> test selected a parent device, then the
+              attribute from that parent device is used.
+            </para>
+            <para>If the attribute is a symlink, the last element of the
+              symlink target is returned as the value.
+            </para>
           </listitem>
         </varlistentry>
 
@@ -631,7 +648,8 @@
         <varlistentry>
           <term><option>$result</option>, <option>%c</option></term>
           <listitem>
-            <para>The string returned by the external program requested with PROGRAM.
+            <para>The string returned by the external program requested with
+            <varname>PROGRAM</varname>.
             A single part of the string, separated by a space character, may be selected
             by specifying the part number as an attribute: <literal>%c{N}</literal>.
             If the number is followed by the <literal>+</literal> character, this part plus all remaining parts
@@ -736,11 +754,13 @@
 
   <refsect1>
     <title>See Also</title>
-    <para><citerefentry>
+    <para>
+      <citerefentry>
         <refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum>
       </citerefentry>,
       <citerefentry>
         <refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum>
-    </citerefentry></para>
+      </citerefentry>
+    </para>
   </refsect1>
 </refentry>
diff --git a/man/udevadm.xml b/man/udevadm.xml
index ca3713f..32bf480 100644
--- a/man/udevadm.xml
+++ b/man/udevadm.xml
@@ -72,7 +72,7 @@
       <varlistentry>
         <term><option>--debug</option></term>
         <listitem>
-          <para>Print debug messages to stderr.</para>
+          <para>Print debug messages to STDERR.</para>
         </listitem>
       </varlistentry>
       <varlistentry>

commit dc76cad2163e39553af52c5a56fe1f8419ba17ab
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Fri Feb 14 17:01:43 2014 -0500

    units: systemd-logind fails hard without dbus
    
    That is, without --enable-kdbus and kdbus running.
    
    With --enable-kdbus things are more complicated, because dbus might be
    necessary, if kdbus is missing at runtime. If it is not necessary,
    the socket will be started, which is not imporant, but not the service.
    
    (cherry picked from commit 8f9c6fe5ff1d59001aecbf3fbf9ca0ed7ff28ba7)

diff --git a/units/systemd-logind.service.in b/units/systemd-logind.service.in
index 31b5cd0..e0b1b59 100644
--- a/units/systemd-logind.service.in
+++ b/units/systemd-logind.service.in
@@ -13,6 +13,11 @@ Documentation=http://www.freedesktop.org/wiki/Software/systemd/multiseat
 Wants=user.slice
 After=nss-user-lookup.target user.slice
 
+# Ask for the dbus socket. If running over kdbus, the socket will
+# not be actually used.
+Wants=dbus.socket
+After=dbus.socket
+
 [Service]
 ExecStart=@rootlibexecdir@/systemd-logind
 Restart=always

commit 9d713de8161428deda10e857b43b6e8bcc273abe
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Feb 14 16:41:03 2014 +0100

    nspawn: if we don't find bash, try sh
    
    (cherry picked from commit 262d10e6bd8e4a0a6a0967fbb5f89a5b989779ac)
    
    Conflicts:
    	src/nspawn/nspawn.c

diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index cafc306..410b879 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1499,6 +1499,7 @@ int main(int argc, char *argv[]) {
                         else {
                                 chdir(home ? home : "/root");
                                 execle("/bin/bash", "-bash", NULL, (char**) envp);
+                                execle("/bin/sh", "-sh", NULL, (char**) envp);
                         }
 
                         log_error("execv() failed: %m");



More information about the systemd-commits mailing list