Author: tfaber Date: Sat May 13 22:47:59 2017 New Revision: 74540
URL: http://svn.reactos.org/svn/reactos?rev=74540&view=rev Log: [MKHIVE] - Fail when something goes wrong instead of pretending everything's peachy. CORE-13241 #resolve
Modified: trunk/reactos/sdk/tools/mkhive/mkhive.c trunk/reactos/sdk/tools/mkhive/reginf.c
Modified: trunk/reactos/sdk/tools/mkhive/mkhive.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/mkhive/mkhive.c?r... ============================================================================== --- trunk/reactos/sdk/tools/mkhive/mkhive.c [iso-8859-1] (original) +++ trunk/reactos/sdk/tools/mkhive/mkhive.c [iso-8859-1] Sat May 13 22:47:59 2017 @@ -101,7 +101,10 @@ for (i = 2; i < argc; i++) { convert_path (FileName, argv[i]); - ImportRegistryFile (FileName); + if (!ImportRegistryFile (FileName)) + { + return 1; + } }
convert_path (FileName, argv[1]);
Modified: trunk/reactos/sdk/tools/mkhive/reginf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/mkhive/reginf.c?r... ============================================================================== --- trunk/reactos/sdk/tools/mkhive/reginf.c [iso-8859-1] (original) +++ trunk/reactos/sdk/tools/mkhive/reginf.c [iso-8859-1] Sat May 13 22:47:59 2017 @@ -501,11 +501,15 @@ if (!registry_callback (hInf, (PWCHAR)DelReg, TRUE)) { DPRINT1 ("registry_callback() for DelReg failed\n"); + InfHostCloseFile (hInf); + return FALSE; }
if (!registry_callback (hInf, (PWCHAR)AddReg, FALSE)) { DPRINT1 ("registry_callback() for AddReg failed\n"); + InfHostCloseFile (hInf); + return FALSE; }
InfHostCloseFile (hInf);