Signed-off-by: Michael Heimpold <mhei@heimpold.de>
execvp(kmod[0], kmod);
ERROR("Failed to start kmodloader: %m\n");
execvp(kmod[0], kmod);
ERROR("Failed to start kmodloader: %m\n");
}
if (pid <= 0) {
ERROR("Failed to start kmodloader instance: %m\n");
}
if (pid <= 0) {
ERROR("Failed to start kmodloader instance: %m\n");
#include <libubus.h>
#include <stdio.h>
#include <libubus.h>
#include <stdio.h>
#include <unistd.h>
#include "init.h"
#include <unistd.h>
#include "init.h"
if (!plugd_proc.pid) {
execvp(plug[0], plug);
ERROR("Failed to start plugd: %m\n");
if (!plugd_proc.pid) {
execvp(plug[0], plug);
ERROR("Failed to start plugd: %m\n");
}
if (plugd_proc.pid <= 0) {
ERROR("Failed to start new plugd instance: %m\n");
}
if (plugd_proc.pid <= 0) {
ERROR("Failed to start new plugd instance: %m\n");
if (!preinit_proc.pid) {
execvp(init[0], init);
ERROR("Failed to start preinit: %m\n");
if (!preinit_proc.pid) {
execvp(init[0], init);
ERROR("Failed to start preinit: %m\n");
}
if (preinit_proc.pid <= 0) {
ERROR("Failed to start new preinit instance: %m\n");
}
if (preinit_proc.pid <= 0) {
ERROR("Failed to start new preinit instance: %m\n");
modprobe[1] = path;
execvp(modprobe[0], modprobe);
ERROR("Can't exec %s: %m\n", modprobe[0]);
modprobe[1] = path;
execvp(modprobe[0], modprobe);
ERROR("Can't exec %s: %m\n", modprobe[0]);
if (!pid) {
execvp(mkfs[0], mkfs);
ERROR("Can't exec %s: %m\n", mkfs[0]);
if (!pid) {
execvp(mkfs[0], mkfs);
ERROR("Can't exec %s: %m\n", mkfs[0]);
} else if (pid <= 0) {
ERROR("Can't exec %s: %m\n", mkfs[0]);
return -1;
} else if (pid <= 0) {
ERROR("Can't exec %s: %m\n", mkfs[0]);
return -1;
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <unistd.h>
#include "../procd.h"
#include <unistd.h>
#include "../procd.h"
if (!udevtrigger.pid) {
execvp(argv[0], argv);
ERROR("Failed to start coldplug: %m\n");
if (!udevtrigger.pid) {
execvp(argv[0], argv);
ERROR("Failed to start coldplug: %m\n");
}
if (udevtrigger.pid <= 0) {
}
if (udevtrigger.pid <= 0) {
argv[i] = NULL;
execvp(argv[0], &argv[0]);
}
argv[i] = NULL;
execvp(argv[0], &argv[0]);
}
}
static void handle_button_start(struct blob_attr *msg, struct blob_attr *data)
}
static void handle_button_start(struct blob_attr *msg, struct blob_attr *data)
if (!file || !dir || !dev) {
ERROR("Request for unknown firmware %s/%s\n", dir, file);
if (!file || !dir || !dev) {
ERROR("Request for unknown firmware %s/%s\n", dir, file);
}
path = alloca(strlen(dir) + strlen(file) + 2);
}
path = alloca(strlen(dir) + strlen(file) + 2);
load = open(loadpath, O_WRONLY);
if (!load) {
ERROR("Failed to open %s: %m\n", loadpath);
load = open(loadpath, O_WRONLY);
if (!load) {
ERROR("Failed to open %s: %m\n", loadpath);
}
if (write(load, "1", 1) == -1) {
ERROR("Failed to write to %s: %m\n", loadpath);
}
if (write(load, "1", 1) == -1) {
ERROR("Failed to write to %s: %m\n", loadpath);
fw = open(syspath, O_WRONLY);
if (fw < 0) {
ERROR("Failed to open %s: %m\n", syspath);
fw = open(syspath, O_WRONLY);
if (fw < 0) {
ERROR("Failed to open %s: %m\n", syspath);
DEBUG(2, "Done loading %s\n", path);
DEBUG(2, "Done loading %s\n", path);
}
static void handle_start_console(struct blob_attr *msg, struct blob_attr *data)
}
static void handle_start_console(struct blob_attr *msg, struct blob_attr *data)
DEBUG(2, "Done starting console for %s\n", dev);
DEBUG(2, "Done starting console for %s\n", dev);
/* Child */
execvp(args[0], args);
fprintf(stderr, "Failed to exec sysupgrade\n");
/* Child */
execvp(args[0], args);
fprintf(stderr, "Failed to exec sysupgrade\n");
}
uloop_process_add(&upgrade_proc);
}
uloop_process_add(&upgrade_proc);