[systemd-commits] 2 commits - src/dbus-mount.c src/dbus-swap.c src/swap.c TODO
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Oct 26 13:12:20 PDT 2010
TODO | 2 +-
src/dbus-mount.c | 12 ++++++------
src/dbus-swap.c | 17 +++++++++++++++--
src/swap.c | 4 +++-
4 files changed, 25 insertions(+), 10 deletions(-)
New commits:
commit f1a1cd6497a970a8744b6d71cf5355fa9f75669c
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Oct 26 22:06:11 2010 +0200
swap: add default cgroup to swap exec env
diff --git a/src/swap.c b/src/swap.c
index f7f9530..abd8cdd 100644
--- a/src/swap.c
+++ b/src/swap.c
@@ -283,7 +283,6 @@ static int swap_load(Unit *u) {
if ((r = unit_set_description(u, s->what)) < 0)
return r;
-
if ((r = swap_add_device_links(s)) < 0)
return r;
@@ -293,6 +292,9 @@ static int swap_load(Unit *u) {
if ((r = swap_add_target_links(s)) < 0)
return r;
+ if ((r = unit_add_default_cgroup(u)) < 0)
+ return r;
+
if (s->meta.default_dependencies)
if ((r = swap_add_default_dependencies(s)) < 0)
return r;
commit 15412f2987c0f0a562f9cf8edcca023f90a5f5bd
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Oct 26 22:05:52 2010 +0200
swap: expose swap exec env proprties via dbus
diff --git a/TODO b/TODO
index 45ef095..50ad9fa 100644
--- a/TODO
+++ b/TODO
@@ -80,7 +80,7 @@
* make description of .swap files nicer: resolve /dev/by-uuid/ symlink
-* systemctl status getty at tty1.service
+* only add quotacheck deps t .mount units which mention grpquota/usrquota in the mount flags
External:
diff --git a/src/dbus-mount.c b/src/dbus-mount.c
index 92d74cb..4de00f7 100644
--- a/src/dbus-mount.c
+++ b/src/dbus-mount.c
@@ -137,16 +137,16 @@ static int bus_mount_append_type(Manager *n, DBusMessageIter *i, const char *pro
DBusHandlerResult bus_mount_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) {
const BusProperty properties[] = {
BUS_UNIT_PROPERTIES,
- { "org.freedesktop.systemd1.Mount", "Where", bus_property_append_string, "s", u->mount.where },
- { "org.freedesktop.systemd1.Mount", "What", bus_mount_append_what, "s", u },
- { "org.freedesktop.systemd1.Mount", "Options", bus_mount_append_options, "s", u },
- { "org.freedesktop.systemd1.Mount", "Type", bus_mount_append_type, "s", u },
- { "org.freedesktop.systemd1.Mount", "TimeoutUSec", bus_property_append_usec, "t", &u->mount.timeout_usec },
+ { "org.freedesktop.systemd1.Mount", "Where", bus_property_append_string, "s", u->mount.where },
+ { "org.freedesktop.systemd1.Mount", "What", bus_mount_append_what, "s", u },
+ { "org.freedesktop.systemd1.Mount", "Options", bus_mount_append_options, "s", u },
+ { "org.freedesktop.systemd1.Mount", "Type", bus_mount_append_type, "s", u },
+ { "org.freedesktop.systemd1.Mount", "TimeoutUSec", bus_property_append_usec, "t", &u->mount.timeout_usec },
BUS_EXEC_COMMAND_PROPERTY("org.freedesktop.systemd1.Mount", u->mount.exec_command+MOUNT_EXEC_MOUNT, "ExecMount"),
BUS_EXEC_COMMAND_PROPERTY("org.freedesktop.systemd1.Mount", u->mount.exec_command+MOUNT_EXEC_UNMOUNT, "ExecUnmount"),
BUS_EXEC_COMMAND_PROPERTY("org.freedesktop.systemd1.Mount", u->mount.exec_command+MOUNT_EXEC_REMOUNT, "ExecRemount"),
BUS_EXEC_CONTEXT_PROPERTIES("org.freedesktop.systemd1.Mount", u->mount.exec_context),
- { "org.freedesktop.systemd1.Mount", "ControlPID", bus_property_append_pid, "u", &u->mount.control_pid },
+ { "org.freedesktop.systemd1.Mount", "ControlPID", bus_property_append_pid, "u", &u->mount.control_pid },
{ "org.freedesktop.systemd1.Mount", "DirectoryMode", bus_property_append_mode, "u", &u->mount.directory_mode },
{ NULL, NULL, NULL, NULL, NULL }
};
diff --git a/src/dbus-swap.c b/src/dbus-swap.c
index c345d4b..70cccdc 100644
--- a/src/dbus-swap.c
+++ b/src/dbus-swap.c
@@ -24,11 +24,17 @@
#include "dbus-unit.h"
#include "dbus-swap.h"
+#include "dbus-execute.h"
#define BUS_SWAP_INTERFACE \
" <interface name=\"org.freedesktop.systemd1.Swap\">\n" \
" <property name=\"What\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"Priority\" type=\"i\" access=\"read\"/>\n" \
+ " <property name=\"TimeoutUSec\" type=\"t\" access=\"read\"/>\n" \
+ BUS_EXEC_COMMAND_INTERFACE("ExecActivate") \
+ BUS_EXEC_COMMAND_INTERFACE("ExecDeactivate") \
+ BUS_EXEC_CONTEXT_INTERFACE \
+ " <property name=\"ControlPID\" type=\"u\" access=\"read\"/>\n" \
" </interface>\n"
#define INTROSPECTION \
@@ -46,6 +52,9 @@ const char bus_swap_interface[] = BUS_SWAP_INTERFACE;
const char bus_swap_invalidating_properties[] =
"What\0"
"Priority\0"
+ "ExecActivate\0"
+ "ExecDeactivate\0"
+ "ControlPID\0"
"\0";
static int bus_swap_append_priority(Manager *m, DBusMessageIter *i, const char *property, void *data) {
@@ -75,8 +84,12 @@ static int bus_swap_append_priority(Manager *m, DBusMessageIter *i, const char *
DBusHandlerResult bus_swap_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) {
const BusProperty properties[] = {
BUS_UNIT_PROPERTIES,
- { "org.freedesktop.systemd1.Swap", "What", bus_property_append_string, "s", u->swap.what },
- { "org.freedesktop.systemd1.Swap", "Priority", bus_swap_append_priority, "i", u },
+ { "org.freedesktop.systemd1.Swap", "What", bus_property_append_string, "s", u->swap.what },
+ { "org.freedesktop.systemd1.Swap", "Priority", bus_swap_append_priority, "i", u },
+ BUS_EXEC_COMMAND_PROPERTY("org.freedesktop.systemd1.Swap", u->swap.exec_command+SWAP_EXEC_ACTIVATE, "ExecActivate"),
+ BUS_EXEC_COMMAND_PROPERTY("org.freedesktop.systemd1.Swap", u->swap.exec_command+SWAP_EXEC_DEACTIVATE, "ExecDeactivate"),
+ BUS_EXEC_CONTEXT_PROPERTIES("org.freedesktop.systemd1.Swap", u->swap.exec_context),
+ { "org.freedesktop.systemd1.Swap", "ControlPID", bus_property_append_pid, "u", &u->swap.control_pid },
{ NULL, NULL, NULL, NULL, NULL }
};
More information about the systemd-commits
mailing list