# include <kernel/kernel.h>

private void
load(string filename)
{
    if (!find_object(filename)) {
        compile_object(filename);
    }
}

static void
create()
{
    load("/kernel/sys/telnet_port");
    load("/kernel/sys/binary_port");
}

void
prepare_reboot()
{
    if (previous_program() == DRIVER) {
        /* ... */
    }
}

void
reboot()
{
    if (previous_program() == DRIVER) {
        /* ... */
    }
}
