search for: xen_system_reboot

Displaying 1 result from an estimated 1 matches for "xen_system_reboot".

2013 Nov 08
4
[PATCH 3/4] xen/manage: Guard against user-space initiated poweroff and XenBus.
...*watch, handler->cb(); } else { pr_info("Ignoring shutdown request: %s\n", str); - shutting_down = SHUTDOWN_INVALID; + atomic_set(&shutting_down, SHUTDOWN_INVALID); } kfree(str); } +/* + * This function is called when the system is being rebooted. + */ +static int +xen_system_reboot(struct notifier_block *nb, unsigned long event, void *unused) +{ + switch (event) { + case SYS_RESTART: + case SYS_HALT: + case SYS_POWER_OFF: + atomic_set(&shutting_down, SHUTDOWN_POWEROFF); + break; + default: + break; + } + return NOTIFY_DONE; +} #ifdef CONFIG_MAGIC_SYSRQ static void...