From 5f24bfb7b9419d4aac220adc038bd3776fc172e6 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Mon, 22 Mar 2010 11:45:20 +0100 Subject: s4:registry - "patchfile" - add comments Helps to understand when we need to generate the hive diffs. --- source4/lib/registry/patchfile.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/lib/registry/patchfile.c') diff --git a/source4/lib/registry/patchfile.c b/source4/lib/registry/patchfile.c index 6b08cf8948..0da722bb6d 100644 --- a/source4/lib/registry/patchfile.c +++ b/source4/lib/registry/patchfile.c @@ -280,10 +280,16 @@ _PUBLIC_ WERROR reg_generate_diff(struct registry_context *ctx1, continue; } + /* if "r1" is NULL (old hive) and "r2" isn't (new hive) then + * the hive doesn't exist yet and we have to generate an add + * diff */ if ((r1 == NULL) && (r2 != NULL)) { callbacks->add_key(callback_data, reg_predefined_keys[i].name); } + /* if "r1" isn't NULL (old hive) and "r2" is (new hive) then + * the hive shouldn't exist anymore and we have to generate a + * del diff */ if ((r1 != NULL) && (r2 == NULL)) { callbacks->del_key(callback_data, reg_predefined_keys[i].name); -- cgit