[systemd-commits] 3 commits - TODO src/core

Lennart Poettering lennart at kemper.freedesktop.org
Thu Oct 4 11:10:16 PDT 2012


 TODO                    |    8 ++++
 src/core/dbus-manager.c |   81 +++++++++++++++++++++++++++++-------------------
 2 files changed, 58 insertions(+), 31 deletions(-)

New commits:
commit 9b27910bb0c23e5225fc1177176e4f9bf9bf787b
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Oct 4 14:10:02 2012 -0400

    update TODO

diff --git a/TODO b/TODO
index 1f4403f..486b672 100644
--- a/TODO
+++ b/TODO
@@ -19,6 +19,8 @@ F18:
 
 Features:
 
+* introduce generic AUGMENT_PID=, AUGMENT_DEVICE= fields
+
 * deal with sendmail/postfix exclusivity
 
 * systemctl enable: improve the success messages

commit dfae3488f790bd9ce7949730d0277fdc525fa699
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Oct 4 14:08:17 2012 -0400

    dbus: expose Virtualization ID on PID1's bus interface
    
    This allows unprivileged clients to check for the used virtualization
    even when lacking the privileges that some of the virtualization tests
    require.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684801

diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 9cdecfc..8a64494 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -35,6 +35,7 @@
 #include "hwclock.h"
 #include "path-util.h"
 #include "dbus-unit.h"
+#include "virt.h"
 
 #define BUS_MANAGER_INTERFACE_BEGIN                                     \
         " <interface name=\"org.freedesktop.systemd1.Manager\">\n"
@@ -258,7 +259,8 @@
         "  <property name=\"DefaultStandardOutput\" type=\"s\" access=\"read\"/>\n" \
         "  <property name=\"DefaultStandardError\" type=\"s\" access=\"read\"/>\n" \
         "  <property name=\"RuntimeWatchdogUSec\" type=\"s\" access=\"readwrite\"/>\n" \
-        "  <property name=\"ShutdownWatchdogUSec\" type=\"s\" access=\"readwrite\"/>\n"
+        "  <property name=\"ShutdownWatchdogUSec\" type=\"s\" access=\"readwrite\"/>\n" \
+        "  <property name=\"Virtualization\" type=\"s\" access=\"read\"/>\n"
 
 #define BUS_MANAGER_INTERFACE_END                                       \
         " </interface>\n"
@@ -425,6 +427,22 @@ static int bus_manager_append_progress(DBusMessageIter *i, const char *property,
         return 0;
 }
 
+static int bus_manager_append_virt(DBusMessageIter *i, const char *property, void *data) {
+        Manager *m = data;
+        const char *id = "";
+
+        assert(i);
+        assert(property);
+        assert(m);
+
+        detect_virtualization(&id);
+
+        if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &id))
+                return -ENOMEM;
+
+        return 0;
+}
+
 static DBusMessage *message_from_file_changes(
                 DBusMessage *m,
                 UnitFileChange *changes,
@@ -515,36 +533,37 @@ static const BusProperty bus_systemd_properties[] = {
 };
 
 static const BusProperty bus_manager_properties[] = {
-        { "Tainted",       bus_manager_append_tainted,             "s", 0                                              },
-        { "FirmwareTimestamp", bus_property_append_uint64,         "t", offsetof(Manager, firmware_timestamp.realtime) },
-        { "FirmwareTimestampMonotonic", bus_property_append_uint64,"t", offsetof(Manager, firmware_timestamp.monotonic)},
-        { "LoaderTimestamp", bus_property_append_uint64,           "t", offsetof(Manager, loader_timestamp.realtime)   },
-        { "LoaderTimestampMonotonic", bus_property_append_uint64,  "t", offsetof(Manager, loader_timestamp.monotonic)  },
-        { "KernelTimestamp", bus_property_append_uint64,           "t", offsetof(Manager, kernel_timestamp.realtime)   },
-        { "KernelTimestampMonotonic", bus_property_append_uint64,  "t", offsetof(Manager, kernel_timestamp.monotonic)  },
-        { "InitRDTimestamp", bus_property_append_uint64,           "t", offsetof(Manager, initrd_timestamp.realtime)   },
-        { "InitRDTimestampMonotonic", bus_property_append_uint64,  "t", offsetof(Manager, initrd_timestamp.monotonic)  },
-        { "UserspaceTimestamp", bus_property_append_uint64,        "t", offsetof(Manager, userspace_timestamp.realtime)},
-        { "UserspaceTimestampMonotonic", bus_property_append_uint64,"t",offsetof(Manager, userspace_timestamp.monotonic)},
-        { "FinishTimestamp", bus_property_append_uint64,           "t", offsetof(Manager, finish_timestamp.realtime)   },
-        { "FinishTimestampMonotonic", bus_property_append_uint64,  "t", offsetof(Manager, finish_timestamp.monotonic)  },
-        { "LogLevel",      bus_manager_append_log_level,           "s", 0,                                             false, bus_manager_set_log_level },
-        { "LogTarget",     bus_manager_append_log_target,          "s", 0,                                             false, bus_manager_set_log_target },
-        { "NNames",        bus_manager_append_n_names,             "u", 0                                              },
-        { "NJobs",         bus_manager_append_n_jobs,              "u", 0                                              },
-        { "NInstalledJobs",bus_property_append_uint32,             "u", offsetof(Manager, n_installed_jobs)            },
-        { "NFailedJobs",   bus_property_append_uint32,             "u", offsetof(Manager, n_failed_jobs)               },
-        { "Progress",      bus_manager_append_progress,            "d", 0                                              },
-        { "Environment",   bus_property_append_strv,              "as", offsetof(Manager, environment),                true },
-        { "ConfirmSpawn",  bus_property_append_bool,               "b", offsetof(Manager, confirm_spawn)               },
-        { "ShowStatus",    bus_property_append_bool,               "b", offsetof(Manager, show_status)                 },
-        { "UnitPath",      bus_property_append_strv,              "as", offsetof(Manager, lookup_paths.unit_path),     true },
-        { "ControlGroupHierarchy", bus_property_append_string,     "s", offsetof(Manager, cgroup_hierarchy),           true },
-        { "DefaultControllers", bus_property_append_strv,         "as", offsetof(Manager, default_controllers),        true },
-        { "DefaultStandardOutput", bus_manager_append_exec_output, "s", offsetof(Manager, default_std_output)          },
-        { "DefaultStandardError",  bus_manager_append_exec_output, "s", offsetof(Manager, default_std_error)           },
-        { "RuntimeWatchdogUSec", bus_property_append_usec,         "t", offsetof(Manager, runtime_watchdog),           false, bus_manager_set_runtime_watchdog_usec },
-        { "ShutdownWatchdogUSec", bus_property_append_usec,        "t", offsetof(Manager, shutdown_watchdog),          false, bus_property_set_usec },
+        { "Tainted",                     bus_manager_append_tainted,     "s",  0                                                },
+        { "FirmwareTimestamp",           bus_property_append_uint64,     "t",  offsetof(Manager, firmware_timestamp.realtime)   },
+        { "FirmwareTimestampMonotonic",  bus_property_append_uint64,     "t",  offsetof(Manager, firmware_timestamp.monotonic)  },
+        { "LoaderTimestamp",             bus_property_append_uint64,     "t",  offsetof(Manager, loader_timestamp.realtime)     },
+        { "LoaderTimestampMonotonic",    bus_property_append_uint64,     "t",  offsetof(Manager, loader_timestamp.monotonic)    },
+        { "KernelTimestamp",             bus_property_append_uint64,     "t",  offsetof(Manager, kernel_timestamp.realtime)     },
+        { "KernelTimestampMonotonic",    bus_property_append_uint64,     "t",  offsetof(Manager, kernel_timestamp.monotonic)    },
+        { "InitRDTimestamp",             bus_property_append_uint64,     "t",  offsetof(Manager, initrd_timestamp.realtime)     },
+        { "InitRDTimestampMonotonic",    bus_property_append_uint64,     "t",  offsetof(Manager, initrd_timestamp.monotonic)    },
+        { "UserspaceTimestamp",          bus_property_append_uint64,     "t",  offsetof(Manager, userspace_timestamp.realtime)  },
+        { "UserspaceTimestampMonotonic", bus_property_append_uint64,     "t",  offsetof(Manager, userspace_timestamp.monotonic) },
+        { "FinishTimestamp",             bus_property_append_uint64,     "t",  offsetof(Manager, finish_timestamp.realtime)     },
+        { "FinishTimestampMonotonic",    bus_property_append_uint64,     "t",  offsetof(Manager, finish_timestamp.monotonic)    },
+        { "LogLevel",                    bus_manager_append_log_level,   "s",  0,                                               false, bus_manager_set_log_level },
+        { "LogTarget",                   bus_manager_append_log_target,  "s",  0,                                               false, bus_manager_set_log_target },
+        { "NNames",                      bus_manager_append_n_names,     "u",  0                                                },
+        { "NJobs",                       bus_manager_append_n_jobs,      "u",  0                                                },
+        { "NInstalledJobs",              bus_property_append_uint32,     "u",  offsetof(Manager, n_installed_jobs)              },
+        { "NFailedJobs",                 bus_property_append_uint32,     "u",  offsetof(Manager, n_failed_jobs)                 },
+        { "Progress",                    bus_manager_append_progress,    "d",  0                                                },
+        { "Environment",                 bus_property_append_strv,       "as", offsetof(Manager, environment),                  true },
+        { "ConfirmSpawn",                bus_property_append_bool,       "b",  offsetof(Manager, confirm_spawn)                 },
+        { "ShowStatus",                  bus_property_append_bool,       "b",  offsetof(Manager, show_status)                   },
+        { "UnitPath",                    bus_property_append_strv,       "as", offsetof(Manager, lookup_paths.unit_path),       true },
+        { "ControlGroupHierarchy",       bus_property_append_string,     "s",  offsetof(Manager, cgroup_hierarchy),             true },
+        { "DefaultControllers",          bus_property_append_strv,       "as", offsetof(Manager, default_controllers),          true },
+        { "DefaultStandardOutput",       bus_manager_append_exec_output, "s",  offsetof(Manager, default_std_output)            },
+        { "DefaultStandardError",        bus_manager_append_exec_output, "s",  offsetof(Manager, default_std_error)             },
+        { "RuntimeWatchdogUSec",         bus_property_append_usec,       "t",  offsetof(Manager, runtime_watchdog),             false, bus_manager_set_runtime_watchdog_usec },
+        { "ShutdownWatchdogUSec",        bus_property_append_usec,       "t",  offsetof(Manager, shutdown_watchdog),            false, bus_property_set_usec },
+        { "Virtualization",              bus_manager_append_virt,        "s",  0,                                               },
         { NULL, }
 };
 

commit b03bfa212dd23397871e36ea32c35cdd8fe43506
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Oct 4 08:19:42 2012 -0400

    update TODO

diff --git a/TODO b/TODO
index 5329c08..1f4403f 100644
--- a/TODO
+++ b/TODO
@@ -19,6 +19,12 @@ F18:
 
 Features:
 
+* deal with sendmail/postfix exclusivity
+
+* systemctl enable: improve the success messages
+
+* systemctl enable: fail if target to alias into doesn't exist? maybe show how many units are enabled afterwards?
+
 * on shutdown: move utmp, wall, audit logic all into PID 1 itsel
 
 * add "provisioning" instructions to setup an empty /etc + /var



More information about the systemd-commits mailing list