From 5c4044777c8bf3b50c43c326b58396089be8441c Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 28 Sep 2011 18:33:25 +0000 Subject: [PATCH] [FREELDR] - Remove pointless NTKRNLAPI - remove unneeded include - delete deprecated file amd64/loader.c - add an #ifef __REACTOS__ around public header includes to make it possible to use an alternative header set from ntsup.h svn path=/trunk/; revision=53885 --- reactos/boot/freeldr/freeldr/CMakeLists.txt | 1 - .../boot/freeldr/freeldr/arch/amd64/loader.c | 63 ------------------- reactos/boot/freeldr/freeldr/disk/partition.c | 1 - .../boot/freeldr/freeldr/include/freeldr.h | 5 +- reactos/boot/freeldr/freeldr/mm/heap.c | 3 - .../boot/freeldr/freeldr/windows/wlmemory.c | 1 - 6 files changed, 4 insertions(+), 70 deletions(-) delete mode 100644 reactos/boot/freeldr/freeldr/arch/amd64/loader.c diff --git a/reactos/boot/freeldr/freeldr/CMakeLists.txt b/reactos/boot/freeldr/freeldr/CMakeLists.txt index 716277fc3b5..72532b69022 100644 --- a/reactos/boot/freeldr/freeldr/CMakeLists.txt +++ b/reactos/boot/freeldr/freeldr/CMakeLists.txt @@ -121,7 +121,6 @@ elseif(ARCH MATCHES amd64) list(APPEND FREELDR_COMMON_SOURCE arch/amd64/entry.S arch/amd64/int386.S - arch/amd64/loader.c arch/amd64/pnpbios.S arch/i386/hardware.c arch/i386/hwacpi.c diff --git a/reactos/boot/freeldr/freeldr/arch/amd64/loader.c b/reactos/boot/freeldr/freeldr/arch/amd64/loader.c deleted file mode 100644 index f72cbe9a4c9..00000000000 --- a/reactos/boot/freeldr/freeldr/arch/amd64/loader.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * FreeLoader - * Copyright (C) 2008 - 2009 Timo Kreuzer (timo.kreuzer@reactor.org) - * - * 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. - */ -#include - -#define NDEBUG -#include - -/* Page Directory and Tables for non-PAE Systems */ -extern ULONG_PTR NextModuleBase; -extern ULONG_PTR KernelBase; -ULONG_PTR GdtBase, IdtBase, TssBase; -extern ROS_KERNEL_ENTRY_POINT KernelEntryPoint; - -PVOID pIdt, pGdt; - -/* FUNCTIONS *****************************************************************/ - -void -EnableA20() -{ - /* Already done */ -} - -/*++ - * FrLdrStartup - * INTERNAL - * - * Prepares the system for loading the Kernel. - * - * Params: - * Magic - Multiboot Magic - * - * Returns: - * None. - * - * Remarks: - * None. - * - *--*/ -VOID -NTAPI -FrLdrStartup(ULONG Magic) -{ - DbgPrint("ReactOS loader is unsupported! Halting.\n", KernelEntryPoint); - for(;;); -} - diff --git a/reactos/boot/freeldr/freeldr/disk/partition.c b/reactos/boot/freeldr/freeldr/disk/partition.c index f6681c06091..147b320e69f 100644 --- a/reactos/boot/freeldr/freeldr/disk/partition.c +++ b/reactos/boot/freeldr/freeldr/disk/partition.c @@ -289,7 +289,6 @@ IopCopyPartitionRecord( return TRUE; } -NTKERNELAPI NTSTATUS FASTCALL IoReadPartitionTable( diff --git a/reactos/boot/freeldr/freeldr/include/freeldr.h b/reactos/boot/freeldr/freeldr/include/freeldr.h index 961fd29faa7..234542b9d26 100644 --- a/reactos/boot/freeldr/freeldr/include/freeldr.h +++ b/reactos/boot/freeldr/freeldr/include/freeldr.h @@ -30,6 +30,7 @@ ROUND_DOWN(((ULONG)n) + (align) - 1, (align)) /* public headers */ +#ifdef __REACTOS__ #define NTOSAPI #define printf TuiPrintf #include @@ -48,8 +49,10 @@ #include #include #include - #include +#else +#include +#endif /* internal headers */ #include diff --git a/reactos/boot/freeldr/freeldr/mm/heap.c b/reactos/boot/freeldr/freeldr/mm/heap.c index 27f4e06f88a..a24e88e73ac 100644 --- a/reactos/boot/freeldr/freeldr/mm/heap.c +++ b/reactos/boot/freeldr/freeldr/mm/heap.c @@ -90,7 +90,6 @@ VOID MmHeapFree(PVOID MemoryPointer) #undef ExAllocatePoolWithTag -NTKERNELAPI PVOID NTAPI ExAllocatePoolWithTag( @@ -102,7 +101,6 @@ ExAllocatePoolWithTag( } #undef ExFreePool -NTKERNELAPI VOID NTAPI ExFreePool( @@ -112,7 +110,6 @@ ExFreePool( } #undef ExFreePoolWithTag -NTKERNELAPI VOID NTAPI ExFreePoolWithTag( diff --git a/reactos/boot/freeldr/freeldr/windows/wlmemory.c b/reactos/boot/freeldr/freeldr/windows/wlmemory.c index be59059acd4..1ae96bcc397 100644 --- a/reactos/boot/freeldr/freeldr/windows/wlmemory.c +++ b/reactos/boot/freeldr/freeldr/windows/wlmemory.c @@ -10,7 +10,6 @@ #include -#include #include DBG_DEFAULT_CHANNEL(WINDOWS);