[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [win-pv-devel] [PATCH] Call OnDeviceRemoved callback(s) during DeviceList.Stop()



> -----Original Message-----
> From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On
> Behalf Of Owen Smith
> Sent: 18 July 2018 13:41
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Owen Smith <owen.smith@xxxxxxxxxx>
> Subject: [win-pv-devel] [PATCH] Call OnDeviceRemoved callback(s) during
> DeviceList.Stop()
> 
> OnDeviceAdded is called for every pre-attached device during
> DeviceList.Start(), the corresponding call to OnDeviceRemoved should be
> called for each attached device during the DeviceList.Stop() call.
> By calling the OnDeviceRemoved callback during the service stop, the
> xenagent service can remove the "feature-[poweroff|reboot|s3|s4]" flags.
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

Acked-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
>  src/xenagent/devicelist.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/xenagent/devicelist.cpp b/src/xenagent/devicelist.cpp
> index b40b252..e0583f9 100644
> --- a/src/xenagent/devicelist.cpp
> +++ b/src/xenagent/devicelist.cpp
> @@ -218,6 +218,8 @@ void CDeviceList::Stop()
>      for (DeviceMap::iterator it = m_devs.begin();
>              it != m_devs.end();
>              ++it) {
> +        if (m_impl)
> +            m_impl->OnDeviceRemoved(it->second);
>          delete it->second;
>      }
>      m_devs.clear();
> --
> 2.16.2.windows.1
> 
> 
> _______________________________________________
> win-pv-devel mailing list
> win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/win-pv-devel
_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.