[systemd-commits] 4 commits - TODO man/logind.conf.xml man/systemd-system.conf.xml src/shared src/systemctl

Lennart Poettering lennart at kemper.freedesktop.org
Wed Feb 27 06:01:20 PST 2013


 TODO                        |    4 ++++
 man/logind.conf.xml         |   25 ++++++++++++++++++++-----
 man/systemd-system.conf.xml |   19 ++++++++++---------
 src/shared/log.c            |   19 +++++++++----------
 src/systemctl/systemctl.c   |   21 ++++++++++-----------
 5 files changed, 53 insertions(+), 35 deletions(-)

New commits:
commit 416389f7ae262ae7a0848302e7a6516597f9fad1
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 27 15:01:06 2013 +0100

    systemctl: fix indentation

diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 8174376..65c5eca 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -1045,7 +1045,7 @@ static bool need_daemon_reload(DBusConnection *bus, const char *unit) {
         if (!n)
                 return log_oom();
 
-        r = bus_method_call_with_reply (
+        r = bus_method_call_with_reply(
                         bus,
                         "org.freedesktop.systemd1",
                         "/org/freedesktop/systemd1",
@@ -3985,16 +3985,15 @@ static int enable_unit(DBusConnection *bus, char **args) {
         }
 
         if (carries_install_info == 0)
-                log_warning(
-"The unit files have no [Install] section. They are not meant to be enabled\n"
-"using systemctl.\n"
-"Possible reasons for having this kind of units are:\n"
-"1) A unit may be statically enabled by being symlinked from another unit's\n"
-"   .wants/ or .requires/ directory.\n"
-"2) A unit's purpose may be to act as a helper for some other unit which has\n"
-"   a requirement dependency on it.\n"
-"3) A unit may be started when needed via activation (socket, path, timer,\n"
-"   D-Bus, udev, scripted systemctl call, ...).\n");
+                log_warning("The unit files have no [Install] section. They are not meant to be enabled\n"
+                            "using systemctl.\n"
+                            "Possible reasons for having this kind of units are:\n"
+                            "1) A unit may be statically enabled by being symlinked from another unit's\n"
+                            "   .wants/ or .requires/ directory.\n"
+                            "2) A unit's purpose may be to act as a helper for some other unit which has\n"
+                            "   a requirement dependency on it.\n"
+                            "3) A unit may be started when needed via activation (socket, path, timer,\n"
+                            "   D-Bus, udev, scripted systemctl call, ...).\n");
 
 finish:
         unit_file_changes_free(changes, n_changes);

commit 826872b61e4857dfffe63ba84e2b005623baecd6
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 27 15:00:38 2013 +0100

    update TODO

diff --git a/TODO b/TODO
index f7861c4..253b0e8 100644
--- a/TODO
+++ b/TODO
@@ -53,6 +53,10 @@ Fedora 19:
 
 Features:
 
+* journal-or-kmsg is currently broken? See reverted commit 4a01181e460686d8b4a543b1dfa7f77c9e3c5ab8.
+
+* remove any syslog support from log.c
+
 * convert /etc/bash_completion.d/ to /usr/share/bash-completion/
   (systemd (and everything else) should install zero static data in /etc)
 

commit 3ae0c5e18916a3c67822f644266205d6e2fa6e06
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 27 15:00:26 2013 +0100

    man: clarify how to configure default control group hierarchies for services and sessions

diff --git a/man/logind.conf.xml b/man/logind.conf.xml
index 96e5936..362a4f6 100644
--- a/man/logind.conf.xml
+++ b/man/logind.conf.xml
@@ -207,10 +207,17 @@
 
                                 <listitem><para>These settings control
                                 the default control group hierarchies
-                                users logging in are added to. When
-                                logging in users will get private
-                                control groups in all hierarchies
-                                listed in
+                                users logging in are added to, in
+                                addition to the
+                                <literal>name=systemd</literal> named
+                                hierarchy. These settings take space
+                                separated lists of controller
+                                names. Pass the empty string to ensure
+                                that logind does not touch any
+                                hierarchies but systemd's own. When
+                                logging in user sessions will get
+                                private control groups in all
+                                hierarchies listed in
                                 <varname>Controllers=</varname> and be
                                 reset to the root control group in all
                                 hierarchies listed in
@@ -218,7 +225,15 @@
                                 defaults to the empty list,
                                 <varname>ResetControllers=</varname>
                                 defaults to
-                                <literal>cpu</literal>.</para></listitem>
+                                <literal>cpu</literal>. Note that for
+                                all controllers that are not listed in
+                                either <varname>Controllers=</varname>
+                                nor
+                                <varname>ResetControllers=</varname>
+                                newly created sessions will be part of
+                                the control groups of the system
+                                service that created the
+                                session.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
index 12979d8..eaa770b 100644
--- a/man/systemd-system.conf.xml
+++ b/man/systemd-system.conf.xml
@@ -107,15 +107,16 @@
                                 <term><varname>DefaultControllers=cpu</varname></term>
 
                                 <listitem><para>Configures in which
-                                cgroup controller hierarchies to
-                                create per-service cgroups
-                                automatically, in addition to the
-                                name=systemd named hierarchy. Defaults
-                                to 'cpu'. Takes a space separated list
-                                of controller names. Pass an empty
-                                string to ensure that systemd does not
-                                touch any hierarchies but its
-                                own.</para>
+                                control group hierarchies to create
+                                per-service cgroups automatically, in
+                                addition to the
+                                <literal>name=systemd</literal> named
+                                hierarchy. Defaults to
+                                <literal>cpu</literal>. Takes a space
+                                separated list of controller
+                                names. Pass the empty string to ensure
+                                that systemd does not touch any
+                                hierarchies but its own.</para>
 
                                 <para>Note that the default value of
                                 'cpu' will make realtime scheduling

commit 4e7bc3f339a8f08b788ccccee4038f59f29c4429
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 27 14:33:50 2013 +0100

    Revert "log: fix fallbacks to kmsg"
    
    This reverts commit 4a01181e460686d8b4a543b1dfa7f77c9e3c5ab8.
    
    This patch broke LOG_TARGET_AUTO, i.e. automatic selection of STDERR if
    it is a TTY with a fallback on the journal and kmsg otherwise.
    
    The general rule should probably be:
    
    log_open() -- open the "best" possible logging channel according to
    log_target configuration.
    
    log_dispatch() -- don't open any log channels ever, with the exception
    of kmsg since that has no drawbacks. And do this only on true errors of
    the better log channel, not just when it wasn't opened.

diff --git a/src/shared/log.c b/src/shared/log.c
index ff2dd45..293c261 100644
--- a/src/shared/log.c
+++ b/src/shared/log.c
@@ -541,11 +541,11 @@ static int log_dispatch(
 
                         k = write_to_journal(level, file, line, func,
                                              object_name, object, buffer);
-                        if (k <= 0) {
-                                if (k < 0 && k != -EAGAIN)
+                        if (k < 0) {
+                                if (k != -EAGAIN)
                                         log_close_journal();
                                 log_open_kmsg();
-                        } else
+                        } else if (k > 0)
                                 r++;
                 }
 
@@ -554,11 +554,11 @@ static int log_dispatch(
 
                         k = write_to_syslog(level, file, line, func,
                                             object_name, object, buffer);
-                        if (k <= 0) {
-                                if (k < 0 && k != -EAGAIN)
+                        if (k < 0) {
+                                if (k != -EAGAIN)
                                         log_close_syslog();
                                 log_open_kmsg();
-                        } else
+                        } else if (k > 0)
                                 r++;
                 }
 
@@ -571,11 +571,10 @@ static int log_dispatch(
 
                         k = write_to_kmsg(level, file, line, func,
                                           object_name, object, buffer);
-                        if (k <= 0) {
-                                if (k < 0 && k != -EAGAIN)
-                                        log_close_kmsg();
+                        if (k < 0) {
+                                log_close_kmsg();
                                 log_open_console();
-                        } else
+                        } else if (k > 0)
                                 r++;
                 }
 



More information about the systemd-commits mailing list