diff --git a/source/lib/registry/patchfile.c b/source/lib/registry/patchfile.c index e5d9a26618f..8a417d5935f 100644 --- a/source/lib/registry/patchfile.c +++ b/source/lib/registry/patchfile.c @@ -432,8 +432,7 @@ static WERROR reg_diff_apply_del_all_values(void *_ctx, const char *key_name) /** * Apply diff to a registry context */ -_PUBLIC_ WERROR reg_diff_apply(const char *filename, - struct registry_context *ctx) +_PUBLIC_ WERROR reg_diff_apply(struct registry_context *ctx, const char *filename) { struct reg_diff_callbacks callbacks; diff --git a/source/lib/registry/patchfile.h b/source/lib/registry/patchfile.h index 4c0599b2f3b..08a977d9cdc 100644 --- a/source/lib/registry/patchfile.h +++ b/source/lib/registry/patchfile.h @@ -36,8 +36,7 @@ struct reg_diff_callbacks { WERROR (*done) (void *callback_data); }; -WERROR reg_diff_apply (const char *filename, - struct registry_context *ctx); +WERROR reg_diff_apply(struct registry_context *ctx, const char *filename); WERROR reg_generate_diff(struct registry_context *ctx1, struct registry_context *ctx2, diff --git a/source/lib/registry/registry.i b/source/lib/registry/registry.i index 1819e7df80e..407599ec081 100644 --- a/source/lib/registry/registry.i +++ b/source/lib/registry/registry.i @@ -97,11 +97,7 @@ typedef struct registry_context { struct registry_key **key); WERROR get_predefined_key(uint32_t hkey_id, struct registry_key **key); - WERROR apply_patchfile(const char *filename) - { - return reg_diff_apply(filename, $self); - } - + WERROR apply_patchfile(const char *filename); WERROR mount_hive(struct hive_key *hive_key, uint32_t hkey_id, const char **elements=NULL); diff --git a/source/lib/registry/tools/regpatch.c b/source/lib/registry/tools/regpatch.c index ddbedce18a0..71837d18079 100644 --- a/source/lib/registry/tools/regpatch.c +++ b/source/lib/registry/tools/regpatch.c @@ -65,7 +65,7 @@ int main(int argc, char **argv) poptFreeContext(pc); - reg_diff_apply(patch, h); + reg_diff_apply(h, patch); return 0; }