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

[win-pv-devel] [PATCH] Make sure registry updates and deletes are flushed



In most cases it is desirable to makre sure any updates are committed to
the registry hive on storage before any further operations are performed.
This patch adds ZwFlushKey() calls to ensure that is the case.

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 src/common/registry.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/common/registry.c b/src/common/registry.c
index b75f16b..9e9f79a 100644
--- a/src/common/registry.c
+++ b/src/common/registry.c
@@ -372,6 +372,8 @@ RegistryDeleteSubKey(
 
     ZwClose(SubKey);
 
+    (VOID) ZwFlushKey(Key);
+
     RtlFreeUnicodeString(&Unicode);
 
     return STATUS_SUCCESS;
@@ -610,6 +612,8 @@ RegistryDeleteValue(
 
     RtlFreeUnicodeString(&Unicode);
 
+    (VOID) ZwFlushKey(Key);
+
     return STATUS_SUCCESS;
 
 fail2:
@@ -730,6 +734,8 @@ RegistryUpdateDwordValue(
 
     __RegistryFree(Partial);
 
+    (VOID) ZwFlushKey(Key);
+
     RtlFreeUnicodeString(&Unicode);
 
     return STATUS_SUCCESS;
@@ -1060,6 +1066,8 @@ RegistryUpdateBinaryValue(
 
     __RegistryFree(Partial);
 
+    (VOID) ZwFlushKey(Key);
+
     RtlFreeUnicodeString(&Unicode);
 
     return STATUS_SUCCESS;
@@ -1350,6 +1358,8 @@ RegistryUpdateSzValue(
 
     __RegistryFree(Partial);
 
+    (VOID) ZwFlushKey(Key);
+
     RtlFreeUnicodeString(&Unicode);
 
     return STATUS_SUCCESS;
-- 
2.1.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel


 


Rackspace

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