mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[MKHIVE]
- Fail when something goes wrong instead of pretending everything's peachy. CORE-13241 #resolve svn path=/trunk/; revision=74540
This commit is contained in:
parent
698c2abb16
commit
b6e4109ff1
2 changed files with 8 additions and 1 deletions
|
@ -101,7 +101,10 @@ int main (int argc, char *argv[])
|
||||||
for (i = 2; i < argc; i++)
|
for (i = 2; i < argc; i++)
|
||||||
{
|
{
|
||||||
convert_path (FileName, argv[i]);
|
convert_path (FileName, argv[i]);
|
||||||
ImportRegistryFile (FileName);
|
if (!ImportRegistryFile (FileName))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
convert_path (FileName, argv[1]);
|
convert_path (FileName, argv[1]);
|
||||||
|
|
|
@ -501,11 +501,15 @@ ImportRegistryFile(PCHAR FileName)
|
||||||
if (!registry_callback (hInf, (PWCHAR)DelReg, TRUE))
|
if (!registry_callback (hInf, (PWCHAR)DelReg, TRUE))
|
||||||
{
|
{
|
||||||
DPRINT1 ("registry_callback() for DelReg failed\n");
|
DPRINT1 ("registry_callback() for DelReg failed\n");
|
||||||
|
InfHostCloseFile (hInf);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!registry_callback (hInf, (PWCHAR)AddReg, FALSE))
|
if (!registry_callback (hInf, (PWCHAR)AddReg, FALSE))
|
||||||
{
|
{
|
||||||
DPRINT1 ("registry_callback() for AddReg failed\n");
|
DPRINT1 ("registry_callback() for AddReg failed\n");
|
||||||
|
InfHostCloseFile (hInf);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
InfHostCloseFile (hInf);
|
InfHostCloseFile (hInf);
|
||||||
|
|
Loading…
Reference in a new issue