From 5ec87e25a7139a8e5e905f2b65026de1d68c7c6f Mon Sep 17 00:00:00 2001 From: Paul Durrant Date: Wed, 17 Aug 2016 14:32:52 +0100 Subject: [PATCH] Create, rather than open, the RequestKey It's possible that, on upgrade, XENVIF is installed before XENBUS and so the RequestKey may not exist. Signed-off-by: Paul Durrant --- src/xenvif/driver.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xenvif/driver.c b/src/xenvif/driver.c index db17f2e..ded7138 100644 --- a/src/xenvif/driver.c +++ b/src/xenvif/driver.c @@ -142,7 +142,7 @@ DriverGetAddressesKey( return __DriverGetAddressesKey(); } -#define MAXNAMELEN 128 +#define MAXNAMELEN 1024 static FORCEINLINE VOID __DriverRequestReboot( @@ -172,10 +172,10 @@ __DriverRequestReboot( &Ansi[0]); ASSERT(NT_SUCCESS(status)); - status = RegistryOpenSubKey(NULL, - RequestKeyName, - KEY_ALL_ACCESS, - &RequestKey); + status = RegistryCreateSubKey(NULL, + RequestKeyName, + REG_OPTION_NON_VOLATILE, + &RequestKey); if (!NT_SUCCESS(status)) goto fail2; -- 2.39.5