X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fdbus-manager.c;h=9ecf14c235b19b4671cdbea7a0470816c92c7ea6;hb=92c1622e14dd99890928b1a1596e4a670b31a7ff;hp=6002d02c5bb50e8a2b0c113086104344e8e46c58;hpb=1302759d1581a4df0259cd4499a0908dad5f8b77;p=elogind.git diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 6002d02c5..9ecf14c23 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -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); } @@ -1532,7 +1534,7 @@ const sd_bus_vtable bus_manager_vtable[] = { SD_BUS_PROPERTY("Tainted", "s", property_get_tainted, 0, 0), BUS_PROPERTY_DUAL_TIMESTAMP("FirmwareTimestamp", offsetof(Manager, firmware_timestamp), 0), BUS_PROPERTY_DUAL_TIMESTAMP("LoaderTimestamp", offsetof(Manager, loader_timestamp), 0), - BUS_PROPERTY_DUAL_TIMESTAMP("KernelTimestamp", offsetof(Manager, firmware_timestamp), 0), + BUS_PROPERTY_DUAL_TIMESTAMP("KernelTimestamp", offsetof(Manager, kernel_timestamp), 0), BUS_PROPERTY_DUAL_TIMESTAMP("InitRDTimestamp", offsetof(Manager, initrd_timestamp), 0), BUS_PROPERTY_DUAL_TIMESTAMP("UserspaceTimestamp", offsetof(Manager, userspace_timestamp), 0), BUS_PROPERTY_DUAL_TIMESTAMP("FinishTimestamp", offsetof(Manager, finish_timestamp), 0),