chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
74c964d
)
unit: make sure the dropins we write are high-priority
author
Lennart Poettering
<lennart@poettering.net>
Thu, 27 Jun 2013 22:41:24 +0000
(
00:41
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 27 Jun 2013 22:41:24 +0000
(
00:41
+0200)
TODO
patch
|
blob
|
history
src/core/dbus-manager.c
patch
|
blob
|
history
src/core/dbus-unit.c
patch
|
blob
|
history
src/core/dbus-unit.h
patch
|
blob
|
history
src/core/unit.c
patch
|
blob
|
history
diff --git
a/TODO
b/TODO
index c34f1dab0f7c58400570a0b676744dcf4a01c0e8..c7292150778559ef49035dac606ba441a7547a2d 100644
(file)
--- a/
TODO
+++ b/
TODO
@@
-28,6
+28,8
@@
Fedora 19:
Features:
Features:
+* make BlockIODeviceWeight=, BlockIODeviceBandwidth= runtime settable
+
* split up BlockIOWeight= and BlockIODeviceWeight=
* how to reset dynamically changed attributes sanely?
* 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 353cb2286793a54648cd5865038420b506253245..c5122659035c096b9c393c9ed00aa42ec9dbcfe5 100644
(file)
--- a/
src/core/dbus-manager.c
+++ b/
src/core/dbus-manager.c
@@
-178,8
+178,8
@@
" <arg name=\"unset\" type=\"as\" direction=\"in\"/>\n" \
" <arg name=\"set\" type=\"as\" direction=\"in\"/>\n" \
" </method>\n" \
" <arg name=\"unset\" type=\"as\" direction=\"in\"/>\n" \
" <arg name=\"set\" type=\"as\" direction=\"in\"/>\n" \
" </method>\n" \
- " <method name=\"ListUnitFiles\">\n"
\
- " <arg name=\"files\" type=\"a(ss)\" direction=\"out\"/>\n" \
+ " <method name=\"ListUnitFiles\">\n" \
+ " <arg name=\"files\" type=\"a(ss)\" direction=\"out\"/>\n"
\
" </method>\n" \
" <method name=\"GetUnitFileState\">\n" \
" <arg name=\"file\" type=\"s\" direction=\"in\"/>\n" \
" </method>\n" \
" <method name=\"GetUnitFileState\">\n" \
" <arg name=\"file\" type=\"s\" direction=\"in\"/>\n" \
diff --git
a/src/core/dbus-unit.c
b/src/core/dbus-unit.c
index 1611da0172daa336cb7fb5ef4adb19c4647cb9f7..b3724b679bb025b9e07a7700165e23c9fd4924c8 100644
(file)
--- 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);
return -EINVAL;
dbus_message_iter_recurse(iter, &sub);
-
for (;;) {
DBusMessageIter sub2, sub3;
const char *name;
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);
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[] = {
}
const BusProperty bus_unit_properties[] = {
diff --git
a/src/core/dbus-unit.h
b/src/core/dbus-unit.h
index 2fd56f25c36bf216ca3e7ba3a2b015343b6b1fdf..1b42757b47396407893bb7158c89d90d37d3d203 100644
(file)
--- a/
src/core/dbus-unit.h
+++ b/
src/core/dbus-unit.h
@@
-62,7
+62,7
@@
" </method>\n" \
" <method name=\"ResetFailed\"/>\n" \
" <method name=\"SetProperties\">\n" \
" </method>\n" \
" <method name=\"ResetFailed\"/>\n" \
" <method name=\"SetProperties\">\n" \
- " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n"
\
+ " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
" <arg name=\"properties\" type=\"a(sv)\" direction=\"in\"/>\n" \
" </method>\n" \
" <property name=\"Id\" type=\"s\" access=\"read\"/>\n" \
" <arg name=\"properties\" type=\"a(sv)\" direction=\"in\"/>\n" \
" </method>\n" \
" <property name=\"Id\" type=\"s\" access=\"read\"/>\n" \
diff --git
a/src/core/unit.c
b/src/core/unit.c
index 211704e230603882f78490ee314df5163a469252..afeb15c1542ac10e3b90ceccb2c23bafd2be3c88 100644
(file)
--- 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;
if (!p)
return -ENOMEM;
- q = strjoin(p, "/
5
0-", name, ".conf", NULL);
+ q = strjoin(p, "/
9
0-", name, ".conf", NULL);
if (!q) {
free(p);
return -ENOMEM;
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 = drop_in_file(u, mode, name, &p, &q);
if (unlink(q) < 0)
- r = -errno;
+ r =
errno == ENOENT ? 0 :
-errno;
else
else
- r =
0
;
+ r =
1
;
rmdir(p);
return r;
rmdir(p);
return r;