+ result = pb_run_cmd(argv);
+
+ if (result)
+ pb_log("%s: failed: (%d)\n", __func__, result);
+
+ talloc_free(s_initrd);
+ talloc_free(s_args);
+
+ return result;
+}
+
+/**
+ * kexec_reboot - Helper to boot the new kernel.
+ *
+ * Must only be called after a successful call to kexec_load().
+ */
+
+static int kexec_reboot(void)
+{
+ int result;
+ const char *argv[4];
+ const char **p;
+
+ /* First try running shutdown. Init scripts should run 'exec -e' */
+
+ p = argv;
+ *p++ = pb_system_apps.shutdown; /* 1 */
+ *p++ = "-r"; /* 2 */
+ *p++ = "now"; /* 3 */
+ *p++ = NULL; /* 4 */