mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
add some error checking
svn path=/trunk/; revision=11672
This commit is contained in:
parent
28bfa5fcdd
commit
d06c68bb99
2 changed files with 23 additions and 7 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: binhive.c,v 1.11 2004/05/29 21:15:58 navaraf Exp $
|
||||
/* $Id: binhive.c,v 1.12 2004/11/15 19:20:23 gdalsnes Exp $
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS hive maker
|
||||
* FILE: tools/mkhive/binhive.c
|
||||
|
@ -1357,6 +1357,7 @@ CmiWriteHive(PREGISTRY_HIVE Hive,
|
|||
File = fopen (FileName, "w+b");
|
||||
if (File == NULL)
|
||||
{
|
||||
printf(" Error creating/opening file\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: mkhive.c,v 1.4 2004/05/29 21:15:58 navaraf Exp $
|
||||
/* $Id: mkhive.c,v 1.5 2004/11/15 19:20:23 gdalsnes Exp $
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS hive maker
|
||||
* FILE: tools/mkhive/mkhive.c
|
||||
|
@ -126,27 +126,42 @@ int main (int argc, char *argv[])
|
|||
convert_path (FileName, argv[2]);
|
||||
strcat (FileName, DIR_SEPARATOR_STRING);
|
||||
strcat (FileName, "system");
|
||||
ExportBinaryHive (FileName, "\\Registry\\Machine\\SYSTEM");
|
||||
if (!ExportBinaryHive (FileName, "\\Registry\\Machine\\SYSTEM"))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
convert_path (FileName, argv[2]);
|
||||
strcat (FileName, DIR_SEPARATOR_STRING);
|
||||
strcat (FileName, "software");
|
||||
ExportBinaryHive (FileName, "\\Registry\\Machine\\SOFTWARE");
|
||||
if (!ExportBinaryHive (FileName, "\\Registry\\Machine\\SOFTWARE"))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
convert_path (FileName, argv[2]);
|
||||
strcat (FileName, DIR_SEPARATOR_STRING);
|
||||
strcat (FileName, "sam");
|
||||
ExportBinaryHive (FileName, "\\Registry\\Machine\\SAM");
|
||||
if (!ExportBinaryHive (FileName, "\\Registry\\Machine\\SAM"))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
convert_path (FileName, argv[2]);
|
||||
strcat (FileName, DIR_SEPARATOR_STRING);
|
||||
strcat (FileName, "security");
|
||||
ExportBinaryHive (FileName, "\\Registry\\Machine\\SECURITY");
|
||||
if (!ExportBinaryHive (FileName, "\\Registry\\Machine\\SECURITY"))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
convert_path (FileName, argv[2]);
|
||||
strcat (FileName, DIR_SEPARATOR_STRING);
|
||||
strcat (FileName, "default");
|
||||
ExportBinaryHive (FileName, "\\Registry\\User\\.DEFAULT");
|
||||
if (!ExportBinaryHive (FileName, "\\Registry\\User\\.DEFAULT"))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
// RegShutdownRegistry ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue