mirror of
https://github.com/systemd/systemd
synced 2024-10-15 04:24:19 +00:00
core: actually make SwitchRoot() bus call do the deed
This commit is contained in:
parent
1302759d15
commit
92b315dfb4
|
@ -1121,7 +1121,7 @@ static int method_switch_root(sd_bus *bus, sd_bus_message *message, void *userda
|
|||
if (!isempty(init)) {
|
||||
ri = strdup(init);
|
||||
if (!ri) {
|
||||
free(ri);
|
||||
free(rt);
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
@ -1132,6 +1132,8 @@ static int method_switch_root(sd_bus *bus, sd_bus_message *message, void *userda
|
|||
free(m->switch_root_init);
|
||||
m->switch_root_init = ri;
|
||||
|
||||
m->exit_code = MANAGER_SWITCH_ROOT;
|
||||
|
||||
return sd_bus_reply_method_return(message, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue