Author: dgorbachev Date: Thu Jul 7 19:19:44 2011 New Revision: 52557
URL: http://svn.reactos.org/svn/reactos?rev=52557&view=rev Log: [FREELDR] - Move read-only data into data section (allows to boot with GRUB again). - Discard .drectve sections. - Silence "set but not used" warnings.
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c trunk/reactos/boot/freeldr/freeldr/freeldr_i386.lnk trunk/reactos/boot/freeldr/freeldr/fs/ext2.c trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c trunk/reactos/boot/freeldr/freeldr/inifile/parse.c trunk/reactos/boot/freeldr/freeldr/ui/ui.c trunk/reactos/boot/freeldr/freeldr/windows/i386/ntsetup.c trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] Thu Jul 7 19:19:44 2011 @@ -34,7 +34,7 @@ { PCM_PARTIAL_RESOURCE_LIST PartialResourceList; PCM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry; - EXTENDED_GEOMETRY ExtGeometry; + //EXTENDED_GEOMETRY ExtGeometry; GEOMETRY Geometry; ULONG Size;
@@ -69,7 +69,7 @@ DiskGeometry = (PVOID)(((ULONG_PTR)PartialResourceList) + sizeof(CM_PARTIAL_RESOURCE_LIST));
/* Get the disk geometry */ - ExtGeometry.Size = sizeof(EXTENDED_GEOMETRY); + //ExtGeometry.Size = sizeof(EXTENDED_GEOMETRY);
if(MachDiskGetDriveGeometry(DriveNumber, &Geometry)) {
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_i386.lnk URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freeld... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/freeldr_i386.lnk [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/freeldr_i386.lnk [iso-8859-1] Thu Jul 7 19:19:44 2011 @@ -32,17 +32,18 @@ *(.data) *(.data2) *(SORT(.data$*)) + *(.rdata) + *(SORT(.rdata$*)) + *(.eh_frame) __data_end__ = . ; __bss_start__ = . ; *(.bss) *(COMMON) __bss_end__ = . ; } - .rdata BLOCK(__section_alignment__) : + /DISCARD/ : { - *(.rdata) - *(SORT(.rdata$*)) - *(.eh_frame) + *(.drectve) } .stab BLOCK(__section_alignment__) (NOLOAD) : {
Modified: trunk/reactos/boot/freeldr/freeldr/fs/ext2.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/ext... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/fs/ext2.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/fs/ext2.c [iso-8859-1] Thu Jul 7 19:19:44 2011 @@ -1196,12 +1196,12 @@ LONG Ext2Open(CHAR* Path, OPENMODE OpenMode, ULONG* FileId) { PEXT2_FILE_INFO FileHandle; - ULONG DeviceId; + //ULONG DeviceId;
if (OpenMode != OpenReadOnly) return EACCES;
- DeviceId = FsGetDeviceId(*FileId); + //DeviceId = FsGetDeviceId(*FileId);
DPRINTM(DPRINT_FILESYSTEM, "Ext2Open() FileName = %s\n", Path);
Modified: trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/ntf... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c [iso-8859-1] Thu Jul 7 19:19:44 2011 @@ -536,7 +536,7 @@ static BOOLEAN NtfsFindMftRecord(PNTFS_VOLUME_INFO Volume, ULONGLONG MFTIndex, PCHAR FileName, ULONGLONG *OutMFTIndex) { PNTFS_MFT_RECORD MftRecord; - ULONG Magic; + //ULONG Magic; PNTFS_ATTR_CONTEXT IndexRootCtx; PNTFS_ATTR_CONTEXT IndexBitmapCtx; PNTFS_ATTR_CONTEXT IndexAllocationCtx; @@ -557,7 +557,7 @@
if (NtfsReadMftRecord(Volume, MFTIndex, MftRecord)) { - Magic = MftRecord->Magic; + //Magic = MftRecord->Magic;
IndexRootCtx = NtfsFindAttribute(Volume, MftRecord, NTFS_ATTR_TYPE_INDEX_ROOT, L"$I30"); if (IndexRootCtx == NULL)
Modified: trunk/reactos/boot/freeldr/freeldr/inifile/parse.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inifil... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/inifile/parse.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/inifile/parse.c [iso-8859-1] Thu Jul 7 19:19:44 2011 @@ -180,12 +180,11 @@
ULONG IniGetNextLineSize(PCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset) { - ULONG Idx; ULONG LineCharCount = 0;
// Loop through counting chars until we hit the end of the // file or we encounter a new line char - for (Idx=0; (CurrentOffset < IniFileSize); CurrentOffset++) + for (; (CurrentOffset < IniFileSize); CurrentOffset++) { // Increment the line character count LineCharCount++; @@ -193,7 +192,6 @@ // Check for new line char if (IniFileData[CurrentOffset] == '\n') { - CurrentOffset++; break; } }
Modified: trunk/reactos/boot/freeldr/freeldr/ui/ui.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/ui.... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/ui/ui.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/ui/ui.c [iso-8859-1] Thu Jul 7 19:19:44 2011 @@ -225,14 +225,13 @@
BOOLEAN SetupUiInitialize(VOID) { - VIDEODISPLAYMODE UiDisplayMode; CHAR DisplayModeText[260]; ULONG Depth, Length;
DisplayModeText[0] = '\0';
- UiDisplayMode = MachVideoSetDisplayMode(DisplayModeText, TRUE); + MachVideoSetDisplayMode(DisplayModeText, TRUE); MachVideoGetDisplaySize(&UiScreenWidth, &UiScreenHeight, &Depth);
UiVtbl = TuiVtbl;
Modified: trunk/reactos/boot/freeldr/freeldr/windows/i386/ntsetup.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/window... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/i386/ntsetup.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/i386/ntsetup.c [iso-8859-1] Thu Jul 7 19:19:44 2011 @@ -41,7 +41,7 @@ ULONG *TssBasePage) { ULONG TssSize; - ULONG TssPages; + //ULONG TssPages; ULONG_PTR Pcr = 0; ULONG_PTR Tss = 0; ULONG BlockSize, NumPages; @@ -61,7 +61,7 @@
/* Allocate TSS */ TssSize = (sizeof(KTSS) + MM_PAGE_SIZE) & ~(MM_PAGE_SIZE - 1); - TssPages = TssSize / MM_PAGE_SIZE; + //TssPages = TssSize / MM_PAGE_SIZE;
Tss = (ULONG_PTR)MmAllocateMemoryWithType(TssSize, LoaderMemoryData);
Modified: trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/window... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c [iso-8859-1] Thu Jul 7 19:19:44 2011 @@ -224,7 +224,7 @@ ULONG LastPageIndex, LastPageType, MemoryMapStartPage; PPAGE_LOOKUP_TABLE_ITEM MemoryMap; ULONG NoEntries; - PKTSS Tss; + //PKTSS Tss; BOOLEAN Status;
// @@ -353,7 +353,7 @@ /* Map stuff like PCR, KI_USER_SHARED_DATA and Apic */ WinLdrMapSpecialPages(PcrBasePage);
- Tss = (PKTSS)(KSEG0_BASE | (TssBasePage << MM_PAGE_SHIFT)); + //Tss = (PKTSS)(KSEG0_BASE | (TssBasePage << MM_PAGE_SHIFT));
// Unmap what is not needed from kernel page table MempDisablePages();