https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/...
Всем срочно на openbsd!111
Для Ъ:
/*
* Send GARP packet to network peers after migrations.
* After Quick Migration, the network is not immediately operational in the
* current context when receiving RNDIS_STATUS_MEDIA_CONNECT event. So, add
* another netif_notify_peers() into a delayed work, otherwise GARP packet
* will not be sent after quick migration, and cause network disconnection.
* Also, we update the carrier status here.
*/
static void netvsc_link_change(struct work_struct *w)
{
struct net_device_context *ndev_ctx;
struct net_device *net;
struct netvsc_device *net_device;
struct rndis_device *rdev;
bool notify, refresh = false;
char *argv[] = { "/etc/init.d/network", "restart", NULL };
char *envp[] = { "HOME=/", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
Еще из той же оперы:
// /kernel/reboot.c
char poweroff_cmd[POWEROFF_CMD_PATH_LEN] = "/sbin/poweroff";
static const char reboot_cmd[] = "/sbin/reboot";
// /drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
static char *ac_dc_script = "/etc/acpi/wireless-rtl-ac-dc-power.sh";
char *argv[] = {ac_dc_script, DRV_NAME, NULL};
static char *envp[] = {"HOME=/",
"TERM=linux",
"PATH=/usr/bin:/bin",
NULL};
А вы тут про жалкие goto в коде