Author: hbelusca Date: Fri Jun 30 22:46:15 2017 New Revision: 75250
URL: http://svn.reactos.org/svn/reactos?rev=75250&view=rev Log: [USETUP]: Move SetDefaultPagefile() into settings.c and remove the now-empty registry.c/.h files.
Removed: branches/setup_improvements/base/setup/usetup/registry.c branches/setup_improvements/base/setup/usetup/registry.h Modified: branches/setup_improvements/base/setup/usetup/CMakeLists.txt branches/setup_improvements/base/setup/usetup/settings.c branches/setup_improvements/base/setup/usetup/settings.h branches/setup_improvements/base/setup/usetup/usetup.h
Modified: branches/setup_improvements/base/setup/usetup/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/us... ============================================================================== --- branches/setup_improvements/base/setup/usetup/CMakeLists.txt [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/usetup/CMakeLists.txt [iso-8859-1] Fri Jun 30 22:46:15 2017 @@ -29,7 +29,6 @@ mui.c partlist.c progress.c - registry.c settings.c usetup.h)
Removed: branches/setup_improvements/base/setup/usetup/registry.c URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/us... ============================================================================== --- branches/setup_improvements/base/setup/usetup/registry.c [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/usetup/registry.c (removed) @@ -1,70 +0,0 @@ -/* - * ReactOS kernel - * Copyright (C) 2003 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS text-mode setup - * FILE: base/setup/usetup/registry.c - * PURPOSE: Registry creation functions - * PROGRAMMER: Eric Kohl - */ - -/* INCLUDES *****************************************************************/ - -#include "usetup.h" - -#define NDEBUG -#include <debug.h> - -/* FUNCTIONS ****************************************************************/ - -VOID -SetDefaultPagefile( - WCHAR Drive) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management"); - UNICODE_STRING ValueName = RTL_CONSTANT_STRING(L"PagingFiles"); - WCHAR ValueBuffer[] = L"?:\pagefile.sys 0 0\0"; - HANDLE KeyHandle; - NTSTATUS Status; - - InitializeObjectAttributes(&ObjectAttributes, - &KeyName, - OBJ_CASE_INSENSITIVE, - GetRootKeyByPredefKey(HKEY_LOCAL_MACHINE, NULL), - NULL); - Status = NtOpenKey(&KeyHandle, - KEY_ALL_ACCESS, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - return; - - ValueBuffer[0] = Drive; - - NtSetValueKey(KeyHandle, - &ValueName, - 0, - REG_MULTI_SZ, - (PVOID)&ValueBuffer, - sizeof(ValueBuffer)); - - NtClose(KeyHandle); -} - -/* EOF */
Removed: branches/setup_improvements/base/setup/usetup/registry.h URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/us... ============================================================================== --- branches/setup_improvements/base/setup/usetup/registry.h [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/usetup/registry.h (removed) @@ -1,33 +0,0 @@ -/* - * ReactOS kernel - * Copyright (C) 2003 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS text-mode setup - * FILE: base/setup/usetup/registry.h - * PURPOSE: Registry creation functions - * PROGRAMMER: Eric Kohl - */ - -#pragma once - -VOID -SetDefaultPagefile( - WCHAR Drive); - -/* EOF */
Modified: branches/setup_improvements/base/setup/usetup/settings.c URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/us... ============================================================================== --- branches/setup_improvements/base/setup/usetup/settings.c [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/usetup/settings.c [iso-8859-1] Fri Jun 30 22:46:15 2017 @@ -180,7 +180,6 @@ return ret; }
- static BOOLEAN GetComputerIdentifier( @@ -374,7 +373,6 @@
return List; } -
static BOOLEAN @@ -542,7 +540,6 @@ return FALSE; }
- PGENERIC_LIST CreateDisplayDriverList( HINF InfFile) @@ -670,7 +667,6 @@
return TRUE; } -
BOOLEAN ProcessDisplayRegistry( @@ -830,7 +826,6 @@ return TRUE; }
- BOOLEAN ProcessLocaleRegistry( PGENERIC_LIST List) @@ -992,13 +987,11 @@ return List; }
- ULONG GetDefaultLanguageIndex(VOID) { return DefaultLanguageIndex; } -
PGENERIC_LIST CreateLanguageList( @@ -1077,7 +1070,6 @@
return List; } -
PGENERIC_LIST CreateKeyboardLayoutList( @@ -1215,7 +1207,6 @@ return TRUE; }
- #if 0 BOOLEAN ProcessKeyboardLayoutFiles( @@ -1224,7 +1215,6 @@ return TRUE; } #endif -
BOOLEAN SetGeoID( @@ -1268,4 +1258,40 @@ return TRUE; }
+ +BOOLEAN +SetDefaultPagefile( + WCHAR Drive) +{ + NTSTATUS Status; + HANDLE KeyHandle; + OBJECT_ATTRIBUTES ObjectAttributes; + UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management"); + UNICODE_STRING ValueName = RTL_CONSTANT_STRING(L"PagingFiles"); + WCHAR ValueBuffer[] = L"?:\pagefile.sys 0 0\0"; + + InitializeObjectAttributes(&ObjectAttributes, + &KeyName, + OBJ_CASE_INSENSITIVE, + GetRootKeyByPredefKey(HKEY_LOCAL_MACHINE, NULL), + NULL); + Status = NtOpenKey(&KeyHandle, + KEY_ALL_ACCESS, + &ObjectAttributes); + if (!NT_SUCCESS(Status)) + return FALSE; + + ValueBuffer[0] = Drive; + + NtSetValueKey(KeyHandle, + &ValueName, + 0, + REG_MULTI_SZ, + (PVOID)&ValueBuffer, + sizeof(ValueBuffer)); + + NtClose(KeyHandle); + return TRUE; +} + /* EOF */
Modified: branches/setup_improvements/base/setup/usetup/settings.h URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/us... ============================================================================== --- branches/setup_improvements/base/setup/usetup/settings.h [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/usetup/settings.h [iso-8859-1] Fri Jun 30 22:46:15 2017 @@ -21,7 +21,8 @@ * PROJECT: ReactOS text-mode setup * FILE: base/setup/usetup/settings.h * PURPOSE: Device settings support functions - * PROGRAMMER: Eric Kohl + * PROGRAMMERS: Eric Kohl + * Colin Finck */
#pragma once @@ -78,4 +79,8 @@ SetGeoID( PWCHAR Id);
+BOOLEAN +SetDefaultPagefile( + WCHAR Drive); + /* EOF */
Modified: branches/setup_improvements/base/setup/usetup/usetup.h URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/us... ============================================================================== --- branches/setup_improvements/base/setup/usetup/usetup.h [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/usetup/usetup.h [iso-8859-1] Fri Jun 30 22:46:15 2017 @@ -65,7 +65,6 @@ #include "infros.h" #include "filequeue.h" #endif -#include "registry.h" #include "fslist.h" #include "partlist.h" #include "cabinet.h"