[systemd-commits] 5 commits - CODING_STYLE configure.ac Makefile-man.am man/sd_uid_get_state.xml man/systemd.resource-control.xml NEWS src/core src/network

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Sat May 24 16:01:33 PDT 2014


 CODING_STYLE                       |    2 -
 Makefile-man.am                    |    5 ++++
 NEWS                               |   28 +++++++++++++------------
 configure.ac                       |    2 -
 man/sd_uid_get_state.xml           |   40 ++++++++++++++++++++++++++++++-------
 man/systemd.resource-control.xml   |   26 ++++++++++++------------
 src/core/unit.c                    |    6 ++---
 src/network/networkd-wait-online.c |    2 -
 8 files changed, 73 insertions(+), 38 deletions(-)

New commits:
commit 865cc19a34cd9a3ff98a7b3754747f4904f56faa
Author: Jonathan Boulle <jonathanboulle at gmail.com>
Date:   Fri May 23 11:56:42 2014 -0700

    Fix several small typos

diff --git a/CODING_STYLE b/CODING_STYLE
index 996897b..4ec5923 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -16,7 +16,7 @@
   half-initialized objects, too
 
 - Error codes are returned as negative Exxx. i.e. return -EINVAL. There
-  are some exceptions: for constructors its is OK to return NULL on
+  are some exceptions: for constructors it is OK to return NULL on
   OOM. For lookup functions NULL is fine too for "not found".
 
   Be strict with this. When you write a function that can fail due to
diff --git a/src/core/unit.c b/src/core/unit.c
index 3f862aa..6e40bc6 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -1574,7 +1574,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
 
         /* Note that this is called for all low-level state changes,
          * even if they might map to the same high-level
-         * UnitActiveState! That means that ns == os is OK an expected
+         * UnitActiveState! That means that ns == os is an expected
          * behavior here. For example: if a mount point is remounted
          * this function will be called too! */
 
@@ -1597,7 +1597,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
                         u->active_exit_timestamp = ts;
         }
 
-        /* Keep track of failed of units */
+        /* Keep track of failed units */
         if (ns == UNIT_FAILED && os != UNIT_FAILED)
                 set_put(u->manager->failed_units, u);
         else if (os == UNIT_FAILED && ns != UNIT_FAILED)
@@ -1722,7 +1722,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
         if (UNIT_IS_ACTIVE_OR_RELOADING(ns)) {
 
                 if (unit_has_name(u, SPECIAL_DBUS_SERVICE))
-                        /* The bus just might have become available,
+                        /* The bus might have just become available,
                          * hence try to connect to it, if we aren't
                          * yet connected. */
                         bus_init(m, true);
diff --git a/src/network/networkd-wait-online.c b/src/network/networkd-wait-online.c
index 0b8e35d..c6038c6 100644
--- a/src/network/networkd-wait-online.c
+++ b/src/network/networkd-wait-online.c
@@ -124,7 +124,7 @@ static bool all_configured(Manager *m) {
 
                 r = sd_rtnl_message_new_link(m->rtnl, &message, RTM_GETLINK, 0);
                 if (r < 0) {
-                        log_warning("colud not create GETLINK message: %s", strerror(-r));
+                        log_warning("could not create GETLINK message: %s", strerror(-r));
                         return false;
                 }
 

commit 623538c3125fd0174513e4ef5b0e6163f4ea41ef
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat May 24 18:49:45 2014 -0400

    man: describe sd_uid_get_display

diff --git a/Makefile-man.am b/Makefile-man.am
index 6d57b75..03adc7c 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -1288,6 +1288,7 @@ MANPAGES_ALIAS += \
 	man/sd_session_get_uid.3 \
 	man/sd_session_get_vt.3 \
 	man/sd_session_is_remote.3 \
+	man/sd_uid_get_display.3 \
 	man/sd_uid_get_seats.3 \
 	man/sd_uid_get_sessions.3 \
 	man/sd_uid_is_on_seat.3 \
@@ -1328,6 +1329,7 @@ man/sd_session_get_type.3: man/sd_session_is_active.3
 man/sd_session_get_uid.3: man/sd_session_is_active.3
 man/sd_session_get_vt.3: man/sd_session_is_active.3
 man/sd_session_is_remote.3: man/sd_session_is_active.3
+man/sd_uid_get_display.3: man/sd_uid_get_state.3
 man/sd_uid_get_seats.3: man/sd_uid_get_state.3
 man/sd_uid_get_sessions.3: man/sd_uid_get_state.3
 man/sd_uid_is_on_seat.3: man/sd_uid_get_state.3
@@ -1440,6 +1442,9 @@ man/sd_session_get_vt.html: man/sd_session_is_active.html
 man/sd_session_is_remote.html: man/sd_session_is_active.html
 	$(html-alias)
 
+man/sd_uid_get_display.html: man/sd_uid_get_state.html
+	$(html-alias)
+
 man/sd_uid_get_seats.html: man/sd_uid_get_state.html
 	$(html-alias)
 
diff --git a/man/sd_uid_get_state.xml b/man/sd_uid_get_state.xml
index 01ad0ab..1007a79 100644
--- a/man/sd_uid_get_state.xml
+++ b/man/sd_uid_get_state.xml
@@ -47,6 +47,7 @@
                 <refname>sd_uid_is_on_seat</refname>
                 <refname>sd_uid_get_sessions</refname>
                 <refname>sd_uid_get_seats</refname>
+                <refname>sd_uid_get_display</refname>
                 <refpurpose>Determine login state of a specific Unix user ID</refpurpose>
         </refnamediv>
 
@@ -80,6 +81,12 @@
                                 <paramdef>int <parameter>require_active</parameter></paramdef>
                                 <paramdef>char ***<parameter>seats</parameter></paramdef>
                         </funcprototype>
+
+                        <funcprototype>
+                                <funcdef>int <function>sd_uid_get_display</function></funcdef>
+                                <paramdef>uid_t <parameter>uid</parameter></paramdef>
+                                <paramdef>char **<parameter>session</parameter></paramdef>
+                        </funcprototype>
                 </funcsynopsis>
         </refsynopsisdiv>
 
@@ -147,6 +154,12 @@
                 with no attached seat and hence the number of entries
                 in the returned array may differ from the one returned
                 by <function>sd_uid_get_sessions()</function>.</para>
+
+                <para><function>sd_uid_get_display()</function>
+                returns the name of the "primary" session of a user.
+                If the user has graphical sessions, it will be the
+                oldest graphical session. Otherwise, it will be the
+                oldest open session.</para>
         </refsect1>
 
         <refsect1>
@@ -159,7 +172,9 @@
                 positive integer; if it fails,
                 0. <function>sd_uid_get_sessions()</function> and
                 <function>sd_uid_get_seats()</function> return the
-                number of entries in the returned arrays. On failure,
+                number of entries in the returned arrays.
+                <function>sd_uid_get_display()</function> returns
+                a non-negative code on success. On failure,
                 these calls return a negative errno-style error
                 code.</para>
         </refsect1>
@@ -167,13 +182,24 @@
         <refsect1>
                 <title>Notes</title>
 
-                <para>The <function>sd_uid_get_state()</function>,
+                <para>Functions described here are available as a
+                shared library, and can be compiled and linked to
+                using the
+                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                entry.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>History</title>
+
+                <function>sd_uid_get_state()</function>,
                 <function>sd_uid_is_on_seat()</function>,
-                <function>sd_uid_get_sessions()</function>, and
-                <function>sd_uid_get_seats()</function> interfaces are
-                available as a shared library, which can be compiled and
-                linked to with the <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-                file.</para>
+                <function>sd_uid_get_sessions()</function>,
+                and <function>sd_uid_get_seats()</function> functions
+                were added in systemd-31.
+
+                <para><function>sd_uid_get_display()</function> was
+                added in systemd-213.</para>
         </refsect1>
 
         <refsect1>

commit 499b604b21c02ee64c8590a76d7900d64d7a5cb7
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat May 24 18:45:04 2014 -0400

    NEWS: mention that systemd-analyze uses new kernel release info
    
    Also some small grammar updates.

diff --git a/NEWS b/NEWS
index d2152a2..a24e5c3 100644
--- a/NEWS
+++ b/NEWS
@@ -29,23 +29,25 @@ CHANGES WITH 213:
 
         * "systemctl list-timers" and "systemctl list-sockets" gained
           a --recursive switch for showing units of these types also
-          for all local containers, similar in style to the
-          --recursive switch "systemctl list-units" already supports.
+          for all local containers, similar in style to the already
+          supported --recursive switch for "systemctl list-units".
 
         * A new RebootArgument= setting has been added for service
           units, which may be used to specify a kernel reboot argument
-          for usage when triggering reboots with StartLimitAction=.
+          to use when triggering reboots with StartLimitAction=.
 
         * A new FailureAction= setting has been added for service
           units which may be used to specify an operation to trigger
-          when a service fails. This works similar to
+          when a service fails. This works similarly to
           StartLimitAction=, but unlike it controls what is done
           immediately rather than only after several attempts to
           restart the service in question.
 
         * hostnamed got updated to also expose the kernel name,
-          release and version on the bus. This is useful for executing
-          commands like hostnamectl with the -H switch.
+          release, and version on the bus. This is useful for
+          executing commands like hostnamectl with the -H switch.
+          systemd-analyze makes use of this to properly display
+          details when running non-locally.
 
         * The bootchart tool can now show cgroup information in the
           graphs it generates.
@@ -95,7 +97,7 @@ CHANGES WITH 213:
           of network configuration performed in some other way.
 
         * Two new service options StartupCPUShares= and
-          StartupBlockIOWeight= have been added that work similar to
+          StartupBlockIOWeight= have been added that work similarly to
           CPUShares= and BlockIOWeight= however only apply during
           system startup. This is useful to prioritize certain services
           differently during bootup than during normal runtime.
@@ -135,7 +137,7 @@ CHANGES WITH 212:
         * sd-login gained new calls
           sd_peer_get_{session,owner_uid,unit,user_unit,slice,machine_name}(),
           to query the identity of the peer of a local AF_UNIX
-          connection. They operate similar to their sd_pid_get_xyz()
+          connection. They operate similarly to their sd_pid_get_xyz()
           counterparts.
 
         * PID 1 will now maintain a system-wide system state engine
@@ -318,7 +320,7 @@ CHANGES WITH 211:
 
         * systemd-nspawn gained a new --network-macvlan= setting to
           set up a private macvlan interface for the
-          container. Similar, systemd-networkd gained a new
+          container. Similarly, systemd-networkd gained a new
           Kind=macvlan setting in .netdev files.
 
         * systemd-networkd now supports configuring local addresses
@@ -1332,7 +1334,7 @@ CHANGES WITH 205:
           not available as public API.
 
         * systemd will now look for the "debug" argument on the kernel
-          command line and enable debug logging, similar to
+          command line and enable debug logging, similar to what
           "systemd.log_level=debug" already did before.
 
         * "systemctl set-default", "systemctl get-default" has been
@@ -1771,7 +1773,7 @@ CHANGES WITH 198:
 
         * The various "environment" files, such as /etc/locale.conf
           now support continuation lines with a backslash ("\") as
-          last character in the line, similar in style (but different)
+          last character in the line, similarly in style (but different)
           to how this is supported in shells.
 
         * For normal user processes the _SYSTEMD_USER_UNIT= field is
@@ -1818,7 +1820,7 @@ CHANGES WITH 198:
 
         * "systemctl unlock-sessions" has been added, that allows
           unlocking the screens of all user sessions at once, similar
-          how "systemctl lock-sessions" already locked all users
+          to how "systemctl lock-sessions" already locked all users
           sessions. This is backed by a new D-Bus call UnlockSessions().
 
         * "loginctl seat-status" will now show the master device of a
@@ -1898,7 +1900,7 @@ CHANGES WITH 198:
           pager. This is only supported in conjunction with "less".
 
         * journalctl gained a new "--user-unit=" option, that works
-          similar to "--unit=" but filters for user units rather than
+          similarly to "--unit=" but filters for user units rather than
           system units.
 
         * A number of unit files to ease adoption of systemd in

commit 49e5c2b26aa72a7aa117c1e04763852a4b69136b
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat May 24 18:23:06 2014 -0400

    build-sys: fix typo in variable name

diff --git a/configure.ac b/configure.ac
index c41f6c9..0b82014 100644
--- a/configure.ac
+++ b/configure.ac
@@ -909,7 +909,7 @@ AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
 AC_ARG_WITH(dns-servers,
         AS_HELP_STRING([--with-dns-servers=DNSSERVERS],
                 [Space-separated list of default DNS servers]),
-        [NTP_SERVERS="$withval"],
+        [DNS_SERVERS="$withval"],
         [DNS_SERVERS="8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844"])
 
 AC_DEFINE_UNQUOTED(DNS_SERVERS, ["$DNS_SERVERS"], [Default DNS Servers])

commit b9acccb3c9795c88f1eca003480035917ff3c896
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat May 24 18:02:16 2014 -0400

    man: reword StartupCPUShares= description
    
    Now that we have two options described in the same paragraph, we cannot
    use singular anymore.

diff --git a/man/systemd.resource-control.xml b/man/systemd.resource-control.xml
index e0e49db..e91c260 100644
--- a/man/systemd.resource-control.xml
+++ b/man/systemd.resource-control.xml
@@ -119,22 +119,24 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
         <listitem>
           <para>Assign the specified CPU time share weight to the
-          processes executed. Takes an integer value. This controls
-          the <literal>cpu.shares</literal> control group attribute,
-          which defaults to 1024. For details about this control group
-          attribute, see <ulink
+          processes executed. Those options take an integer value and
+          control the <literal>cpu.shares</literal> control group
+          attribute, which defaults to 1024. For details about this
+          control group attribute, see <ulink
           url="https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt">sched-design-CFS.txt</ulink>.
-          The available CPU time is split up among all units within one
-          slice relative to their CPU time share weight.</para>
+          The available CPU time is split up among all units within
+          one slice relative to their CPU time share weight.</para>
 
           <para>While <varname>StartupCPUShares=</varname> only
           applies to the startup phase of the system,
-          <varname>CPUShares=</varname> applies to the later runtime
-          of the system, and if the former is not set also to the
-          startup phase. This allows priorizing specific services at
-          boot-up differently than during runtime.</para>
-
-          <para>Implies <literal>CPUAccounting=true</literal>.</para>
+          <varname>CPUShares=</varname> applies to normal runtime of
+          the system, and if the former is not set also to the startup
+          phase. Using <varname>StartupCPUShares=</varname> allows
+          priorizing specific services at boot-up differently than
+          during normal runtime.</para>
+
+          <para>Those options imply
+          <literal>CPUAccounting=true</literal>.</para>
         </listitem>
       </varlistentry>
 



More information about the systemd-commits mailing list