mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS hive maker
|
* PROJECT: ReactOS hive maker
|
||||||
* FILE: tools/mkhive/binhive.c
|
* FILE: tools/mkhive/binhive.c
|
||||||
|
@ -1357,6 +1357,7 @@ CmiWriteHive(PREGISTRY_HIVE Hive,
|
||||||
File = fopen (FileName, "w+b");
|
File = fopen (FileName, "w+b");
|
||||||
if (File == NULL)
|
if (File == NULL)
|
||||||
{
|
{
|
||||||
|
printf(" Error creating/opening file\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS hive maker
|
* PROJECT: ReactOS hive maker
|
||||||
* FILE: tools/mkhive/mkhive.c
|
* FILE: tools/mkhive/mkhive.c
|
||||||
|
@ -126,27 +126,42 @@ int main (int argc, char *argv[])
|
||||||
convert_path (FileName, argv[2]);
|
convert_path (FileName, argv[2]);
|
||||||
strcat (FileName, DIR_SEPARATOR_STRING);
|
strcat (FileName, DIR_SEPARATOR_STRING);
|
||||||
strcat (FileName, "system");
|
strcat (FileName, "system");
|
||||||
ExportBinaryHive (FileName, "\\Registry\\Machine\\SYSTEM");
|
if (!ExportBinaryHive (FileName, "\\Registry\\Machine\\SYSTEM"))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
convert_path (FileName, argv[2]);
|
convert_path (FileName, argv[2]);
|
||||||
strcat (FileName, DIR_SEPARATOR_STRING);
|
strcat (FileName, DIR_SEPARATOR_STRING);
|
||||||
strcat (FileName, "software");
|
strcat (FileName, "software");
|
||||||
ExportBinaryHive (FileName, "\\Registry\\Machine\\SOFTWARE");
|
if (!ExportBinaryHive (FileName, "\\Registry\\Machine\\SOFTWARE"))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
convert_path (FileName, argv[2]);
|
convert_path (FileName, argv[2]);
|
||||||
strcat (FileName, DIR_SEPARATOR_STRING);
|
strcat (FileName, DIR_SEPARATOR_STRING);
|
||||||
strcat (FileName, "sam");
|
strcat (FileName, "sam");
|
||||||
ExportBinaryHive (FileName, "\\Registry\\Machine\\SAM");
|
if (!ExportBinaryHive (FileName, "\\Registry\\Machine\\SAM"))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
convert_path (FileName, argv[2]);
|
convert_path (FileName, argv[2]);
|
||||||
strcat (FileName, DIR_SEPARATOR_STRING);
|
strcat (FileName, DIR_SEPARATOR_STRING);
|
||||||
strcat (FileName, "security");
|
strcat (FileName, "security");
|
||||||
ExportBinaryHive (FileName, "\\Registry\\Machine\\SECURITY");
|
if (!ExportBinaryHive (FileName, "\\Registry\\Machine\\SECURITY"))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
convert_path (FileName, argv[2]);
|
convert_path (FileName, argv[2]);
|
||||||
strcat (FileName, DIR_SEPARATOR_STRING);
|
strcat (FileName, DIR_SEPARATOR_STRING);
|
||||||
strcat (FileName, "default");
|
strcat (FileName, "default");
|
||||||
ExportBinaryHive (FileName, "\\Registry\\User\\.DEFAULT");
|
if (!ExportBinaryHive (FileName, "\\Registry\\User\\.DEFAULT"))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// RegShutdownRegistry ();
|
// RegShutdownRegistry ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue