Dexuan Cui <de...@microsoft.com> writes:

> +static void perform_hibernation(struct work_struct *dummy)
> +{
> +     /*
> +      * The user is expected to create the program, which can be a simple
> +      * script containing two lines:
> +      * #!/bin/bash
> +      * echo disk > /sys/power/state

'systemctl hibernate' is what people do nowadays :-)

> +      */
> +     static char hibernate_cmd[PATH_MAX] = "/sbin/hyperv-hibernate";
> +

Let's not do that (I remember when we were triggering network restart
from netvsc and it was a lot of pain).

Receiving hybernation request from the host is similar to pushing power
button on your desktop: an ACPI event is going to be generated and your
userspace will somehow react to it. I see two options:
1) We try to hook up some existing userspace (udev?)
2) We write a new hyperv-daemon handling the request (with a config file
instead of hardcoding please).

-- 
Vitaly

Reply via email to