chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rtnl: drop "sd_" prefix from cleanup macros
[elogind.git]
/
src
/
core
/
dbus-cgroup.c
diff --git
a/src/core/dbus-cgroup.c
b/src/core/dbus-cgroup.c
index 4dbb83a76912fec0e419277a4b7487396a3c5146..792f37eef588e8ac5add4d38283b5fc2dc7b57a5 100644
(file)
--- a/
src/core/dbus-cgroup.c
+++ b/
src/core/dbus-cgroup.c
@@
-33,8
+33,8
@@
static int property_get_blockio_device_weight(
const char *interface,
const char *property,
sd_bus_message *reply,
const char *interface,
const char *property,
sd_bus_message *reply,
-
sd_bus_error *error
,
-
void *userdata
) {
+
void *userdata
,
+
sd_bus_error *error
) {
CGroupContext *c = userdata;
CGroupBlockIODeviceWeight *w;
CGroupContext *c = userdata;
CGroupBlockIODeviceWeight *w;
@@
-63,8
+63,8
@@
static int property_get_blockio_device_bandwidths(
const char *interface,
const char *property,
sd_bus_message *reply,
const char *interface,
const char *property,
sd_bus_message *reply,
-
sd_bus_error *error
,
-
void *userdata
) {
+
void *userdata
,
+
sd_bus_error *error
) {
CGroupContext *c = userdata;
CGroupBlockIODeviceBandwidth *b;
CGroupContext *c = userdata;
CGroupBlockIODeviceBandwidth *b;
@@
-97,8
+97,8
@@
static int property_get_device_allow(
const char *interface,
const char *property,
sd_bus_message *reply,
const char *interface,
const char *property,
sd_bus_message *reply,
-
sd_bus_error *error
,
-
void *userdata
) {
+
void *userdata
,
+
sd_bus_error *error
) {
CGroupContext *c = userdata;
CGroupDeviceAllow *a;
CGroupContext *c = userdata;
CGroupDeviceAllow *a;
@@
-321,10
+321,9
@@
int bus_cgroup_set_property(
if (r < 0)
return r;
if (r < 0)
return r;
- while ((
r = sd_bus_message_read(message, "(st)", &path, &u64)) > 0) {
- unsigned long ul;
+ while ((r = sd_bus_message_read(message, "(st)", &path, &u64)) > 0) {
+ unsigned long ul
= u64
;
- ul = (unsigned long) u64;
if (ul < 10 || ul > 1000)
return sd_bus_error_set_errnof(error, EINVAL, "BlockIODeviceWeight out of range");
if (ul < 10 || ul > 1000)
return sd_bus_error_set_errnof(error, EINVAL, "BlockIODeviceWeight out of range");
@@
-484,6
+483,8
@@
int bus_cgroup_set_property(
n++;
}
n++;
}
+ if (r < 0)
+ return r;
if (mode != UNIT_CHECK) {
_cleanup_free_ char *buf = NULL;
if (mode != UNIT_CHECK) {
_cleanup_free_ char *buf = NULL;