[systemd-commits] 2 commits - Makefile.am TODO man/sd_journal_get_fd.xml man/systemd.unit.xml src/core src/cryptsetup units/hibernate.target units/serial-getty at .service.m4 units/suspend.target units/systemd-fsck at .service.in

Lennart Poettering lennart at kemper.freedesktop.org
Fri Jul 13 14:39:02 PDT 2012


 Makefile.am                           |    1 -
 TODO                                  |    4 ----
 man/sd_journal_get_fd.xml             |    3 +++
 man/systemd.unit.xml                  |    6 +++---
 src/core/dbus-unit.c                  |    6 +++---
 src/core/dbus-unit.h                  |    6 +++---
 src/core/load-fragment-gperf.gperf.m4 |    9 ++++++---
 src/core/service.c                    |    2 +-
 src/core/target.c                     |    2 +-
 src/core/transaction.c                |    4 ++--
 src/core/unit.c                       |   20 ++++++++++----------
 src/core/unit.h                       |    8 ++++----
 src/cryptsetup/cryptsetup-generator.c |    2 +-
 units/hibernate.target                |    2 +-
 units/serial-getty at .service.m4        |    2 +-
 units/suspend.target                  |    2 +-
 units/systemd-fsck at .service.in        |    2 +-
 17 files changed, 41 insertions(+), 40 deletions(-)

New commits:
commit 95694951a0905dd748c6902268b15e3a56632da2
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jul 13 23:38:32 2012 +0200

    build-sys: fix build

diff --git a/Makefile.am b/Makefile.am
index a5cd5fa..e4bd725 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -546,7 +546,6 @@ MANPAGES_ALIAS = \
 	man/SD_ID128_FORMAT_VAL.3 \
 	man/sd_id128_equal.3 \
 	man/sd_id128_from_string.3 \
-	man/sd_id128_get_machine.3 \
 	man/sd_id128_get_boot.3 \
 	man/sd_journal_printv.3 \
 	man/sd_journal_send.3 \
diff --git a/man/sd_journal_get_fd.xml b/man/sd_journal_get_fd.xml
index 6c2660c..7fb151e 100644
--- a/man/sd_journal_get_fd.xml
+++ b/man/sd_journal_get_fd.xml
@@ -46,6 +46,9 @@
                 <refname>sd_journal_get_fd</refname>
                 <refname>sd_journal_process</refname>
                 <refname>sd_journal_wait</refname>
+                <refname>SD_JOURNAL_NOP</refname>
+                <refname>SD_JOURNAL_APPEND</refname>
+                <refname>SD_JOURNAL_INVALIDATE</refname>
                 <refpurpose>Journal change notification
                 interface</refpurpose>
         </refnamediv>

commit 7f2cddae09fd2579ae24434df577bb5e5a157d86
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jul 13 23:34:40 2012 +0200

    unit: rename BindTo= to BindsTo=
    
    all other dependencies are in 3rd person. Change BindTo= accordingly to
    BindsTo=.
    
    Of course, the dependency is widely used, hence we parse the old name
    too for compatibility.

diff --git a/TODO b/TODO
index 3bf6ef8..61c0b57 100644
--- a/TODO
+++ b/TODO
@@ -40,12 +40,8 @@ Features:
 
 * seccomp filters for services
 
-* replace BindTo= by BindsTo=, but keep old name for compat
-
 * switch-root: sockets need relabelling
 
-* switch-root: handle journald restart
-
 * segfault in journalctl during /var migration
 
 * systemd-analyze post-boot is broken for initrd
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 93fb37b..3fd76f3 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -410,7 +410,7 @@
                         </varlistentry>
 
                         <varlistentry>
-                                <term><varname>BindTo=</varname></term>
+                                <term><varname>BindsTo=</varname></term>
 
                                 <listitem><para>Configures requirement
                                 dependencies, very similar in style to
@@ -527,8 +527,8 @@
                         </varlistentry>
 
                         <varlistentry>
-                                <term><varname>PropagateReloadTo=</varname></term>
-                                <term><varname>PropagateReloadFrom=</varname></term>
+                                <term><varname>PropagatesReloadTo=</varname></term>
+                                <term><varname>ReloadPropagatedFrom=</varname></term>
 
                                 <listitem><para>Lists one or more
                                 units where reload requests on the
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index f85f3f8..2114587 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -793,7 +793,7 @@ const BusProperty bus_unit_properties[] = {
         { "Requisite",            bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_REQUISITE]),               true },
         { "RequisiteOverridable", bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_REQUISITE_OVERRIDABLE]),   true },
         { "Wants",                bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_WANTS]),                   true },
-        { "BindTo",               bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_BIND_TO]),                 true },
+        { "BindsTo",              bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_BINDS_TO]),                true },
         { "RequiredBy",           bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_REQUIRED_BY]),             true },
         { "RequiredByOverridable",bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_REQUIRED_BY_OVERRIDABLE]), true },
         { "WantedBy",             bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_WANTED_BY]),               true },
@@ -805,8 +805,8 @@ const BusProperty bus_unit_properties[] = {
         { "OnFailure",            bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_ON_FAILURE]),              true },
         { "Triggers",             bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_TRIGGERS]),                true },
         { "TriggeredBy",          bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_TRIGGERED_BY]),            true },
-        { "PropagateReloadTo",    bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_PROPAGATE_RELOAD_TO]),     true },
-        { "PropagateReloadFrom",  bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_PROPAGATE_RELOAD_FROM]),   true },
+        { "PropagatesReloadTo",   bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_PROPAGATES_RELOAD_TO]),    true },
+        { "ReloadPropagatedFrom", bus_unit_append_dependencies,      "as", offsetof(Unit, dependencies[UNIT_RELOAD_PROPAGATED_FROM]),  true },
         { "RequiresMountsFor",    bus_property_append_strv,          "as", offsetof(Unit, requires_mounts_for),                        true },
         { "Documentation",        bus_property_append_strv,          "as", offsetof(Unit, documentation),                              true },
         { "Description",          bus_unit_append_description,        "s", 0 },
diff --git a/src/core/dbus-unit.h b/src/core/dbus-unit.h
index ae94ca2..d5902ee 100644
--- a/src/core/dbus-unit.h
+++ b/src/core/dbus-unit.h
@@ -71,7 +71,7 @@
         "  <property name=\"Requisite\" type=\"as\" access=\"read\"/>\n" \
         "  <property name=\"RequisiteOverridable\" type=\"as\" access=\"read\"/>\n" \
         "  <property name=\"Wants\" type=\"as\" access=\"read\"/>\n"    \
-        "  <property name=\"BindTo\" type=\"as\" access=\"read\"/>\n"    \
+        "  <property name=\"BindsTo\" type=\"as\" access=\"read\"/>\n"    \
         "  <property name=\"RequiredBy\" type=\"as\" access=\"read\"/>\n" \
         "  <property name=\"RequiredByOverridable\" type=\"as\" access=\"read\"/>\n" \
         "  <property name=\"WantedBy\" type=\"as\" access=\"read\"/>\n" \
@@ -83,8 +83,8 @@
         "  <property name=\"OnFailure\" type=\"as\" access=\"read\"/>\n"    \
         "  <property name=\"Triggers\" type=\"as\" access=\"read\"/>\n"    \
         "  <property name=\"TriggeredBy\" type=\"as\" access=\"read\"/>\n"    \
-        "  <property name=\"PropagateReloadTo\" type=\"as\" access=\"read\"/>\n" \
-        "  <property name=\"PropagateReloadFrom\" type=\"as\" access=\"read\"/>\n" \
+        "  <property name=\"PropagatesReloadTo\" type=\"as\" access=\"read\"/>\n" \
+        "  <property name=\"ReloadPropagatedFrom\" type=\"as\" access=\"read\"/>\n" \
         "  <property name=\"RequiresMountsFor\" type=\"as\" access=\"read\"/>\n" \
         "  <property name=\"Description\" type=\"s\" access=\"read\"/>\n" \
         "  <property name=\"SourcePath\" type=\"s\" access=\"read\"/>\n" \
diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4
index f5e9b70..192c2b2 100644
--- a/src/core/load-fragment-gperf.gperf.m4
+++ b/src/core/load-fragment-gperf.gperf.m4
@@ -98,13 +98,16 @@ Unit.RequiresOverridable,        config_parse_unit_deps,             UNIT_REQUIR
 Unit.Requisite,                  config_parse_unit_deps,             UNIT_REQUISITE,                0
 Unit.RequisiteOverridable,       config_parse_unit_deps,             UNIT_REQUISITE_OVERRIDABLE,    0
 Unit.Wants,                      config_parse_unit_deps,             UNIT_WANTS,                    0
-Unit.BindTo,                     config_parse_unit_deps,             UNIT_BIND_TO,                  0
+Unit.BindsTo,                    config_parse_unit_deps,             UNIT_BINDS_TO,                 0
+Unit.BindTo,                     config_parse_unit_deps,             UNIT_BINDS_TO,                 0
 Unit.Conflicts,                  config_parse_unit_deps,             UNIT_CONFLICTS,                0
 Unit.Before,                     config_parse_unit_deps,             UNIT_BEFORE,                   0
 Unit.After,                      config_parse_unit_deps,             UNIT_AFTER,                    0
 Unit.OnFailure,                  config_parse_unit_deps,             UNIT_ON_FAILURE,               0
-Unit.PropagateReloadTo,          config_parse_unit_deps,             UNIT_PROPAGATE_RELOAD_TO,      0
-Unit.PropagateReloadFrom,        config_parse_unit_deps,             UNIT_PROPAGATE_RELOAD_FROM,    0
+Unit.PropagatesReloadTo,         config_parse_unit_deps,             UNIT_PROPAGATES_RELOAD_TO,     0
+Unit.PropagateReloadTo,          config_parse_unit_deps,             UNIT_PROPAGATES_RELOAD_TO,     0
+Unit.ReloadPropagatedFrom,       config_parse_unit_deps,             UNIT_RELOAD_PROPAGATED_FROM,   0
+Unit.PropagateReloadFrom,        config_parse_unit_deps,             UNIT_RELOAD_PROPAGATED_FROM,   0
 Unit.RequiresMountsFor,          config_parse_unit_requires_mounts_for, 0,                          offsetof(Unit, requires_mounts_for)
 Unit.StopWhenUnneeded,           config_parse_bool,                  0,                             offsetof(Unit, stop_when_unneeded)
 Unit.RefuseManualStart,          config_parse_bool,                  0,                             offsetof(Unit, refuse_manual_start)
diff --git a/src/core/service.c b/src/core/service.c
index 2be6ee5..0a66588 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2464,7 +2464,7 @@ static int service_start(Unit *u) {
                 return 0;
 
         /* A service that will be restarted must be stopped first to
-         * trigger BindTo and/or OnFailure dependencies. If a user
+         * trigger BindsTo and/or OnFailure dependencies. If a user
          * does not want to wait for the holdoff time to elapse, the
          * service should be manually restarted, not started. */
         if (s->state == SERVICE_AUTO_RESTART) {
diff --git a/src/core/target.c b/src/core/target.c
index 092b206..55f9fc6 100644
--- a/src/core/target.c
+++ b/src/core/target.c
@@ -59,7 +59,7 @@ static int target_add_default_dependencies(Target *t) {
                 UNIT_REQUISITE,
                 UNIT_REQUISITE_OVERRIDABLE,
                 UNIT_WANTS,
-                UNIT_BIND_TO
+                UNIT_BINDS_TO
         };
 
         Iterator i;
diff --git a/src/core/transaction.c b/src/core/transaction.c
index 44fdc06..a1cf706 100644
--- a/src/core/transaction.c
+++ b/src/core/transaction.c
@@ -893,7 +893,7 @@ int transaction_add_job_and_dependencies(
                                 }
                         }
 
-                        SET_FOREACH(dep, ret->unit->dependencies[UNIT_BIND_TO], i) {
+                        SET_FOREACH(dep, ret->unit->dependencies[UNIT_BINDS_TO], i) {
                                 r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, true, override, false, false, ignore_order, e);
                                 if (r < 0) {
                                         if (r != -EBADR)
@@ -998,7 +998,7 @@ int transaction_add_job_and_dependencies(
 
                 if (type == JOB_RELOAD) {
 
-                        SET_FOREACH(dep, ret->unit->dependencies[UNIT_PROPAGATE_RELOAD_TO], i) {
+                        SET_FOREACH(dep, ret->unit->dependencies[UNIT_PROPAGATES_RELOAD_TO], i) {
                                 r = transaction_add_job_and_dependencies(tr, JOB_RELOAD, dep, ret, false, override, false, false, ignore_order, e);
                                 if (r < 0) {
                                         log_warning("Cannot add dependency reload job for unit %s, ignoring: %s", dep->id, bus_error(e, r));
diff --git a/src/core/unit.c b/src/core/unit.c
index 516f4fa..6914ccd 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -1144,7 +1144,7 @@ static void retroactively_start_dependencies(Unit *u) {
                     !UNIT_IS_ACTIVE_OR_ACTIVATING(unit_active_state(other)))
                         manager_add_job(u->manager, JOB_START, other, JOB_REPLACE, true, NULL, NULL);
 
-        SET_FOREACH(other, u->dependencies[UNIT_BIND_TO], i)
+        SET_FOREACH(other, u->dependencies[UNIT_BINDS_TO], i)
                 if (!set_get(u->dependencies[UNIT_AFTER], other) &&
                     !UNIT_IS_ACTIVE_OR_ACTIVATING(unit_active_state(other)))
                         manager_add_job(u->manager, JOB_START, other, JOB_REPLACE, true, NULL, NULL);
@@ -1209,7 +1209,7 @@ static void check_unneeded_dependencies(Unit *u) {
         SET_FOREACH(other, u->dependencies[UNIT_REQUISITE_OVERRIDABLE], i)
                 if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other)))
                         unit_check_unneeded(other);
-        SET_FOREACH(other, u->dependencies[UNIT_BIND_TO], i)
+        SET_FOREACH(other, u->dependencies[UNIT_BINDS_TO], i)
                 if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other)))
                         unit_check_unneeded(other);
 }
@@ -1595,11 +1595,11 @@ int unit_add_dependency(Unit *u, UnitDependency d, Unit *other, bool add_referen
                 [UNIT_WANTS] = UNIT_WANTED_BY,
                 [UNIT_REQUISITE] = UNIT_REQUIRED_BY,
                 [UNIT_REQUISITE_OVERRIDABLE] = UNIT_REQUIRED_BY_OVERRIDABLE,
-                [UNIT_BIND_TO] = UNIT_BOUND_BY,
+                [UNIT_BINDS_TO] = UNIT_BOUND_BY,
                 [UNIT_REQUIRED_BY] = _UNIT_DEPENDENCY_INVALID,
                 [UNIT_REQUIRED_BY_OVERRIDABLE] = _UNIT_DEPENDENCY_INVALID,
                 [UNIT_WANTED_BY] = _UNIT_DEPENDENCY_INVALID,
-                [UNIT_BOUND_BY] = UNIT_BIND_TO,
+                [UNIT_BOUND_BY] = UNIT_BINDS_TO,
                 [UNIT_CONFLICTS] = UNIT_CONFLICTED_BY,
                 [UNIT_CONFLICTED_BY] = UNIT_CONFLICTS,
                 [UNIT_BEFORE] = UNIT_AFTER,
@@ -1609,8 +1609,8 @@ int unit_add_dependency(Unit *u, UnitDependency d, Unit *other, bool add_referen
                 [UNIT_REFERENCED_BY] = UNIT_REFERENCES,
                 [UNIT_TRIGGERS] = UNIT_TRIGGERED_BY,
                 [UNIT_TRIGGERED_BY] = UNIT_TRIGGERS,
-                [UNIT_PROPAGATE_RELOAD_TO] = UNIT_PROPAGATE_RELOAD_FROM,
-                [UNIT_PROPAGATE_RELOAD_FROM] = UNIT_PROPAGATE_RELOAD_TO
+                [UNIT_PROPAGATES_RELOAD_TO] = UNIT_RELOAD_PROPAGATED_FROM,
+                [UNIT_RELOAD_PROPAGATED_FROM] = UNIT_PROPAGATES_RELOAD_TO
         };
         int r, q = 0, v = 0, w = 0;
 
@@ -2519,7 +2519,7 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
         if (r < 0)
                 return r;
 
-        if ((r = unit_add_two_dependencies(u, UNIT_AFTER, UNIT_BIND_TO, device, true)) < 0)
+        if ((r = unit_add_two_dependencies(u, UNIT_AFTER, UNIT_BINDS_TO, device, true)) < 0)
                 return r;
 
         if (wants)
@@ -2765,7 +2765,7 @@ static const char* const unit_dependency_table[_UNIT_DEPENDENCY_MAX] = {
         [UNIT_REQUISITE_OVERRIDABLE] = "RequisiteOverridable",
         [UNIT_REQUIRED_BY] = "RequiredBy",
         [UNIT_REQUIRED_BY_OVERRIDABLE] = "RequiredByOverridable",
-        [UNIT_BIND_TO] = "BindTo",
+        [UNIT_BINDS_TO] = "BindsTo",
         [UNIT_WANTED_BY] = "WantedBy",
         [UNIT_CONFLICTS] = "Conflicts",
         [UNIT_CONFLICTED_BY] = "ConflictedBy",
@@ -2777,8 +2777,8 @@ static const char* const unit_dependency_table[_UNIT_DEPENDENCY_MAX] = {
         [UNIT_ON_FAILURE] = "OnFailure",
         [UNIT_TRIGGERS] = "Triggers",
         [UNIT_TRIGGERED_BY] = "TriggeredBy",
-        [UNIT_PROPAGATE_RELOAD_TO] = "PropagateReloadTo",
-        [UNIT_PROPAGATE_RELOAD_FROM] = "PropagateReloadFrom"
+        [UNIT_PROPAGATES_RELOAD_TO] = "PropagatesReloadTo",
+        [UNIT_RELOAD_PROPAGATED_FROM] = "ReloadPropagatedFrom"
 };
 
 DEFINE_STRING_TABLE_LOOKUP(unit_dependency, UnitDependency);
diff --git a/src/core/unit.h b/src/core/unit.h
index 0e1e72e..9d75e02 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -76,13 +76,13 @@ enum UnitDependency {
         UNIT_REQUISITE,
         UNIT_REQUISITE_OVERRIDABLE,
         UNIT_WANTS,
-        UNIT_BIND_TO,
+        UNIT_BINDS_TO,
 
         /* Inverse of the above */
         UNIT_REQUIRED_BY,             /* inverse of 'requires' and 'requisite' is 'required_by' */
         UNIT_REQUIRED_BY_OVERRIDABLE, /* inverse of 'requires_overridable' and 'requisite_overridable' is 'soft_required_by' */
         UNIT_WANTED_BY,               /* inverse of 'wants' */
-        UNIT_BOUND_BY,                /* inverse of 'bind_to' */
+        UNIT_BOUND_BY,                /* inverse of 'binds_to' */
 
         /* Negative dependencies */
         UNIT_CONFLICTS,               /* inverse of 'conflicts' is 'conflicted_by' */
@@ -100,8 +100,8 @@ enum UnitDependency {
         UNIT_TRIGGERED_BY,
 
         /* Propagate reloads */
-        UNIT_PROPAGATE_RELOAD_TO,
-        UNIT_PROPAGATE_RELOAD_FROM,
+        UNIT_PROPAGATES_RELOAD_TO,
+        UNIT_RELOAD_PROPAGATED_FROM,
 
         /* Reference information for GC logic */
         UNIT_REFERENCES,              /* Inverse of 'references' is 'referenced_by' */
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
index 7801de6..d098424 100644
--- a/src/cryptsetup/cryptsetup-generator.c
+++ b/src/cryptsetup/cryptsetup-generator.c
@@ -124,7 +124,7 @@ static int create_disk(
                 "SourcePath=/etc/crypttab\n"
                 "Conflicts=umount.target\n"
                 "DefaultDependencies=no\n"
-                "BindTo=%s dev-mapper-%%i.device\n"
+                "BindsTo=%s dev-mapper-%%i.device\n"
                 "After=systemd-readahead-collect.service systemd-readahead-replay.service %s\n"
                 "Before=umount.target\n",
                 d, d);
diff --git a/units/hibernate.target b/units/hibernate.target
index c564602..143eb59 100644
--- a/units/hibernate.target
+++ b/units/hibernate.target
@@ -9,5 +9,5 @@
 Description=Hibernate
 Documentation=man:systemd.special(7)
 DefaultDependencies=no
-BindTo=systemd-hibernate.service
+BindsTo=systemd-hibernate.service
 After=systemd-hibernate.service
diff --git a/units/serial-getty at .service.m4 b/units/serial-getty at .service.m4
index fa386ea..d6a7669 100644
--- a/units/serial-getty at .service.m4
+++ b/units/serial-getty at .service.m4
@@ -8,7 +8,7 @@
 [Unit]
 Description=Serial Getty on %I
 Documentation=man:agetty(8) man:systemd-getty-generator(8)
-BindTo=dev-%i.device
+BindsTo=dev-%i.device
 After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
 m4_ifdef(`TARGET_FEDORA',
 After=rc-local.service
diff --git a/units/suspend.target b/units/suspend.target
index 83f69f1..f50cb22 100644
--- a/units/suspend.target
+++ b/units/suspend.target
@@ -9,5 +9,5 @@
 Description=Suspend
 Documentation=man:systemd.special(7)
 DefaultDependencies=no
-BindTo=systemd-suspend.service
+BindsTo=systemd-suspend.service
 After=systemd-suspend.service
diff --git a/units/systemd-fsck at .service.in b/units/systemd-fsck at .service.in
index 1cade4e..b3c71eb 100644
--- a/units/systemd-fsck at .service.in
+++ b/units/systemd-fsck at .service.in
@@ -9,7 +9,7 @@
 Description=File System Check on %f
 Documentation=man:systemd-fsck at .service(8)
 DefaultDependencies=no
-BindTo=%i.device
+BindsTo=%i.device
 After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device
 Before=shutdown.target
 



More information about the systemd-commits mailing list