From 241da3287d0c16f79e2f415f17543599b3e73c85 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 28 Jun 2013 00:41:24 +0200 Subject: [PATCH] unit: make sure the dropins we write are high-priority --- TODO | 2 ++ src/core/dbus-manager.c | 4 ++-- src/core/dbus-unit.c | 3 +-- src/core/dbus-unit.h | 2 +- src/core/unit.c | 6 +++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/TODO b/TODO index c34f1dab0f..c729215077 100644 --- a/TODO +++ b/TODO @@ -28,6 +28,8 @@ Fedora 19: Features: +* make BlockIODeviceWeight=, BlockIODeviceBandwidth= runtime settable + * split up BlockIOWeight= and BlockIODeviceWeight= * how to reset dynamically changed attributes sanely? diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 353cb22867..c512265903 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -178,8 +178,8 @@ " \n" \ " \n" \ " \n" \ - " \n" \ - " \n" \ + " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index 1611da0172..b3724b679b 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -783,7 +783,6 @@ int bus_unit_set_properties(Unit *u, DBusMessageIter *iter, UnitSetPropertiesMod return -EINVAL; dbus_message_iter_recurse(iter, &sub); - for (;;) { DBusMessageIter sub2, sub3; const char *name; @@ -830,7 +829,7 @@ int bus_unit_set_properties(Unit *u, DBusMessageIter *iter, UnitSetPropertiesMod if (n > 0 && UNIT_VTABLE(u)->bus_commit_properties) UNIT_VTABLE(u)->bus_commit_properties(u); - return 0; + return n; } const BusProperty bus_unit_properties[] = { diff --git a/src/core/dbus-unit.h b/src/core/dbus-unit.h index 2fd56f25c3..1b42757b47 100644 --- a/src/core/dbus-unit.h +++ b/src/core/dbus-unit.h @@ -62,7 +62,7 @@ " \n" \ " \n" \ " \n" \ - " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ diff --git a/src/core/unit.c b/src/core/unit.c index 211704e230..afeb15c154 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -2675,7 +2675,7 @@ static int drop_in_file(Unit *u, UnitSetPropertiesMode mode, const char *name, c if (!p) return -ENOMEM; - q = strjoin(p, "/50-", name, ".conf", NULL); + q = strjoin(p, "/90-", name, ".conf", NULL); if (!q) { free(p); return -ENOMEM; @@ -2733,9 +2733,9 @@ int unit_remove_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *name) { r = drop_in_file(u, mode, name, &p, &q); if (unlink(q) < 0) - r = -errno; + r = errno == ENOENT ? 0 : -errno; else - r = 0; + r = 1; rmdir(p); return r;