chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gpt-auto-generator: use _cleanup_ for blkid_free_probe
[elogind.git]
/
src
/
machine
/
machine.c
diff --git
a/src/machine/machine.c
b/src/machine/machine.c
index 8e03ff2ec1eaa5942ffdb5426325f94989617e0c..602aa18be670ae3ba127e46104926ae4309f8e1f 100644
(file)
--- a/
src/machine/machine.c
+++ b/
src/machine/machine.c
@@
-217,11
+217,11
@@
int machine_load(Machine *m) {
return r;
}
return r;
}
-static int machine_start_scope(Machine *m) {
+static int machine_start_scope(Machine *m
, DBusMessageIter *iter
) {
_cleanup_free_ char *description = NULL;
DBusError error;
char *job;
_cleanup_free_ char *description = NULL;
DBusError error;
char *job;
- int r;
+ int r
= 0
;
assert(m);
assert(m);
@@
-236,17
+236,18
@@
static int machine_start_scope(Machine *m) {
return log_oom();
scope = strjoin("machine-", escaped, ".scope", NULL);
return log_oom();
scope = strjoin("machine-", escaped, ".scope", NULL);
- if (scope)
+ if (
!
scope)
return log_oom();
description = strappend(m->class == MACHINE_VM ? "Virtual Machine " : "Container ", m->name);
return log_oom();
description = strappend(m->class == MACHINE_VM ? "Virtual Machine " : "Container ", m->name);
- r = manager_start_scope(m->manager,
m->scope, m->leader, SPECIAL_MACHINE_SLICE, description
, &error, &job);
+ r = manager_start_scope(m->manager,
scope, m->leader, SPECIAL_MACHINE_SLICE, description, iter
, &error, &job);
if (r < 0) {
log_error("Failed to start machine scope: %s", bus_error(&error, r));
dbus_error_free(&error);
free(scope);
if (r < 0) {
log_error("Failed to start machine scope: %s", bus_error(&error, r));
dbus_error_free(&error);
free(scope);
+ return r;
} else {
m->scope = scope;
} else {
m->scope = scope;
@@
-261,7
+262,7
@@
static int machine_start_scope(Machine *m) {
return r;
}
return r;
}
-int machine_start(Machine *m) {
+int machine_start(Machine *m
, DBusMessageIter *iter
) {
int r;
assert(m);
int r;
assert(m);
@@
-270,7
+271,7
@@
int machine_start(Machine *m) {
return 0;
/* Create cgroup */
return 0;
/* Create cgroup */
- r = machine_start_scope(m);
+ r = machine_start_scope(m
, iter
);
if (r < 0)
return r;
if (r < 0)
return r;