ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2016
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
13 participants
192 discussions
Start a n
N
ew thread
[ion] 70539: [BOOTLIB]: ACPI support (RSDP, XSDT/RSDT and arbitrary table lookup + mapping) [BOOTLIB]: Additional text and graphics console support. Among other things, we have now gained the abili...
by ion@svn.reactos.org
Author: ion Date: Thu Jan 7 23:43:15 2016 New Revision: 70539 URL:
http://svn.reactos.org/svn/reactos?rev=70539&view=rev
Log: [BOOTLIB]: ACPI support (RSDP, XSDT/RSDT and arbitrary table lookup + mapping) [BOOTLIB]: Additional text and graphics console support. Among other things, we have now gained the ability to fill a buffer with a particular color. [BOOTLIB]: OEM Bitmap (ACPI 5!) support. [BOOTMGR]: Continue making a few more initialization calls now that bootlib supports more functionality. Added: trunk/reactos/boot/environ/include/efi/Acpi.h (with props) Modified: trunk/reactos/boot/environ/app/bootmgr/bootmgr.c trunk/reactos/boot/environ/include/bcd.h trunk/reactos/boot/environ/include/bl.h trunk/reactos/boot/environ/lib/firmware/efi/firmware.c trunk/reactos/boot/environ/lib/io/display/display.c trunk/reactos/boot/environ/lib/io/display/efi/gop.c trunk/reactos/boot/environ/lib/io/display/efi/guicons.c trunk/reactos/boot/environ/lib/io/display/efi/textcons.c trunk/reactos/boot/environ/lib/io/display/guicons.c trunk/reactos/boot/environ/lib/io/display/textcons.c trunk/reactos/boot/environ/lib/misc/font.c trunk/reactos/boot/environ/lib/misc/resource.c trunk/reactos/boot/environ/lib/misc/util.c Modified: trunk/reactos/boot/environ/app/bootmgr/bootmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/app/bootmgr/b…
============================================================================== --- trunk/reactos/boot/environ/app/bootmgr/bootmgr.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/app/bootmgr/bootmgr.c [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -1032,6 +1032,66 @@ } } +NTSTATUS +BmpBgDisplayClearScreen ( + _In_ ULONG Color + ) +{ + /* Not yet supported */ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +BlXmiInitialize ( + _In_ PWCHAR Stylesheet + ) +{ + /* Reset the cursor type */ + BlDisplaySetCursorType(0); + + /* Nope, not doing any XML stuff */ + return STATUS_SUCCESS; +} + +VOID +BlImgQueryCodeIntegrityBootOptions ( + _In_ PBL_LOADED_APPLICATION_ENTRY ApplicationEntry, + _Out_ PBOOLEAN IntegrityChecksDisabled, + _Out_ PBOOLEAN TestSigningEnabled + ) +{ + + NTSTATUS Status; + BOOLEAN Value; + + /* Check if /DISABLEINTEGRITYCHECKS is on */ + Status = BlGetBootOptionBoolean(ApplicationEntry->BcdData, + BcdLibraryBoolean_DisableIntegrityChecks, + &Value); + *IntegrityChecksDisabled = NT_SUCCESS(Status) && (Value); + + /* Check if /TESTSIGNING is on */ + Status = BlGetBootOptionBoolean(ApplicationEntry->BcdData, + BcdLibraryBoolean_AllowPrereleaseSignatures, + &Value); + *TestSigningEnabled = NT_SUCCESS(Status) && (Value); +} + +NTSTATUS +BmFwVerifySelfIntegrity ( + VOID + ) +{ + EfiPrintf(L"Device Type %d Local Type %d\r\n", BlpBootDevice->DeviceType, BlpBootDevice->Local.Type); + if ((BlpBootDevice->DeviceType == LocalDevice) && + (BlpBootDevice->Local.Type == CdRomDevice) && + (BlpApplicationFlags & BL_APPLICATION_ENTRY_FLAG_NO_GUID)) + { + return STATUS_SUCCESS; + } + + return 0xC0000428; +} /*++ * @name BmMain @@ -1059,6 +1119,7 @@ HANDLE BcdHandle; PBL_BCD_OPTION EarlyOptions; PWCHAR Stylesheet; + BOOLEAN XmlLoaded, DisableIntegrity, TestSigning; EfiPrintf(L"ReactOS UEFI Boot Manager Initializing...\n"); @@ -1166,23 +1227,66 @@ goto Quickie; } + /* Initialize the XML Engine (as a side-effect, resets cursor) */ + Status = BlXmiInitialize(Stylesheet); + if (!NT_SUCCESS(Status)) + { + EfiPrintf(L"\r\nBlXmiInitialize failed 0x%x\r\n", Status); + goto Failure; + } + XmlLoaded = TRUE; + + /* Check if there's an active bitmap visible */ + if (!BlDisplayValidOemBitmap()) + { + /* Nope, make the screen black using BGFX */ + if (!NT_SUCCESS(BmpBgDisplayClearScreen(0xFF000000))) + { + /* BGFX isn't active, use standard display */ + BlDisplayClearScreen(); + } + } + +#ifdef _BIT_LOCKER_ + /* Bitlocker will take over screen UI if enabled */ + FveDisplayScreen = BmFveDisplayScreen; +#endif + + /* Check if any bypass options are enabled */ + BlImgQueryCodeIntegrityBootOptions(&BlpApplicationEntry, + &DisableIntegrity, + &TestSigning); + if (!DisableIntegrity) + { + /* Integrity checks are enabled, so validate our signature */ + Status = BmFwVerifySelfIntegrity(); + if (!NT_SUCCESS(Status)) + { + /* Signature invalid, fail boot */ + // goto Failure; + } + } + +// BlXmiWrite(L"<bootmgr/>"); + + //BlSecureBootCheckForFactoryReset(); + + /* do more stuff!! */ EfiPrintf(BlResourceFindMessage(BM_MSG_TEST)); - //EfiPrintf(Stylesheet); + EfiPrintf(Stylesheet); EfiStall(10000000); -//Failure: +Failure: /* Check if we got here due to an internal error */ if (BmpInternalBootError) { /* If XML is available, display the error */ -#if 0 if (XmlLoaded) { - BmDisplayDumpError(0, 0); - BmErrorPurge(); + //BmDisplayDumpError(0, 0); + //BmErrorPurge(); } -#endif /* Don't do a fatal error -- return back to firmware */ goto Quickie; Modified: trunk/reactos/boot/environ/include/bcd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/include/bcd.h…
============================================================================== --- trunk/reactos/boot/environ/include/bcd.h [iso-8859-1] (original) +++ trunk/reactos/boot/environ/include/bcd.h [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -79,7 +79,8 @@ BcdLibraryBoolean_BootUxDisable = 0x1600006C, BcdLibraryBoolean_BootShutdownDisabled = 0x16000074, BcdLibraryIntegerList_AllowedInMemorySettings = 0x17000077, - BcdLibraryBoolean_ForceFipsCrypto = 0x16000079 + BcdLibraryBoolean_ForceFipsCrypto = 0x16000079, + BcdLibraryBoolean_MobileGraphics = 0x1600007A /* Undocumented */ } BcdLibraryElementTypes; typedef enum BcdOSLoaderElementTypes Modified: trunk/reactos/boot/environ/include/bl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/include/bl.h?…
============================================================================== --- trunk/reactos/boot/environ/include/bl.h [iso-8859-1] (original) +++ trunk/reactos/boot/environ/include/bl.h [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -28,6 +28,9 @@ /* PE Headers */ #include <ntimage.h> +/* ACPI Headers */ +#include <drivers/acpi/acpi.h> + /* UEFI Headers */ #include <Uefi.h> #include <DevicePath.h> @@ -35,6 +38,7 @@ #include <GraphicsOutput.h> #include <UgaDraw.h> #include <BlockIo.h> +#include <Acpi.h> /* Registry Headers */ #define __FREELDR_H @@ -445,7 +449,7 @@ NTSTATUS (*PCONSOLE_CLEAR_TEXT) ( _In_ struct _BL_TEXT_CONSOLE* Console, - _In_ ULONG Attribute + _In_ BOOLEAN LineOnly ); typedef @@ -1097,7 +1101,45 @@ ULONG Flags; PBL_DEVICE_DESCRIPTOR Device; PWCHAR FontPath; -} BL_DEFERRED_FONT_FILE, *PBL_DEFERRED_FONT_FILE;; +} BL_DEFERRED_FONT_FILE, *PBL_DEFERRED_FONT_FILE; + +#pragma pack(push) +#pragma pack(1) +typedef struct _BMP_HEADER +{ + USHORT Signature; + ULONG Size; + USHORT Reserved[2]; + ULONG Offset; +} BMP_HEADER, *PBMP_HEADER; + +typedef struct _DIB_HEADER +{ + ULONG Size; + ULONG Width; + ULONG Height; + USHORT Planes; + USHORT BitCount; + ULONG Compression; + ULONG SizeImage; + ULONG XPelsPerMeter; + ULONG YPelsPerMEter; + ULONG ClrUsed; + ULONG ClrImportant; +} DIB_HEADER, *PDIB_HEADER; + +typedef struct _BITMAP +{ + BMP_HEADER BmpHeader; + DIB_HEADER DibHeader; +} BITMAP, *PBITMAP; +#pragma pack(pop) + +typedef struct _COORD +{ + ULONG X; + ULONG Y; +} COORD, *PCOORD; /* INLINE ROUTINES ***********************************************************/ @@ -1253,6 +1295,12 @@ ); NTSTATUS +EfiConOutOutputString ( + _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface, + _In_ PWCHAR String + ); + +NTSTATUS EfiConOutQueryMode ( _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface, _In_ ULONG Mode, @@ -1348,6 +1396,11 @@ _In_ EFI_DEVICE_PATH *DevicePath2 ); +NTSTATUS +EfipGetRsdt ( + _Out_ PPHYSICAL_ADDRESS FoundRsdt + ); + /* PLATFORM TIMER ROUTINES ***************************************************/ NTSTATUS @@ -1378,6 +1431,16 @@ NTSTATUS BfLoadDeferredFontFiles ( VOID + ); + +NTSTATUS +BfClearScreen ( + _In_ PBL_GRAPHICS_CONSOLE Console + ); + +NTSTATUS +BfClearToEndOfLine ( + _In_ PBL_GRAPHICS_CONSOLE Console ); /* FILESYSTEM ROUTINES *******************************************************/ @@ -1442,6 +1505,12 @@ BlUtlUpdateProgress ( _In_ ULONG Percentage, _Out_opt_ PBOOLEAN Completed + ); + +NTSTATUS +BlUtlGetAcpiTable ( + _Out_ PVOID* TableAddress, + _In_ ULONG Signature ); EFI_STATUS @@ -1845,6 +1914,32 @@ _Out_ PULONG Vres ); +VOID +BlDisplayInvalidateOemBitmap ( + VOID + ); + +PBITMAP +BlDisplayGetOemBitmap ( + _Out_ PCOORD Offset, + _Out_opt_ PULONG Flags + ); + +BOOLEAN +BlDisplayValidOemBitmap ( + VOID + ); + +NTSTATUS +BlDisplayClearScreen ( + VOID + ); + +NTSTATUS +BlDisplaySetCursorType ( + _In_ ULONG Type + ); + /* I/O ROUTINES **************************************************************/ NTSTATUS @@ -1963,8 +2058,27 @@ ); NTSTATUS +ConsoleGraphicalClearText ( + _In_ PBL_GRAPHICS_CONSOLE Console, + _In_ BOOLEAN LineOnly + ); + +NTSTATUS +ConsoleGraphicalClearPixels ( + _In_ PBL_GRAPHICS_CONSOLE Console, + _In_ ULONG Color + ); + +NTSTATUS ConsoleGraphicalReinitialize ( _In_ struct _BL_GRAPHICS_CONSOLE* Console + ); + +NTSTATUS +ConsoleGraphicalSetTextState ( + _In_ PBL_GRAPHICS_CONSOLE Console, + _In_ ULONG Mask, + _In_ PBL_DISPLAY_STATE TextState ); BOOLEAN @@ -2029,7 +2143,7 @@ NTSTATUS ConsoleTextLocalClearText ( _In_ struct _BL_TEXT_CONSOLE* Console, - _In_ ULONG Attribute + _In_ BOOLEAN LineOnly ); NTSTATUS @@ -2052,6 +2166,12 @@ _In_ ULONG MaxIndex ); +NTSTATUS +ConsoleFirmwareTextClear ( + _In_ PBL_TEXT_CONSOLE Console, + _In_ BOOLEAN LineOnly + ); + VOID ConsoleFirmwareTextClose ( _In_ PBL_TEXT_CONSOLE TextConsole @@ -2096,6 +2216,12 @@ ); NTSTATUS +ConsoleFirmwareGraphicalClear ( + _In_ PBL_GRAPHICS_CONSOLE Console, + _In_ ULONG Color + ); + +NTSTATUS ConsoleFirmwareGraphicalEnable ( _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole ); @@ -2141,6 +2267,22 @@ ConsoleInputLocalEraseBuffer ( _In_ PBL_INPUT_CONSOLE Console, _In_opt_ PULONG ValueToFill + ); + +VOID +ConsolepClearBuffer ( + _In_ PUCHAR FrameBuffer, + _In_ ULONG Width, + _In_ PUCHAR FillColor, + _In_ ULONG Height, + _In_ ULONG ScanlineWidth, + _In_ ULONG PixelDepth + ); + +NTSTATUS +ConsolepConvertColorToPixel ( + _In_ BL_COLOR Color, + _Out_ PUCHAR Pixel ); extern ULONG MmDescriptorCallTreeCount; @@ -2158,6 +2300,8 @@ extern EFI_GUID EfiDevicePathProtocol; extern EFI_GUID EfiBlockIoProtocol; extern EFI_GUID EfiSimpleTextInputExProtocol; +extern EFI_GUID EfiRootAcpiTableGuid; +extern EFI_GUID EfiRootAcpiTable10Guid; extern ULONG ConsoleGraphicalResolutionListFlags; extern BL_DISPLAY_MODE ConsoleGraphicalResolutionList[]; extern BL_DISPLAY_MODE ConsoleTextResolutionList[]; Added: trunk/reactos/boot/environ/include/efi/Acpi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/include/efi/A…
============================================================================== --- trunk/reactos/boot/environ/include/efi/Acpi.h (added) +++ trunk/reactos/boot/environ/include/efi/Acpi.h [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -0,0 +1,46 @@ +/** @file + GUIDs used for ACPI entries in the EFI system table + + These GUIDs point the ACPI tables as defined in the ACPI specifications. + ACPI 2.0 specification defines the ACPI 2.0 GUID. UEFI 2.0 defines the + ACPI 2.0 Table GUID and ACPI Table GUID. + + Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at +
http://opensource.org/licenses/bsd-license.php
+ + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + @par Revision Reference: + GUIDs defined in UEFI 2.0 spec. + +**/ + +#ifndef __ACPI_GUID_H__ +#define __ACPI_GUID_H__ + +#define ACPI_TABLE_GUID \ + { \ + 0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ + } + +#define EFI_ACPI_TABLE_GUID \ + { \ + 0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \ + } + +#define ACPI_10_TABLE_GUID ACPI_TABLE_GUID + +// +// ACPI 2.0 or newer tables should use EFI_ACPI_TABLE_GUID. +// +#define EFI_ACPI_20_TABLE_GUID EFI_ACPI_TABLE_GUID + +extern EFI_GUID gEfiAcpiTableGuid; +extern EFI_GUID gEfiAcpi10TableGuid; +extern EFI_GUID gEfiAcpi20TableGuid; + +#endif Propchange: trunk/reactos/boot/environ/include/efi/Acpi.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/boot/environ/lib/firmware/efi/firmware.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/firmware/…
============================================================================== --- trunk/reactos/boot/environ/lib/firmware/efi/firmware.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/firmware/efi/firmware.c [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -23,6 +23,7 @@ EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *EfiConOut; EFI_SIMPLE_TEXT_INPUT_PROTOCOL *EfiConIn; EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *EfiConInEx; +PHYSICAL_ADDRESS EfiRsdt; EFI_GUID EfiGraphicsOutputProtocol = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; EFI_GUID EfiUgaDrawProtocol = EFI_UGA_DRAW_PROTOCOL_GUID; @@ -30,6 +31,8 @@ EFI_GUID EfiDevicePathProtocol = EFI_DEVICE_PATH_PROTOCOL_GUID; EFI_GUID EfiSimpleTextInputExProtocol = EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID; EFI_GUID EfiBlockIoProtocol = EFI_BLOCK_IO_PROTOCOL_GUID; +EFI_GUID EfiRootAcpiTableGuid = EFI_ACPI_20_TABLE_GUID; +EFI_GUID EfiRootAcpiTable10Guid = EFI_ACPI_TABLE_GUID; WCHAR BlScratchBuffer[8192]; @@ -624,6 +627,37 @@ return EfiGetNtStatusCode(EfiStatus); } +NTSTATUS +EfiConOutOutputString ( + _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface, + _In_ PWCHAR String + ) +{ + BL_ARCH_MODE OldMode; + EFI_STATUS EfiStatus; + + /* Are we in protected mode? */ + OldMode = CurrentExecutionContext->Mode; + if (OldMode != BlRealMode) + { + /* FIXME: Not yet implemented */ + return STATUS_NOT_IMPLEMENTED; + } + + /* Make the EFI call */ + EfiStatus = TextInterface->OutputString(TextInterface, String); + + /* Switch back to protected mode if we came from there */ + if (OldMode != BlRealMode) + { + BlpArchSwitchContext(OldMode); + } + + /* Convert the error to an NTSTATUS */ + return EfiGetNtStatusCode(EfiStatus); +} + + VOID EfiConOutReadCurrentMode ( _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface, @@ -879,6 +913,129 @@ /* Convert the error to an NTSTATUS */ return EfiGetNtStatusCode(EfiStatus); +} + +NTSTATUS +EfipGetSystemTable ( + _In_ EFI_GUID *TableGuid, + _Out_ PPHYSICAL_ADDRESS TableAddress + ) +{ + ULONG i; + NTSTATUS Status; + + /* Assume failure */ + Status = STATUS_NOT_FOUND; + + /* Loop through the configuration tables */ + for (i = 0; i < EfiST->NumberOfTableEntries; i++) + { + /* Check if this one matches the one we want */ + if (RtlEqualMemory(&EfiST->ConfigurationTable[i].VendorGuid, + TableGuid, + sizeof(*TableGuid))) + { + /* Return its address */ + TableAddress->QuadPart = (ULONG_PTR)EfiST->ConfigurationTable[i].VendorTable; + Status = STATUS_SUCCESS; + break; + } + } + + /* Return the search result */ + return Status; +} + +NTSTATUS +EfipGetRsdt ( + _Out_ PPHYSICAL_ADDRESS FoundRsdt + ) +{ + NTSTATUS Status; + ULONG Length; + PHYSICAL_ADDRESS RsdpAddress, Rsdt; + PRSDP Rsdp; + + /* Assume failure */ + Length = 0; + Rsdp = NULL; + + /* Check if we already know it */ + if (EfiRsdt.QuadPart) + { + /* Return it */ + *FoundRsdt = EfiRsdt; + return STATUS_SUCCESS; + } + + /* Otherwise, look for the ACPI 2.0 RSDP (XSDT really) */ + Status = EfipGetSystemTable(&EfiRootAcpiTableGuid, &RsdpAddress); + if (!NT_SUCCESS(Status)) + { + /* Didn't fint it, look for the ACPI 1.0 RSDP (RSDT really) */ + Status = EfipGetSystemTable(&EfiRootAcpiTable10Guid, &RsdpAddress); + if (!NT_SUCCESS(Status)) + { + return Status; + } + } + + /* Map it */ + Length = sizeof(*Rsdp); + Status = BlMmMapPhysicalAddressEx((PVOID*)&Rsdp, + 0, + Length, + RsdpAddress); + if (NT_SUCCESS(Status)) + { + /* Check the revision (anything >= 2.0 is XSDT) */ + if (Rsdp->Revision) + { + /* Check if the table is bigger than just its header */ + if (Rsdp->Length > Length) + { + /* Capture the real length */ + Length = Rsdp->Length; + + /* Unmap our header mapping */ + BlMmUnmapVirtualAddressEx(Rsdp, sizeof(*Rsdp)); + + /* And map the whole thing now */ + Status = BlMmMapPhysicalAddressEx((PVOID*)&Rsdp, + 0, + Length, + RsdpAddress); + if (!NT_SUCCESS(Status)) + { + return Status; + } + } + + /* Read the XSDT address from the table*/ + Rsdt = Rsdp->XsdtAddress; + } + else + { + /* ACPI 1.0 so just read the RSDT */ + Rsdt.QuadPart = Rsdp->RsdtAddress; + } + + /* Save it for later */ + EfiRsdt = Rsdt; + + /* And return it back */ + *FoundRsdt = Rsdt; + } + + /* Check if we had mapped the RSDP */ + if (Rsdp) + { + /* Unmap it */ + BlMmUnmapVirtualAddressEx(Rsdp, Length); + } + + /* Return search result back to caller */ + return Status; } BL_MEMORY_ATTR Modified: trunk/reactos/boot/environ/lib/io/display/display.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/io/displa…
============================================================================== --- trunk/reactos/boot/environ/lib/io/display/display.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/io/display/display.c [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -723,3 +723,273 @@ /* Return if we got a valid resolution back */ return Status; } + +VOID +BlDisplayInvalidateOemBitmap ( + VOID + ) +{ + PBGRT_TABLE BgrtTable; + NTSTATUS Status; + + /* Search for the BGRT */ + Status = BlUtlGetAcpiTable((PVOID*)&BgrtTable, BGRT_SIGNATURE); + if (NT_SUCCESS(Status)) + { + /* Mark the bitmap as invalid */ + BgrtTable->Status &= BGRT_STATUS_IMAGE_VALID; + + /* Unmap the table */ + BlMmUnmapVirtualAddressEx(BgrtTable, BgrtTable->Header.Length); + } +} + +PBITMAP +BlDisplayGetOemBitmap ( + _In_opt_ PCOORD Offsets, + _Out_opt_ PULONG Flags + ) +{ + NTSTATUS Status; + ULONG Size; + PHYSICAL_ADDRESS PhysicalAddress; + PBGRT_TABLE BgrtTable; + PBITMAP Bitmap; + PBMP_HEADER Header; + + Bitmap = NULL; + BgrtTable = NULL; + + /* Search for the BGRT */ + Status = BlUtlGetAcpiTable((PVOID*)&BgrtTable, BGRT_SIGNATURE); + if (!NT_SUCCESS(Status)) + { + EfiPrintf(L"no BGRT found\r\n"); + goto Quickie; + } + + /* Make sure this is really a BGRT */ + if (BgrtTable->Header.Signature != BGRT_SIGNATURE) + { + Status = STATUS_ACPI_INVALID_TABLE; + goto Quickie; + } + + /* Make sure the BGRT table length is valid */ + if (BgrtTable->Header.Length != sizeof(*BgrtTable)) + { + Status = STATUS_ACPI_INVALID_TABLE; + goto Quickie; + } + + /* Make sure its a bitmap */ + if (BgrtTable->ImageType != BgrtImageTypeBitmap) + { + Status = STATUS_ACPI_INVALID_TABLE; + goto Quickie; + } + + /* Make sure it's somewhere in RAM */ + if (!BgrtTable->LogoAddress) + { + Status = STATUS_ACPI_INVALID_TABLE; + goto Quickie; + } + + /* Map the bitmap header only for now */ + PhysicalAddress.QuadPart = BgrtTable->LogoAddress; + Status = BlMmMapPhysicalAddressEx((PVOID*)&Header, + 0, + sizeof(BMP_HEADER), + PhysicalAddress); + if (!NT_SUCCESS(Status)) + { + goto Quickie; + } + + /* Capture the real size of the header */ + Size = Header->Size; + + /* Unmap the bitmap header */ + BlMmUnmapVirtualAddressEx(BgrtTable, sizeof(BMP_HEADER)); + + /* If the real size is smaller than at least a V3 bitmap, bail out */ + if (Size < sizeof(BITMAP)) + { + Status = STATUS_ACPI_INVALID_TABLE; + goto Quickie; + } + + /* Map the real size of the header */ + Status = BlMmMapPhysicalAddressEx((PVOID*)&Bitmap, + 0, + Size, + PhysicalAddress); + if (!NT_SUCCESS(Status)) + { + goto Quickie; + } + + /* Make sure this is a non-compressed 24-bit or 32-bit V3 bitmap */ + if ((Bitmap->BmpHeader.Signature != 'MB') || + (Bitmap->DibHeader.Compression) || + ((Bitmap->DibHeader.BitCount != 24) && + (Bitmap->DibHeader.BitCount != 32)) || + (Bitmap->DibHeader.Size != sizeof(BITMAP))) + { + Status = STATUS_ACPI_INVALID_TABLE; + goto Quickie; + } + + /* Check if caller wants the offsets back */ + if (Offsets) + { + /* Give them away */ + Offsets->X = BgrtTable->OffsetX; + Offsets->Y = BgrtTable->OffsetY; + } + + /* Check if the caller wants flags */ + if (Flags) + { + /* Return if the image is valid */ + *Flags = BgrtTable->Status & BGRT_STATUS_IMAGE_VALID; + } + +Quickie: + /* Check if we had mapped the BGRT */ + if (BgrtTable) + { + /* Unmap it */ + BlMmUnmapVirtualAddressEx(BgrtTable, BgrtTable->Header.Length); + } + + /* Check if this is the failure path */ + if (!NT_SUCCESS(Status)) + { + /* Did we have the OEM bitmap mapped? */ + if (Bitmap) + { + /* Unmap it */ + BlMmUnmapVirtualAddressEx(Bitmap, Bitmap->BmpHeader.Size); + } + + /* No bitmap to return */ + Bitmap = NULL; + } + + /* Return the bitmap back, if any */ + return Bitmap; +} + +BOOLEAN +BlDisplayValidOemBitmap ( + VOID + ) +{ + PBITMAP Bitmap; + ULONG HRes, VRes, Height, Width, Flags; + COORD Offsets; + BOOLEAN Result; + NTSTATUS Status; + + /* First check if mobile graphics are enabled */ + Status = BlGetBootOptionBoolean(BlpApplicationEntry.BcdData, + BcdLibraryBoolean_MobileGraphics, + &Result); + if ((NT_SUCCESS(Status)) && (Result)) + { + /* Yes, so use the firmware image */ + return TRUE; + } + + /* Nope, so we'll check the ACPI OEM bitmap */ + Result = FALSE; + Bitmap = BlDisplayGetOemBitmap(&Offsets, &Flags); + + /* Is there one? */ + if (Bitmap) + { + /* Is it valid? */ + if (Flags & BGRT_STATUS_IMAGE_VALID) + { + /* Get the current screen resolution */ + Status = BlDisplayGetScreenResolution(&HRes, &VRes); + if (NT_SUCCESS(Status)) + { + /* Is there a valid width? */ + Width = Bitmap->DibHeader.Width; + if (Width) + { + /* Is there a valid height? */ + Height = Bitmap->DibHeader.Height; + if (Height) + { + /* Will if fit on this screen? */ + if (((Width + Offsets.X) <= HRes) && + ((Height + Offsets.Y) <= VRes)) + { + /* Then it's all good! */ + Result = TRUE; + } + } + } + } + } + + /* Unmap the bitmap for now, it will be drawn later */ + BlMmUnmapVirtualAddressEx(Bitmap, Bitmap->BmpHeader.Size); + } + + /* Return that a valid OEM bitmap exists */ + return Result; +} + +NTSTATUS +BlDisplayClearScreen ( + VOID + ) +{ + NTSTATUS Status; + PBL_TEXT_CONSOLE TextConsole; + + /* Nothing to do if there's no text console */ + Status = STATUS_SUCCESS; + TextConsole = DspTextConsole; + if (TextConsole) + { + /* Otherwise, clear the whole screen */ + Status = TextConsole->Callbacks->ClearText(TextConsole, FALSE); + if (NT_SUCCESS(Status)) + { + /* Invalidate the OEM bitmap at this point */ + BlDisplayInvalidateOemBitmap(); + } + } + + /* All done */ + return Status; +}; + +NTSTATUS +BlDisplaySetCursorType ( + _In_ ULONG Type + ) +{ + NTSTATUS Status; + PBL_TEXT_CONSOLE TextConsole; + BL_DISPLAY_STATE State; + + /* Nothing to do if there's no text console */ + Status = STATUS_SUCCESS; + TextConsole = DspTextConsole; + if (TextConsole) + { + /* Write visibility state and call the function to change it */ + State.CursorVisible = Type; + Status = TextConsole->Callbacks->SetTextState(TextConsole, 8, &State); + } + + /* All done */ + return Status; +} Modified: trunk/reactos/boot/environ/lib/io/display/efi/gop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/io/displa…
============================================================================== --- trunk/reactos/boot/environ/lib/io/display/efi/gop.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/io/display/efi/gop.c [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -120,7 +120,7 @@ } /* Reset the OEM bitmap and get the new more information */ -// BlDisplayInvalidateOemBitmap(); + BlDisplayInvalidateOemBitmap(); EfiGopGetCurrentMode(Protocol, &Dummy, &ModeInformation); } @@ -166,7 +166,7 @@ { /* We failed seomewhere, reset the mode and the OEM bitmap back */ EfiGopSetMode(Protocol, CurrentMode); - //BlDisplayInvalidateOemBitmap(); + BlDisplayInvalidateOemBitmap(); } /* Return back to caller */ @@ -186,7 +186,7 @@ { /* Restore the old mode and reset the OEM bitmap in ACPI */ EfiGopSetMode(GraphicsConsole->Protocol, OldMode); - //BlDisplayInvalidateOemBitmap(); + BlDisplayInvalidateOemBitmap(); } /* Close the GOP protocol */ Modified: trunk/reactos/boot/environ/lib/io/display/efi/guicons.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/io/displa…
============================================================================== --- trunk/reactos/boot/environ/lib/io/display/efi/guicons.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/io/display/efi/guicons.c [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -87,6 +87,44 @@ } NTSTATUS +ConsoleFirmwareGraphicalClear ( + _In_ PBL_GRAPHICS_CONSOLE Console, + _In_ ULONG Color + ) +{ + NTSTATUS Status; + UCHAR Pixel[4] = { 0 }; + + /* Convert the standard color to a firmware pixel color */ + Status = ConsolepConvertColorToPixel(Color, Pixel); + if (!NT_SUCCESS(Status)) + { + return Status; + } + + /* Check if this is GOP or UGA */ + if (Console->Type == BlUgaConsole) + { + EfiPrintf(L"Uga not supported\r\n"); + Status = STATUS_NOT_IMPLEMENTED; + } + else + { + /* For GOP, just fill the screen */ + ConsolepClearBuffer(Console->FrameBuffer, + Console->DisplayMode.HRes, + Pixel, + Console->DisplayMode.VRes, + Console->PixelsPerScanLine, + Console->PixelDepth); + Status = STATUS_SUCCESS; + } + + /* All clear */ + return Status; +} + +NTSTATUS ConsoleFirmwareGraphicalEnable ( _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole ) Modified: trunk/reactos/boot/environ/lib/io/display/efi/textcons.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/io/displa…
============================================================================== --- trunk/reactos/boot/environ/lib/io/display/efi/textcons.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/io/display/efi/textcons.c [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -551,4 +551,75 @@ /* All done */ return Status; -} +} + +NTSTATUS +ConsoleFirmwareTextClear ( + _In_ PBL_TEXT_CONSOLE Console, + _In_ BOOLEAN LineOnly + ) +{ + BL_ARCH_MODE OldMode; + EFI_STATUS EfiStatus; + NTSTATUS Status; + ULONG i, Column, Row, TextWidth, TextHeight; + + /* Get the text resolution */ + BlDisplayGetTextCellResolution(&TextWidth, &TextHeight); + + /* Are we just clearing a line? */ + if (LineOnly) + { + /* Get the current column and row */ + Column = Console->State.XPos / TextWidth; + Row = Console->State.YPos / TextHeight; + + /* Loop over every remaining character */ + for (i = 0; i < Console->DisplayMode.HRes - Column - 1; i++) + { + /* Write a space on top of it */ + Status = EfiConOutOutputString(Console->Protocol, L" "); + if (!NT_SUCCESS(Status)) + { + break; + } + } + + /* And reset the cursor back at the initial position */ + Status = EfiConOutSetCursorPosition(Console->Protocol, + Column, + Row); + } + else + { + /* Are we in protected mode? */ + OldMode = CurrentExecutionContext->Mode; + if (OldMode != BlRealMode) + { + /* FIXME: Not yet implemented */ + return STATUS_NOT_IMPLEMENTED; + } + + /* Clear the scren */ + EfiStatus = Console->Protocol->ClearScreen(Console->Protocol); + + /* Switch back to protected mode if we came from there */ + if (OldMode != BlRealMode) + { + BlpArchSwitchContext(OldMode); + } + + /* Conver to NT status -- did that work? */ + Status = EfiGetNtStatusCode(EfiStatus); + if (NT_SUCCESS(Status)) + { + /* Reset current positions */ + Console->State.XPos = 0; + Console->State.YPos = 0; + } + } + + /* All done */ + return Status; +} + Modified: trunk/reactos/boot/environ/lib/io/display/guicons.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/io/displa…
============================================================================== --- trunk/reactos/boot/environ/lib/io/display/guicons.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/io/display/guicons.c [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -16,7 +16,12 @@ { { (PCONSOLE_DESTRUCT)ConsoleGraphicalDestruct, - (PCONSOLE_REINITIALIZE)ConsoleGraphicalReinitialize + (PCONSOLE_REINITIALIZE)ConsoleGraphicalReinitialize, + ConsoleTextBaseGetTextState, + (PCONSOLE_SET_TEXT_STATE)ConsoleGraphicalSetTextState, + NULL, // GetTextResolution + NULL, // SetTextResolution + (PCONSOLE_CLEAR_TEXT)ConsoleGraphicalClearText }, ConsoleGraphicalIsEnabled, ConsoleGraphicalEnable, @@ -29,6 +34,27 @@ /* FUNCTIONS *****************************************************************/ NTSTATUS +ConsoleGraphicalSetTextState ( + _In_ PBL_GRAPHICS_CONSOLE Console, + _In_ ULONG Mask, + _In_ PBL_DISPLAY_STATE TextState + ) +{ + /* Is the text console active? */ + if (Console->TextConsole.Active) + { + /* Let it handle that */ + return ConsoleFirmwareTextSetState(&Console->TextConsole, + Mask, + TextState); + } + + /* Not yet */ + EfiPrintf(L"FFX set not implemented\r\n"); + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS ConsoleGraphicalConstruct ( _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole ) @@ -77,6 +103,219 @@ GraphicsConsole->FgColor = GraphicsConsole->TextConsole.State.FgColor; GraphicsConsole->BgColor = GraphicsConsole->TextConsole.State.BgColor; return STATUS_SUCCESS; +} + +VOID +ConsolepClearBuffer ( + _In_ PUCHAR FrameBuffer, + _In_ ULONG Width, + _In_ PUCHAR FillColor, + _In_ ULONG Height, + _In_ ULONG ScanlineWidth, + _In_ ULONG PixelDepth + ) +{ + PUCHAR Scanline, Current, FrameBufferEnd, LineEnd; + ULONG LineBytes, WidthBytes, BytesPerPixel; + + /* Get the BPP */ + BytesPerPixel = PixelDepth / 8; + + /* Using that, calculate the size of a scan line */ + LineBytes = ScanlineWidth * BytesPerPixel; + + /* And the size of line we'll have to clear */ + WidthBytes = Width * BytesPerPixel; + + /* Allocat a scanline */ + Scanline = BlMmAllocateHeap(WidthBytes); + if (Scanline) + { + /* For each remaining pixel on the scanline */ + Current = Scanline; + while (Width--) + { + /* Copy in the fill color */ + RtlCopyMemory(Current, FillColor, BytesPerPixel); + Current += BytesPerPixel; + } + + /* For each scanline in the frame buffer */ + while (Height--) + { + /* Copy our constructed scanline */ + RtlCopyMemory(FrameBuffer, Scanline, WidthBytes); + FrameBuffer += LineBytes; + } + } + else + { + FrameBufferEnd = FrameBuffer + Height * LineBytes; + ScanlineWidth = BytesPerPixel * (ScanlineWidth - Width); + while (FrameBuffer != FrameBufferEnd) + { + if (FrameBuffer != (FrameBuffer + WidthBytes)) + { + LineEnd = FrameBuffer + WidthBytes; + do + { + RtlCopyMemory(FrameBuffer, FillColor, BytesPerPixel); + FrameBuffer += BytesPerPixel; + } + while (FrameBuffer != LineEnd); + } + + FrameBuffer += ScanlineWidth; + } + } +} + +NTSTATUS +ConsolepConvertColorToPixel ( + _In_ BL_COLOR Color, + _Out_ PUCHAR Pixel + ) +{ + NTSTATUS Status; + + /* Assume success */ + Status = STATUS_SUCCESS; + + /* Convert the color to a pixel value */ + switch (Color) + { + case Black: + Pixel[1] = 0; + Pixel[2] = 0; + Pixel[0] = 0; + break; + case Blue: + Pixel[1] = 0; + Pixel[2] = 0; + Pixel[0] = 0x7F; + break; + case Green: + Pixel[1] = 0x7F; + Pixel[2] = 0; + Pixel[0] = 0; + break; + case Cyan: + Pixel[1] = 0x7F; + Pixel[2] = 0; + Pixel[0] = 0x7F; + break; + case Red: + Pixel[1] = 0; + Pixel[2] = 0x7F; + Pixel[0] = 0x7F; + break; + case Magenta: + Pixel[1] = 0; + Pixel[2] = 0x7F; + Pixel[0] = 0x7F; + break; + case Brown: + Pixel[1] = 0x3F; + Pixel[2] = 0x7F; + Pixel[0] = 0; + break; + case LtGray: + Pixel[1] = 0xBFu; + Pixel[2] = 0xBFu; + *Pixel = 0xBFu; + break; + case Gray: + Pixel[1] = 0x7F; + Pixel[2] = 0x7F; + Pixel[0] = 0x7F; + break; + case LtBlue: + Pixel[1] = 0; + Pixel[2] = 0; + Pixel[0] = 0xFF; + break; + case LtGreen: + Pixel[1] = 0xFF; + Pixel[2] = 0; + Pixel[0] = 0; + break; + case LtCyan: + Pixel[1] = 0xFF; + Pixel[2] = 0; + Pixel[0] = 0xFF; + break; + case LtRed: + Pixel[1] = 0; + Pixel[2] = 0xFF; + Pixel[0] = 0; + break; + case LtMagenta: + Pixel[1] = 0; + Pixel[2] = 0xFF; + Pixel[0] = 0xFF; + break; + case Yellow: + Pixel[1] = 0xFF; + Pixel[2] = 0xFF; + Pixel[0] = 0; + break; + case White: + Pixel[1] = 0xFF; + Pixel[2] = 0xFF; + Pixel[0] = 0xFF; + break; + default: + Status = STATUS_INVALID_PARAMETER; + break; + } + return Status; +} + +NTSTATUS +ConsoleGraphicalClearPixels ( + _In_ PBL_GRAPHICS_CONSOLE Console, + _In_ ULONG Color + ) +{ + NTSTATUS Status; + + /* Check if the text console is active */ + if (Console->TextConsole.Active) + { + /* We shouldn't be here */ + Status = STATUS_UNSUCCESSFUL; + } + else + { + /* Clear it in graphics mode */ + Status = ConsoleFirmwareGraphicalClear(Console, Color); + } + + /* All good */ + return Status; +} + +NTSTATUS +ConsoleGraphicalClearText ( + _In_ PBL_GRAPHICS_CONSOLE Console, + _In_ BOOLEAN LineOnly + ) +{ + /* Is the text console active? */ + if (Console->TextConsole.Active) + { + /* Let firmware clear do it */ + return ConsoleFirmwareTextClear(&Console->TextConsole, LineOnly); + } + + /* Are we clearing a line only? */ + if (LineOnly) + { + return BfClearToEndOfLine(Console); + } + + /* Nope -- the whole screen */ + return BfClearScreen(Console); } BOOLEAN Modified: trunk/reactos/boot/environ/lib/io/display/textcons.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/io/displa…
============================================================================== --- trunk/reactos/boot/environ/lib/io/display/textcons.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/io/display/textcons.c [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -55,11 +55,11 @@ NTSTATUS ConsoleTextLocalSetTextState ( _In_ struct _BL_TEXT_CONSOLE* Console, - _In_ ULONG Flags, + _In_ ULONG Mask, _In_ PBL_DISPLAY_STATE TextState ) { - return STATUS_NOT_IMPLEMENTED; + return ConsoleFirmwareTextSetState(Console, Mask, TextState); } NTSTATUS @@ -84,10 +84,10 @@ NTSTATUS ConsoleTextLocalClearText ( _In_ struct _BL_TEXT_CONSOLE* Console, - _In_ ULONG Attribute - ) -{ - return STATUS_NOT_IMPLEMENTED; + _In_ BOOLEAN LineOnly + ) +{ + return ConsoleFirmwareTextClear(Console, LineOnly); } NTSTATUS Modified: trunk/reactos/boot/environ/lib/misc/font.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/misc/font…
============================================================================== --- trunk/reactos/boot/environ/lib/misc/font.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/misc/font.c [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -134,3 +134,63 @@ /* Return load status */ return Status; } + +NTSTATUS +BfiFlipCursorCharacter ( + _In_ PBL_GRAPHICS_CONSOLE Console, + _In_ BOOLEAN Visible + ) +{ + /* not implemented */ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +BfClearToEndOfLine ( + _In_ PBL_GRAPHICS_CONSOLE Console + ) +{ + /* not implemented */ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +BfClearScreen ( + _In_ PBL_GRAPHICS_CONSOLE Console + ) +{ + NTSTATUS Status; + + /* Reset the cursor position */ + Console->TextConsole.State.XPos = 0; + Console->TextConsole.State.YPos = 0; + + /* Fill the screen with the background color */ + Status = ConsoleGraphicalClearPixels(Console, + Console->TextConsole.State.BgColor); + if (!NT_SUCCESS(Status)) + { + return Status; + } + + /* Check if the cursor should be visible */ + if (Console->TextConsole.State.CursorVisible) + { + /* Load any fonts at this time */ + if (!IsListEmpty(&BfiDeferredListHead)) + { + BfLoadDeferredFontFiles(); + } + + /* Switch the cursor to visible */ + Status = BfiFlipCursorCharacter(Console, TRUE); + } + else + { + /* Nothing left to do */ + Status = STATUS_SUCCESS; + } + + /* Return cursor flip result, if any */ + return Status; +} Modified: trunk/reactos/boot/environ/lib/misc/resource.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/misc/reso…
============================================================================== --- trunk/reactos/boot/environ/lib/misc/resource.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/misc/resource.c [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -55,7 +55,7 @@ } /* Check if that failed, or if we're using fallback */ - if (!NT_SUCCESS(Status) || !(Primary)) + if (!(Primary) || !(NT_SUCCESS(Status))) { /* Set the fallback pointers */ ResRootDirectory = ResRootDirectoryFallback; @@ -68,7 +68,6 @@ if (!NT_SUCCESS(Status)) { /* Fallback to text mode (yes, this is the API...) */ - EfiPrintf(L"Locale failed, falling back to text mode\r\n"); return BlDisplaySetScreenResolution(); } } Modified: trunk/reactos/boot/environ/lib/misc/util.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/misc/util…
============================================================================== --- trunk/reactos/boot/environ/lib/misc/util.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/misc/util.c [iso-8859-1] Thu Jan 7 23:43:15 2016 @@ -12,8 +12,8 @@ /* DATA VARIABLES ************************************************************/ -PVOID UtlRsdt; -PVOID UtlXsdt; +PRSDT UtlRsdt; +PXSDT UtlXsdt; PVOID UtlMcContext; PVOID UtlMcDisplayMessageRoutine; @@ -29,6 +29,152 @@ PVOID UtlProgressInfo; /* FUNCTIONS *****************************************************************/ + +NTSTATUS +BlUtlGetAcpiTable ( + _Out_ PVOID* TableAddress, + _In_ ULONG Signature + ) +{ + ULONG i, TableCount, HeaderLength; + NTSTATUS Status; + PRSDT Rsdt; + PXSDT Xsdt; + PHYSICAL_ADDRESS PhysicalAddress; + PDESCRIPTION_HEADER Header; + + Header = 0; + + /* Make sure there's an output parameter */ + if (!TableAddress) + { + return STATUS_INVALID_PARAMETER; + } + + /* Get the currently known RSDT and XSDT */ + Rsdt = (PRSDT)UtlRsdt; + Xsdt = (PXSDT)UtlXsdt; + + /* Is there an RSDT? */ + if (!Rsdt) + { + /* No -- is there an XSDT? */ + if (!Xsdt) + { + /* No. Look up the RSDT */ + Status = EfipGetRsdt(&PhysicalAddress); + if (!NT_SUCCESS(Status)) + { + EfiPrintf(L"no rsdp found\r\n"); + return Status; + } + + /* Map the header */ + Status = BlMmMapPhysicalAddressEx((PVOID)&Header, + 0, + sizeof(*Header), + PhysicalAddress); + if (!NT_SUCCESS(Status)) + { + return Status; + } + + /* Unmap the header */ + BlMmUnmapVirtualAddressEx(Header, sizeof(*Header)); + + /* Map the whole table */ + Status = BlMmMapPhysicalAddressEx((PVOID)&Header, + 0, + Header->Length, + PhysicalAddress); + if (!NT_SUCCESS(Status)) + { + return Status; + } + + /* Check if its an XSDT or an RSDT */ + if (Header->Signature == XSDT_SIGNATURE) + { + /* It's an XSDT */ + Xsdt = (PXSDT)Header; + UtlXsdt = Xsdt; + } + else + { + /* It's an RSDT */ + Rsdt = (PRSDT)Header; + UtlRsdt = Rsdt; + } + } + } + + /* OK, so do we have an XSDT after all? */ + if (Xsdt) + { + /* Yes... how big is it? */ + HeaderLength = Xsdt->Header.Length; + if (HeaderLength >= sizeof(*Header)) + { + HeaderLength = sizeof(*Header); + } + + /* Based on that, how many tables are there? */ + TableCount = (Xsdt->Header.Length - HeaderLength) / sizeof(PHYSICAL_ADDRESS); + } + else + { + /* Nope, we have an RSDT. How big is it? */ + HeaderLength = Rsdt->Header.Length; + if (HeaderLength >= sizeof(*Header)) + { + HeaderLength = sizeof(*Header); + } + + /* Based on that, how many tables are there? */ + TableCount = (Rsdt->Header.Length - HeaderLength) / sizeof(ULONG); + } + + /* Loop through the ACPI tables */ + for (i = 0; i < TableCount; i++) + { + /* For an XSDT, read the 64-bit address directly */ + if (Xsdt) + { + PhysicalAddress = Xsdt->Tables[i]; + } + else + { + /* For RSDT, cast it */ + PhysicalAddress.QuadPart = Rsdt->Tables[i]; + } + + /* Map the header */ + Status = BlMmMapPhysicalAddressEx((PVOID)&Header, + 0, + sizeof(*Header), + PhysicalAddress); + if (!NT_SUCCESS(Status)) + { + return Status; + } + + /* Is it the right one? */ + if (Header->Signature == Signature) + { + /* Unmap the header */ + BlMmUnmapVirtualAddressEx(Header, sizeof(*Header)); + + /* Map the whole table */ + return BlMmMapPhysicalAddressEx(TableAddress, + 0, + Header->Length, + PhysicalAddress); + } + } + + /* Requested table does not exist */ + return STATUS_NOT_FOUND; +} VOID BlUtlUpdateProgress (
8 years, 11 months
1
0
0
0
[ion] 70538: [ACPI.H]: Fix broken definition of RSDP_SIGNATURE [ACPI.H]: Add BGRT_TABLE definition.
by ion@svn.reactos.org
Author: ion Date: Thu Jan 7 23:25:49 2016 New Revision: 70538 URL:
http://svn.reactos.org/svn/reactos?rev=70538&view=rev
Log: [ACPI.H]: Fix broken definition of RSDP_SIGNATURE [ACPI.H]: Add BGRT_TABLE definition. Modified: trunk/reactos/include/reactos/drivers/acpi/acpi.h Modified: trunk/reactos/include/reactos/drivers/acpi/acpi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/drivers/ac…
============================================================================== --- trunk/reactos/include/reactos/drivers/acpi/acpi.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/drivers/acpi/acpi.h [iso-8859-1] Thu Jan 7 23:25:49 2016 @@ -40,11 +40,26 @@ #define BOOT_SIGNATURE 'TOOB' #define SRAT_SIGNATURE 'TARS' #define WDRT_SIGNATURE 'TRDW' +#define BGRT_SIGNATURE 0x54524742 // "BGRT" // // FADT Flags // -#define ACPI_TMR_VAL_EXT 0x100 +#define ACPI_TMR_VAL_EXT 0x100 + +// +// BGRT Flags +// +#define BGRT_STATUS_IMAGE_VALID 0x01 + +// +// BGRT Image Types +// +typedef enum _BGRT_IMAGE_TYPE +{ + BgrtImageTypeBitmap, + BgrtImageTypeMax +} BGRT_IMAGE_TYPE, *PBGRT_IMAGE_TYPE; // // ACPI Generic Register Address @@ -67,8 +82,12 @@ ULONGLONG Signature; UCHAR Checksum; UCHAR OEMID[6]; - UCHAR Reserved[1]; + UCHAR Revision; ULONG RsdtAddress; + ULONG Length; + PHYSICAL_ADDRESS XsdtAddress; + UCHAR XChecksum; + UCHAR Reserved[3]; } RSDP; typedef RSDP *PRSDP; @@ -219,4 +238,15 @@ ULONG Reserved[2]; } ACPI_SRAT, *PACPI_SRAT; +typedef struct _BGRT_TABLE +{ + DESCRIPTION_HEADER Header; + USHORT Version; + UCHAR Status; + UCHAR ImageType; + ULONGLONG LogoAddress; + ULONG OffsetX; + ULONG OffsetY; +} BGRT_TABLE, *PBGRT_TABLE; + /* EOF */
8 years, 11 months
1
0
0
0
[pschweitzer] 70537: [ROSVBOXMGMT] Update the registry configuration to reflect the recent changes to rosvboxmgmt. Just uncomment the line matching the behavior you prefer. CORE-10032 ROSAPPS-303
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Thu Jan 7 22:44:33 2016 New Revision: 70537 URL:
http://svn.reactos.org/svn/reactos?rev=70537&view=rev
Log: [ROSVBOXMGMT] Update the registry configuration to reflect the recent changes to rosvboxmgmt. Just uncomment the line matching the behavior you prefer. CORE-10032 ROSAPPS-303 Modified: trunk/reactos/boot/bootdata/hivesft.inf Modified: trunk/reactos/boot/bootdata/hivesft.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesft.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivesft.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesft.inf [iso-8859-1] Thu Jan 7 22:44:33 2016 @@ -142,7 +142,8 @@ HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","
InstallRoot.NET
",0x00000000,"cmd /c reg add HKLM\SOFTWARE\Microsoft\.NETFramework /v InstallRoot /t REG_SZ /d %SystemRoot%\Microsoft.NET\Framework\" ; HACK - Start rosvboxmgmt - ROSAPPS-303 -;HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","Handle VBox SF",0x00000000,"%windir%\bin\rosvboxmgmt auto" +;HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","Handle VBox SF",0x00000000,"%windir%\bin\rosvboxmgmt autolink" +;HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","Handle VBox SF",0x00000000,"%windir%\bin\rosvboxmgmt autoassign" HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons",,0x00000012 HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu",,0x00000012
8 years, 11 months
1
0
0
0
[pschweitzer] 70536: [ROSVBOXMGMT] Introduce another automagic thing. Instead of creating shortlinks once shared folders have been enumerated, just assign them a drive letter! See it in action: htt...
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Thu Jan 7 22:43:00 2016 New Revision: 70536 URL:
http://svn.reactos.org/svn/reactos?rev=70536&view=rev
Log: [ROSVBOXMGMT] Introduce another automagic thing. Instead of creating shortlinks once shared folders have been enumerated, just assign them a drive letter! See it in action:
https://twitter.com/HeisSpiter/status/685229912748371968
Choose the one you prefer for 0.4.0 :-) CORE-10032 ROSAPPS-303 Modified: trunk/rosapps/applications/cmdutils/rosvboxmgmt/rosvboxmgmt.c Modified: trunk/rosapps/applications/cmdutils/rosvboxmgmt/rosvboxmgmt.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/cmdutils/rosv…
============================================================================== --- trunk/rosapps/applications/cmdutils/rosvboxmgmt/rosvboxmgmt.c [iso-8859-1] (original) +++ trunk/rosapps/applications/cmdutils/rosvboxmgmt/rosvboxmgmt.c [iso-8859-1] Thu Jan 7 22:43:00 2016 @@ -177,7 +177,7 @@ return 0; } -BOOL CreateUNCShortcut(PCWSTR share) +BOOL createUNCShortcut(PCWSTR share) { HRESULT res; IShellLink *link; @@ -219,12 +219,68 @@ return SUCCEEDED(res); } -int autoStart(void) +BOOL assignDriveLetter(PCWSTR share) +{ + DWORD driveMap; + char drive; + wchar_t cmdLine[MAX_PATH]; + STARTUPINFOW startupInfo; + PROCESS_INFORMATION processInformation; + BOOL ok = FALSE; + + driveMap = GetLogicalDrives(); + + for (drive = _MRX_MAX_DRIVE_LETTERS - 1; drive >= 0; ++drive) + { + if (!(driveMap & (1 << drive))) + { + break; + } + } + + if (drive < 0) + { + wprintf(L"Failed finding an appropriate drive for shared folder\n"); + return 1; + } + + drive += 'A'; + + wsprintf(cmdLine, L"hackssign_client.exe assign %c %s", drive, share); + RtlZeroMemory(&startupInfo, sizeof(startupInfo)); + startupInfo.cb = sizeof(STARTUPINFOW); + + if (!CreateProcessW(NULL, + (PVOID)cmdLine, + NULL, + NULL, + FALSE, + 0, + NULL, + NULL, + &startupInfo, + &processInformation)) + { + wprintf(L"Failed starting hackssign_client.exe\n"); + return 1; + } + + ok = (WaitForSingleObject(processInformation.hProcess, -1) == WAIT_OBJECT_0); + CloseHandle(processInformation.hProcess); + CloseHandle(processInformation.hThread); + + wprintf(L"%c assigned to %s\n", drive, share); + + return ok; +} + +int autoStart(BOOL assign) { short i; BOOL ret; DWORD outputBufferSize; char outputBuffer[_MRX_MAX_DRIVE_LETTERS]; + OFSTRUCT ofs; if (startVBoxSrv() != 0) { @@ -239,7 +295,20 @@ return 1; } - CoInitialize(NULL); + if (assign) + { + if (OpenFile("hackssign_client.exe", &ofs, OF_EXIST) != 1) + { + wprintf(L"hackssign_client.exe not found, falling back to links\n"); + assign = FALSE; + } + } + + if (!assign) + { + CoInitialize(NULL); + } + for (i = 0; i < _MRX_MAX_DRIVE_LETTERS; ++i) { CHAR id = outputBuffer[i]; @@ -255,7 +324,14 @@ continue; } - CreateUNCShortcut(name); + if (!assign) + { + createUNCShortcut(name); + } + else + { + assignDriveLetter(name); + } } return 0; @@ -268,7 +344,8 @@ wprintf(L"\taddconn <letter> <share name>: add a connection\n"); wprintf(L"\tgetlist: list connections\n"); wprintf(L"\tgetgloballist: list available shares\n"); - wprintf(L"\tauto: automagically configure the VBox Shared folders and creates desktop folders\n"); + wprintf(L"\tautolink: automagically configure the VBox Shared folders and creates desktop folders\n"); + wprintf(L"\tautoassign: automagically configure the VBox Shared folders and assigns drive letters\n"); } int wmain(int argc, wchar_t *argv[]) @@ -305,9 +382,13 @@ { return getGlobalList(); } - else if (_wcsicmp(cmd, L"auto") == 0) - { - return autoStart(); + else if (_wcsicmp(cmd, L"autolink") == 0) + { + return autoStart(FALSE); + } + else if (_wcsicmp(cmd, L"autoassign") == 0) + { + return autoStart(TRUE); } else {
8 years, 11 months
1
0
0
0
[hbelusca] 70535: [NTOS:PO]: Whitespace fixes only!
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Jan 7 20:00:05 2016 New Revision: 70535 URL:
http://svn.reactos.org/svn/reactos?rev=70535&view=rev
Log: [NTOS:PO]: Whitespace fixes only! Modified: trunk/reactos/ntoskrnl/po/events.c trunk/reactos/ntoskrnl/po/power.c Modified: trunk/reactos/ntoskrnl/po/events.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/po/events.c?rev=7…
============================================================================== --- trunk/reactos/ntoskrnl/po/events.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/po/events.c [iso-8859-1] Thu Jan 7 20:00:05 2016 @@ -16,18 +16,18 @@ typedef struct _SYS_BUTTON_CONTEXT { - PDEVICE_OBJECT DeviceObject; - PIO_WORKITEM WorkItem; - KEVENT Event; - IO_STATUS_BLOCK IoStatusBlock; - ULONG SysButton; + PDEVICE_OBJECT DeviceObject; + PIO_WORKITEM WorkItem; + KEVENT Event; + IO_STATUS_BLOCK IoStatusBlock; + ULONG SysButton; } SYS_BUTTON_CONTEXT, *PSYS_BUTTON_CONTEXT; static VOID NTAPI PopGetSysButton( - IN PDEVICE_OBJECT DeviceObject, - IN PVOID Context); + IN PDEVICE_OBJECT DeviceObject, + IN PVOID Context); PKWIN32_POWEREVENT_CALLOUT PopEventCallout; extern PCALLBACK_OBJECT SetSystemTimeCallback; @@ -57,25 +57,25 @@ static NTSTATUS NTAPI PopGetSysButtonCompletion( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN PVOID Context) -{ - PSYS_BUTTON_CONTEXT SysButtonContext = Context; - ULONG SysButton; - - /* The DeviceObject can be NULL, so use the one we stored */ - DeviceObject = SysButtonContext->DeviceObject; - - /* FIXME: What do do with the sys button event? */ - SysButton = *(PULONG)Irp->AssociatedIrp.SystemBuffer; - { - DPRINT1("A device reported the event 0x%x (", SysButton); - if (SysButton & SYS_BUTTON_POWER) DbgPrint(" POWER"); - if (SysButton & SYS_BUTTON_SLEEP) DbgPrint(" SLEEP"); - if (SysButton & SYS_BUTTON_LID) DbgPrint(" LID"); - if (SysButton == 0) DbgPrint(" WAKE"); - DbgPrint(" )\n"); + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN PVOID Context) +{ + PSYS_BUTTON_CONTEXT SysButtonContext = Context; + ULONG SysButton; + + /* The DeviceObject can be NULL, so use the one we stored */ + DeviceObject = SysButtonContext->DeviceObject; + + /* FIXME: What do do with the sys button event? */ + SysButton = *(PULONG)Irp->AssociatedIrp.SystemBuffer; + { + DPRINT1("A device reported the event 0x%x (", SysButton); + if (SysButton & SYS_BUTTON_POWER) DbgPrint(" POWER"); + if (SysButton & SYS_BUTTON_SLEEP) DbgPrint(" SLEEP"); + if (SysButton & SYS_BUTTON_LID) DbgPrint(" LID"); + if (SysButton == 0) DbgPrint(" WAKE"); + DbgPrint(" )\n"); if (SysButton & SYS_BUTTON_POWER) { @@ -84,65 +84,62 @@ ZwShutdownSystem(ShutdownNoReboot); } - } - - /* Allocate a new workitem to send the next IOCTL_GET_SYS_BUTTON_EVENT */ - SysButtonContext->WorkItem = IoAllocateWorkItem(DeviceObject); - if (!SysButtonContext->WorkItem) - { - DPRINT("IoAllocateWorkItem() failed\n"); - ExFreePoolWithTag(SysButtonContext, 'IWOP'); - return STATUS_SUCCESS; - } - IoQueueWorkItem( - SysButtonContext->WorkItem, - PopGetSysButton, - DelayedWorkQueue, - SysButtonContext); - - return STATUS_SUCCESS /* STATUS_CONTINUE_COMPLETION */; + } + + /* Allocate a new workitem to send the next IOCTL_GET_SYS_BUTTON_EVENT */ + SysButtonContext->WorkItem = IoAllocateWorkItem(DeviceObject); + if (!SysButtonContext->WorkItem) + { + DPRINT("IoAllocateWorkItem() failed\n"); + ExFreePoolWithTag(SysButtonContext, 'IWOP'); + return STATUS_SUCCESS; + } + IoQueueWorkItem(SysButtonContext->WorkItem, + PopGetSysButton, + DelayedWorkQueue, + SysButtonContext); + + return STATUS_SUCCESS /* STATUS_CONTINUE_COMPLETION */; } static VOID NTAPI PopGetSysButton( - IN PDEVICE_OBJECT DeviceObject, - IN PVOID Context) -{ - PSYS_BUTTON_CONTEXT SysButtonContext = Context; - PIO_WORKITEM CurrentWorkItem = SysButtonContext->WorkItem; - PIRP Irp; - - /* Get button pressed (IOCTL_GET_SYS_BUTTON_EVENT) */ - KeInitializeEvent(&SysButtonContext->Event, NotificationEvent, FALSE); - Irp = IoBuildDeviceIoControlRequest( - IOCTL_GET_SYS_BUTTON_EVENT, - DeviceObject, - NULL, - 0, - &SysButtonContext->SysButton, - sizeof(SysButtonContext->SysButton), - FALSE, - &SysButtonContext->Event, - &SysButtonContext->IoStatusBlock); - if (Irp) - { - IoSetCompletionRoutine( - Irp, - PopGetSysButtonCompletion, - SysButtonContext, - TRUE, - FALSE, - FALSE); - IoCallDriver(DeviceObject, Irp); - } - else - { - DPRINT1("IoBuildDeviceIoControlRequest() failed\n"); - ExFreePoolWithTag(SysButtonContext, 'IWOP'); - } - - IoFreeWorkItem(CurrentWorkItem); + IN PDEVICE_OBJECT DeviceObject, + IN PVOID Context) +{ + PSYS_BUTTON_CONTEXT SysButtonContext = Context; + PIO_WORKITEM CurrentWorkItem = SysButtonContext->WorkItem; + PIRP Irp; + + /* Get button pressed (IOCTL_GET_SYS_BUTTON_EVENT) */ + KeInitializeEvent(&SysButtonContext->Event, NotificationEvent, FALSE); + Irp = IoBuildDeviceIoControlRequest(IOCTL_GET_SYS_BUTTON_EVENT, + DeviceObject, + NULL, + 0, + &SysButtonContext->SysButton, + sizeof(SysButtonContext->SysButton), + FALSE, + &SysButtonContext->Event, + &SysButtonContext->IoStatusBlock); + if (Irp) + { + IoSetCompletionRoutine(Irp, + PopGetSysButtonCompletion, + SysButtonContext, + TRUE, + FALSE, + FALSE); + IoCallDriver(DeviceObject, Irp); + } + else + { + DPRINT1("IoBuildDeviceIoControlRequest() failed\n"); + ExFreePoolWithTag(SysButtonContext, 'IWOP'); + } + + IoFreeWorkItem(CurrentWorkItem); } NTSTATUS @@ -150,146 +147,141 @@ PopAddRemoveSysCapsCallback(IN PVOID NotificationStructure, IN PVOID Context) { - PDEVICE_INTERFACE_CHANGE_NOTIFICATION Notification; - PSYS_BUTTON_CONTEXT SysButtonContext; - OBJECT_ATTRIBUTES ObjectAttributes; - HANDLE FileHandle; - PDEVICE_OBJECT DeviceObject; - PFILE_OBJECT FileObject; - PIRP Irp; - IO_STATUS_BLOCK IoStatusBlock; - KEVENT Event; - BOOLEAN Arrival; - ULONG Caps; - NTSTATUS Status; - - DPRINT("PopAddRemoveSysCapsCallback(%p %p)\n", - NotificationStructure, Context); - - Notification = (PDEVICE_INTERFACE_CHANGE_NOTIFICATION)NotificationStructure; - if (Notification->Version != 1) - return STATUS_REVISION_MISMATCH; - if (Notification->Size != sizeof(DEVICE_INTERFACE_CHANGE_NOTIFICATION)) - return STATUS_INVALID_PARAMETER; - if (RtlCompareMemory(&Notification->Event, &GUID_DEVICE_INTERFACE_ARRIVAL, sizeof(GUID)) == sizeof(GUID)) - Arrival = TRUE; - else if (RtlCompareMemory(&Notification->Event, &GUID_DEVICE_INTERFACE_REMOVAL, sizeof(GUID)) == sizeof(GUID)) - Arrival = FALSE; - else - return STATUS_INVALID_PARAMETER; - - if (Arrival) - { - DPRINT("Arrival of %wZ\n", Notification->SymbolicLinkName); - - /* Open the device */ - InitializeObjectAttributes( - &ObjectAttributes, - Notification->SymbolicLinkName, - OBJ_KERNEL_HANDLE, - NULL, - NULL); - Status = ZwOpenFile( - &FileHandle, - FILE_READ_DATA, - &ObjectAttributes, - &IoStatusBlock, - FILE_SHARE_READ | FILE_SHARE_WRITE, - 0); - if (!NT_SUCCESS(Status)) - { - DPRINT1("ZwOpenFile() failed with status 0x%08lx\n", Status); - return Status; - } - Status = ObReferenceObjectByHandle( - FileHandle, - FILE_READ_DATA, - IoFileObjectType, - KernelMode, - (PVOID*)&FileObject, - NULL); - if (!NT_SUCCESS(Status)) - { - DPRINT1("ObReferenceObjectByHandle() failed with status 0x%08lx\n", Status); - ZwClose(FileHandle); - return Status; - } - DeviceObject = IoGetRelatedDeviceObject(FileObject); - ObDereferenceObject(FileObject); - - /* Get capabilities (IOCTL_GET_SYS_BUTTON_CAPS) */ - KeInitializeEvent(&Event, NotificationEvent, FALSE); - Irp = IoBuildDeviceIoControlRequest( - IOCTL_GET_SYS_BUTTON_CAPS, - DeviceObject, - NULL, - 0, - &Caps, - sizeof(Caps), - FALSE, - &Event, - &IoStatusBlock); - if (!Irp) - { - DPRINT1("IoBuildDeviceIoControlRequest() failed\n"); - ZwClose(FileHandle); - return STATUS_INSUFFICIENT_RESOURCES; - } - Status = IoCallDriver(DeviceObject, Irp); - if (Status == STATUS_PENDING) - { - DPRINT("IOCTL_GET_SYS_BUTTON_CAPS pending\n"); - KeWaitForSingleObject(&Event, Suspended, KernelMode, FALSE, NULL); - Status = IoStatusBlock.Status; - } - if (!NT_SUCCESS(Status)) - { - DPRINT1("Sending IOCTL_GET_SYS_BUTTON_CAPS failed with status 0x%08x\n", Status); - ZwClose(FileHandle); - return STATUS_INSUFFICIENT_RESOURCES; - } - - /* FIXME: What do do with the capabilities? */ - { - DPRINT("Device capabilities: 0x%x (", Caps); - if (Caps & SYS_BUTTON_POWER) DPRINT(" POWER"); - if (Caps & SYS_BUTTON_SLEEP) DPRINT(" SLEEP"); - if (Caps & SYS_BUTTON_LID) DPRINT(" LID"); - DPRINT(" )\n"); - } - - SysButtonContext = ExAllocatePoolWithTag(NonPagedPool, + PDEVICE_INTERFACE_CHANGE_NOTIFICATION Notification; + PSYS_BUTTON_CONTEXT SysButtonContext; + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE FileHandle; + PDEVICE_OBJECT DeviceObject; + PFILE_OBJECT FileObject; + PIRP Irp; + IO_STATUS_BLOCK IoStatusBlock; + KEVENT Event; + BOOLEAN Arrival; + ULONG Caps; + NTSTATUS Status; + + DPRINT("PopAddRemoveSysCapsCallback(%p %p)\n", + NotificationStructure, Context); + + Notification = (PDEVICE_INTERFACE_CHANGE_NOTIFICATION)NotificationStructure; + if (Notification->Version != 1) + return STATUS_REVISION_MISMATCH; + if (Notification->Size != sizeof(DEVICE_INTERFACE_CHANGE_NOTIFICATION)) + return STATUS_INVALID_PARAMETER; + if (RtlCompareMemory(&Notification->Event, &GUID_DEVICE_INTERFACE_ARRIVAL, sizeof(GUID)) == sizeof(GUID)) + Arrival = TRUE; + else if (RtlCompareMemory(&Notification->Event, &GUID_DEVICE_INTERFACE_REMOVAL, sizeof(GUID)) == sizeof(GUID)) + Arrival = FALSE; + else + return STATUS_INVALID_PARAMETER; + + if (Arrival) + { + DPRINT("Arrival of %wZ\n", Notification->SymbolicLinkName); + + /* Open the device */ + InitializeObjectAttributes(&ObjectAttributes, + Notification->SymbolicLinkName, + OBJ_KERNEL_HANDLE, + NULL, + NULL); + Status = ZwOpenFile(&FileHandle, + FILE_READ_DATA, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ | FILE_SHARE_WRITE, + 0); + if (!NT_SUCCESS(Status)) + { + DPRINT1("ZwOpenFile() failed with status 0x%08lx\n", Status); + return Status; + } + Status = ObReferenceObjectByHandle(FileHandle, + FILE_READ_DATA, + IoFileObjectType, + KernelMode, + (PVOID*)&FileObject, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("ObReferenceObjectByHandle() failed with status 0x%08lx\n", Status); + ZwClose(FileHandle); + return Status; + } + DeviceObject = IoGetRelatedDeviceObject(FileObject); + ObDereferenceObject(FileObject); + + /* Get capabilities (IOCTL_GET_SYS_BUTTON_CAPS) */ + KeInitializeEvent(&Event, NotificationEvent, FALSE); + Irp = IoBuildDeviceIoControlRequest(IOCTL_GET_SYS_BUTTON_CAPS, + DeviceObject, + NULL, + 0, + &Caps, + sizeof(Caps), + FALSE, + &Event, + &IoStatusBlock); + if (!Irp) + { + DPRINT1("IoBuildDeviceIoControlRequest() failed\n"); + ZwClose(FileHandle); + return STATUS_INSUFFICIENT_RESOURCES; + } + Status = IoCallDriver(DeviceObject, Irp); + if (Status == STATUS_PENDING) + { + DPRINT("IOCTL_GET_SYS_BUTTON_CAPS pending\n"); + KeWaitForSingleObject(&Event, Suspended, KernelMode, FALSE, NULL); + Status = IoStatusBlock.Status; + } + if (!NT_SUCCESS(Status)) + { + DPRINT1("Sending IOCTL_GET_SYS_BUTTON_CAPS failed with status 0x%08x\n", Status); + ZwClose(FileHandle); + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* FIXME: What do do with the capabilities? */ + { + DPRINT("Device capabilities: 0x%x (", Caps); + if (Caps & SYS_BUTTON_POWER) DPRINT(" POWER"); + if (Caps & SYS_BUTTON_SLEEP) DPRINT(" SLEEP"); + if (Caps & SYS_BUTTON_LID) DPRINT(" LID"); + DPRINT(" )\n"); + } + + SysButtonContext = ExAllocatePoolWithTag(NonPagedPool, sizeof(SYS_BUTTON_CONTEXT), 'IWOP'); - if (!SysButtonContext) - { - DPRINT1("ExAllocatePoolWithTag() failed\n"); - ZwClose(FileHandle); - return STATUS_INSUFFICIENT_RESOURCES; - } - - /* Queue a work item to get sys button event */ - SysButtonContext->WorkItem = IoAllocateWorkItem(DeviceObject); - SysButtonContext->DeviceObject = DeviceObject; - if (!SysButtonContext->WorkItem) - { - DPRINT1("IoAllocateWorkItem() failed\n"); - ZwClose(FileHandle); - ExFreePoolWithTag(SysButtonContext, 'IWOP'); - return STATUS_INSUFFICIENT_RESOURCES; - } - IoQueueWorkItem( - SysButtonContext->WorkItem, - PopGetSysButton, - DelayedWorkQueue, - SysButtonContext); - - ZwClose(FileHandle); - return STATUS_SUCCESS; - } - else - { - DPRINT1("Removal of a power capable device not implemented\n"); - return STATUS_NOT_IMPLEMENTED; - } -} + if (!SysButtonContext) + { + DPRINT1("ExAllocatePoolWithTag() failed\n"); + ZwClose(FileHandle); + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* Queue a work item to get sys button event */ + SysButtonContext->WorkItem = IoAllocateWorkItem(DeviceObject); + SysButtonContext->DeviceObject = DeviceObject; + if (!SysButtonContext->WorkItem) + { + DPRINT1("IoAllocateWorkItem() failed\n"); + ZwClose(FileHandle); + ExFreePoolWithTag(SysButtonContext, 'IWOP'); + return STATUS_INSUFFICIENT_RESOURCES; + } + IoQueueWorkItem(SysButtonContext->WorkItem, + PopGetSysButton, + DelayedWorkQueue, + SysButtonContext); + + ZwClose(FileHandle); + return STATUS_SUCCESS; + } + else + { + DPRINT1("Removal of a power capable device not implemented\n"); + return STATUS_NOT_IMPLEMENTED; + } +} Modified: trunk/reactos/ntoskrnl/po/power.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/po/power.c?rev=70…
============================================================================== --- trunk/reactos/ntoskrnl/po/power.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/po/power.c [iso-8859-1] Thu Jan 7 20:00:05 2016 @@ -622,10 +622,10 @@ */ NTSTATUS NTAPI -NtInitiatePowerAction (IN POWER_ACTION SystemAction, - IN SYSTEM_POWER_STATE MinSystemState, - IN ULONG Flags, - IN BOOLEAN Asynchronous) +NtInitiatePowerAction(IN POWER_ACTION SystemAction, + IN SYSTEM_POWER_STATE MinSystemState, + IN ULONG Flags, + IN BOOLEAN Asynchronous) { UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
8 years, 11 months
1
0
0
0
[akhaldi] 70534: [0.4.0] * Merge the network drives handling fix in drive properties dialog by Jared Smudde in r70527. CORE-10779
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Jan 7 19:59:31 2016 New Revision: 70534 URL:
http://svn.reactos.org/svn/reactos?rev=70534&view=rev
Log: [0.4.0] * Merge the network drives handling fix in drive properties dialog by Jared Smudde in r70527. CORE-10779 Modified: branches/ros-branch-0_4_0/ (props changed) branches/ros-branch-0_4_0/reactos/ (props changed) branches/ros-branch-0_4_0/reactos/dll/win32/shell32/dialogs/drvdefext.cpp Propchange: branches/ros-branch-0_4_0/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jan 7 19:59:31 2016 @@ -1 +1 @@ -/trunk:70000-70321,70323-70324,70328-70337,70339-70340,70347,70349,70354-70358,70360,70363,70369,70373,70375-70378,70381,70384-70385,70387-70389,70398,70400,70408,70424,70436-70437,70443,70464,70470,70480,70497,70499-70501,70507-70510,70512-70513,70523,70528-70529 +/trunk:70000-70321,70323-70324,70328-70337,70339-70340,70347,70349,70354-70358,70360,70363,70369,70373,70375-70378,70381,70384-70385,70387-70389,70398,70400,70408,70424,70436-70437,70443,70464,70470,70480,70497,70499-70501,70507-70510,70512-70513,70523,70527-70529 Propchange: branches/ros-branch-0_4_0/reactos/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jan 7 19:59:31 2016 @@ -20,4 +20,4 @@ /branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859 /branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567 /branches/wlan-bringup:54809-54998 -/trunk/reactos:70000-70321,70323-70324,70328-70337,70339-70340,70347,70349,70354-70358,70360,70363,70369,70373,70375-70378,70381,70384-70385,70387-70389,70398,70400,70408,70424,70436-70437,70443,70464,70470,70480,70497,70501,70507-70510,70523,70528-70529 +/trunk/reactos:70000-70321,70323-70324,70328-70337,70339-70340,70347,70349,70354-70358,70360,70363,70369,70373,70375-70378,70381,70384-70385,70387-70389,70398,70400,70408,70424,70436-70437,70443,70464,70470,70480,70497,70501,70507-70510,70523,70527-70529 Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shell32/dialogs/drvdefext.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shell32/dialogs/drvdefext.cpp [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shell32/dialogs/drvdefext.cpp [iso-8859-1] Thu Jan 7 19:59:31 2016 @@ -302,8 +302,9 @@ UINT IconId, TypeStrId = 0; switch (DriveType) { + case DRIVE_REMOVABLE: IconId = IDI_SHELL_3_14_FLOPPY; break; case DRIVE_CDROM: IconId = IDI_SHELL_CDROM; TypeStrId = IDS_DRIVE_CDROM; break; - case DRIVE_REMOVABLE: IconId = IDI_SHELL_3_14_FLOPPY; break; + case DRIVE_REMOTE: IconId = IDI_SHELL_NETDRIVE; TypeStrId = IDS_DRIVE_NETWORK; break; case DRIVE_RAMDISK: IconId = IDI_SHELL_RAMDISK; break; default: IconId = IDI_SHELL_DRIVE; TypeStrId = IDS_DRIVE_FIXED; }
8 years, 11 months
1
0
0
0
[akhaldi] 70533: [0.4.0] * Merge the smss fixes by Hermès in r70529.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Jan 7 19:54:20 2016 New Revision: 70533 URL:
http://svn.reactos.org/svn/reactos?rev=70533&view=rev
Log: [0.4.0] * Merge the smss fixes by Hermès in r70529. Modified: branches/ros-branch-0_4_0/ (props changed) branches/ros-branch-0_4_0/reactos/ (props changed) branches/ros-branch-0_4_0/reactos/base/system/smss/sminit.c branches/ros-branch-0_4_0/reactos/base/system/smss/smloop.c Propchange: branches/ros-branch-0_4_0/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jan 7 19:54:20 2016 @@ -1 +1 @@ -/trunk:70000-70321,70323-70324,70328-70337,70339-70340,70347,70349,70354-70358,70360,70363,70369,70373,70375-70378,70381,70384-70385,70387-70389,70398,70400,70408,70424,70436-70437,70443,70464,70470,70480,70497,70499-70501,70507-70510,70512-70513,70523,70528 +/trunk:70000-70321,70323-70324,70328-70337,70339-70340,70347,70349,70354-70358,70360,70363,70369,70373,70375-70378,70381,70384-70385,70387-70389,70398,70400,70408,70424,70436-70437,70443,70464,70470,70480,70497,70499-70501,70507-70510,70512-70513,70523,70528-70529 Propchange: branches/ros-branch-0_4_0/reactos/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jan 7 19:54:20 2016 @@ -20,4 +20,4 @@ /branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859 /branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567 /branches/wlan-bringup:54809-54998 -/trunk/reactos:70000-70321,70323-70324,70328-70337,70339-70340,70347,70349,70354-70358,70360,70363,70369,70373,70375-70378,70381,70384-70385,70387-70389,70398,70400,70408,70424,70436-70437,70443,70464,70470,70480,70497,70501,70507-70510,70523,70528 +/trunk/reactos:70000-70321,70323-70324,70328-70337,70339-70340,70347,70349,70354-70358,70360,70363,70369,70373,70375-70378,70381,70384-70385,70387-70389,70398,70400,70408,70424,70436-70437,70443,70464,70470,70480,70497,70501,70507-70510,70523,70528-70529 Modified: branches/ros-branch-0_4_0/reactos/base/system/smss/sminit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/base/s…
============================================================================== --- branches/ros-branch-0_4_0/reactos/base/system/smss/sminit.c [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/base/system/smss/sminit.c [iso-8859-1] Thu Jan 7 19:54:20 2016 @@ -38,7 +38,7 @@ PISECURITY_DESCRIPTOR SmpKnownDllsSecurityDescriptor, SmpApiPortSecurityDescriptor; ULONG SmpAllowProtectedRenames, SmpProtectionMode = 1; -BOOLEAN MiniNTBoot; +BOOLEAN MiniNTBoot = FALSE; #define SMSS_CHECKPOINT(x, y) \ { \ @@ -325,7 +325,7 @@ } /* Move to the next requested object */ - while (*SourceString++); + SourceString += wcslen(SourceString) + 1; } /* All done */ @@ -403,7 +403,7 @@ if (!(NT_SUCCESS(Status)) || (ValueType == REG_SZ)) return Status; /* Otherwise, move to the next DLL name */ - while (*DllName++); + DllName += wcslen(DllName) + 1; } } @@ -585,7 +585,7 @@ } /* Move to the next name */ - while (*SubsystemName++); + SubsystemName += wcslen(SubsystemName) + 1; } } @@ -1495,9 +1495,13 @@ NextEntry = SmpKnownDllsList.Flink; while (NextEntry != &SmpKnownDllsList) { - /* Get the entry and skip it if it's in the exluded list */ + /* Get the entry and move on */ RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry); + NextEntry = NextEntry->Flink; + DPRINT("Processing known DLL: %wZ-%wZ\n", &RegEntry->Name, &RegEntry->Value); + + /* Skip the entry if it's in the exluded list */ if ((SmpFindRegistryValue(&SmpExcludeKnownDllsList, RegEntry->Name.Buffer)) || (SmpFindRegistryValue(&SmpExcludeKnownDllsList, @@ -1512,14 +1516,15 @@ OBJ_CASE_INSENSITIVE, DirFileHandle, NULL); - Status = NtOpenFile(&FileHandle, - SYNCHRONIZE | FILE_EXECUTE, - &ObjectAttributes, - &IoStatusBlock, - FILE_SHARE_READ | FILE_SHARE_DELETE, - FILE_NON_DIRECTORY_FILE | - FILE_SYNCHRONOUS_IO_NONALERT); - if (!NT_SUCCESS(Status)) break; + Status1 = NtOpenFile(&FileHandle, + SYNCHRONIZE | FILE_EXECUTE, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ | FILE_SHARE_DELETE, + FILE_NON_DIRECTORY_FILE | + FILE_SYNCHRONOUS_IO_NONALERT); + /* If we failed, skip it */ + if (!NT_SUCCESS(Status1)) continue; /* Checksum it */ Status = LdrVerifyImageMatchesChecksum((HANDLE)((ULONG_PTR)FileHandle | 1), @@ -1536,8 +1541,7 @@ ErrorParameters[2] = (ULONG)&RegEntry->Value; SmpTerminate(ErrorParameters, 5, RTL_NUMBER_OF(ErrorParameters)); } - else - if (!(ImageCharacteristics & IMAGE_FILE_DLL)) + else if (!(ImageCharacteristics & IMAGE_FILE_DLL)) { /* An invalid known DLL entry will also kill SMSS */ RtlInitUnicodeString(&ErrorResponse, @@ -1589,9 +1593,6 @@ /* Close the file since we can move on to the next one */ Status1 = NtClose(FileHandle); ASSERT(NT_SUCCESS(Status1)); - - /* Go to the next entry */ - NextEntry = NextEntry->Flink; } Quickie: @@ -1652,7 +1653,7 @@ UNICODE_STRING ValueName, DestinationString; HANDLE KeyHandle, KeyHandle2; ULONG ResultLength; - PWCHAR ArchName; + PWCHAR ValueData; WCHAR ValueBuffer[512], ValueBuffer2[512]; PKEY_VALUE_PARTIAL_INFORMATION PartialInfo = (PVOID)ValueBuffer; PKEY_VALUE_PARTIAL_INFORMATION PartialInfo2 = (PVOID)ValueBuffer2; @@ -1700,13 +1701,14 @@ /* First let's write the OS variable */ RtlInitUnicodeString(&ValueName, L"OS"); - DPRINT("Setting %wZ to %S\n", &ValueName, L"Windows_NT"); + ValueData = L"Windows_NT"; + DPRINT("Setting %wZ to %S\n", &ValueName, ValueData); Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_SZ, - L"Windows_NT", - wcslen(L"Windows_NT") * sizeof(WCHAR) + sizeof(UNICODE_NULL)); + ValueData, + (wcslen(ValueData) + 1) * sizeof(WCHAR)); if (!NT_SUCCESS(Status)) { DPRINT1("SMSS: Failed writing %wZ environment variable - %x\n", @@ -1721,30 +1723,30 @@ { /* Pick the correct string that matches the architecture */ case PROCESSOR_ARCHITECTURE_INTEL: - ArchName = L"x86"; + ValueData = L"x86"; break; case PROCESSOR_ARCHITECTURE_AMD64: - ArchName = L"AMD64"; + ValueData = L"AMD64"; break; case PROCESSOR_ARCHITECTURE_IA64: - ArchName = L"IA64"; + ValueData = L"IA64"; break; default: - ArchName = L"Unknown"; + ValueData = L"Unknown"; break; } /* Set it */ - DPRINT("Setting %wZ to %S\n", &ValueName, ArchName); + DPRINT("Setting %wZ to %S\n", &ValueName, ValueData); Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_SZ, - ArchName, - wcslen(ArchName) * sizeof(WCHAR) + sizeof(UNICODE_NULL)); + ValueData, + (wcslen(ValueData) + 1) * sizeof(WCHAR)); if (!NT_SUCCESS(Status)) { DPRINT1("SMSS: Failed writing %wZ environment variable - %x\n", @@ -1762,7 +1764,7 @@ 0, REG_SZ, ValueBuffer, - wcslen(ValueBuffer) * sizeof(WCHAR) + sizeof(UNICODE_NULL)); + (wcslen(ValueBuffer) + 1) * sizeof(WCHAR)); if (!NT_SUCCESS(Status)) { DPRINT1("SMSS: Failed writing %wZ environment variable - %x\n", @@ -1830,7 +1832,7 @@ 0, REG_SZ, PartialInfo->Data, - wcslen((PWCHAR)PartialInfo->Data) * sizeof(WCHAR) + sizeof(UNICODE_NULL)); + (wcslen((PWCHAR)PartialInfo->Data) + 1) * sizeof(WCHAR)); if (!NT_SUCCESS(Status)) { DPRINT1("SMSS: Failed writing %wZ environment variable - %x\n", @@ -1872,7 +1874,7 @@ 0, REG_SZ, ValueBuffer, - wcslen(ValueBuffer) * sizeof(WCHAR) + sizeof(UNICODE_NULL)); + (wcslen(ValueBuffer) + 1) * sizeof(WCHAR)); if (!NT_SUCCESS(Status)) { DPRINT1("SMSS: Failed writing %wZ environment variable - %x\n", @@ -1890,7 +1892,7 @@ 0, REG_SZ, ValueBuffer, - wcslen(ValueBuffer) * sizeof(WCHAR) + sizeof(UNICODE_NULL)); + (wcslen(ValueBuffer) + 1) * sizeof(WCHAR)); if (!NT_SUCCESS(Status)) { DPRINT1("SMSS: Failed writing %wZ environment variable - %x\n", @@ -1944,7 +1946,7 @@ 0, REG_SZ, ValueBuffer, - wcslen(ValueBuffer) * sizeof(WCHAR) + sizeof(UNICODE_NULL)); + (wcslen(ValueBuffer) + 1) * sizeof(WCHAR)); if (!NT_SUCCESS(Status)) { DPRINT1("SMSS: Failed writing %wZ environment variable - %x\n", @@ -2335,25 +2337,29 @@ return Status; } - /* Loop every page file */ - Head = &SmpPagingFileList; - while (!IsListEmpty(Head)) - { - /* Remove each one from the list */ - NextEntry = RemoveHeadList(Head); - - /* Create the descriptor for it */ - RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry); - SmpCreatePagingFileDescriptor(&RegEntry->Name); - - /* And free it */ - if (RegEntry->AnsiValue) RtlFreeHeap(RtlGetProcessHeap(), 0, RegEntry->AnsiValue); - if (RegEntry->Value.Buffer) RtlFreeHeap(RtlGetProcessHeap(), 0, RegEntry->Value.Buffer); - RtlFreeHeap(RtlGetProcessHeap(), 0, RegEntry); - } - - /* Now create all the paging files for the descriptors that we have */ - SmpCreatePagingFiles(); + /* Create the needed page files */ + if (!MiniNTBoot) + { + /* Loop every page file */ + Head = &SmpPagingFileList; + while (!IsListEmpty(Head)) + { + /* Remove each one from the list */ + NextEntry = RemoveHeadList(Head); + + /* Create the descriptor for it */ + RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry); + SmpCreatePagingFileDescriptor(&RegEntry->Name); + + /* And free it */ + if (RegEntry->AnsiValue) RtlFreeHeap(RtlGetProcessHeap(), 0, RegEntry->AnsiValue); + if (RegEntry->Value.Buffer) RtlFreeHeap(RtlGetProcessHeap(), 0, RegEntry->Value.Buffer); + RtlFreeHeap(RtlGetProcessHeap(), 0, RegEntry); + } + + /* Now create all the paging files for the descriptors that we have */ + SmpCreatePagingFiles(); + } /* Tell Cm it's now safe to fully enable write access to the registry */ NtInitializeRegistry(CM_BOOT_FLAG_SMSS); Modified: branches/ros-branch-0_4_0/reactos/base/system/smss/smloop.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/base/s…
============================================================================== --- branches/ros-branch-0_4_0/reactos/base/system/smss/smloop.c [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/base/system/smss/smloop.c [iso-8859-1] Thu Jan 7 19:54:20 2016 @@ -380,7 +380,7 @@ case LPC_CONNECTION_REQUEST: /* Create the right structures for it */ SmpHandleConnectionRequest(SmApiPort, (PSB_API_MSG)&RequestMsg); - ReplyMsg = NULL; + ReplyMsg = NULL; break; /* A closed connection */
8 years, 11 months
1
0
0
0
[akhaldi] 70532: [0.4.0] * Merge the shell image viewer ICO, EMF, TIF and WMF files support fix by Hermès in r70528.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Jan 7 19:52:38 2016 New Revision: 70532 URL:
http://svn.reactos.org/svn/reactos?rev=70532&view=rev
Log: [0.4.0] * Merge the shell image viewer ICO, EMF, TIF and WMF files support fix by Hermès in r70528. Modified: branches/ros-branch-0_4_0/ (props changed) branches/ros-branch-0_4_0/reactos/ (props changed) branches/ros-branch-0_4_0/reactos/boot/bootdata/hivecls.inf branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/bg-BG.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/cs-CZ.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/de-DE.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/en-US.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/es-ES.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/fr-FR.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/he-IL.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/it-IT.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/lt-LT.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/no-NO.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/pl-PL.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/ro-RO.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/ru-RU.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/sk-SK.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/sq-AL.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/tr-TR.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/uk-UA.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/zh-CN.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/zh-TW.rc branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/resource.h Propchange: branches/ros-branch-0_4_0/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jan 7 19:52:38 2016 @@ -1 +1 @@ -/trunk:70000-70321,70323-70324,70328-70337,70339-70340,70347,70349,70354-70358,70360,70363,70369,70373,70375-70378,70381,70384-70385,70387-70389,70398,70400,70408,70424,70436-70437,70443,70464,70470,70480,70497,70499-70501,70507-70510,70512-70513,70523 +/trunk:70000-70321,70323-70324,70328-70337,70339-70340,70347,70349,70354-70358,70360,70363,70369,70373,70375-70378,70381,70384-70385,70387-70389,70398,70400,70408,70424,70436-70437,70443,70464,70470,70480,70497,70499-70501,70507-70510,70512-70513,70523,70528 Propchange: branches/ros-branch-0_4_0/reactos/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jan 7 19:52:38 2016 @@ -20,4 +20,4 @@ /branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859 /branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567 /branches/wlan-bringup:54809-54998 -/trunk/reactos:70000-70321,70323-70324,70328-70337,70339-70340,70347,70349,70354-70358,70360,70363,70369,70373,70375-70378,70381,70384-70385,70387-70389,70398,70400,70408,70424,70436-70437,70443,70464,70470,70480,70497,70501,70507-70510,70523 +/trunk/reactos:70000-70321,70323-70324,70328-70337,70339-70340,70347,70349,70354-70358,70360,70363,70369,70373,70375-70378,70381,70384-70385,70387-70389,70398,70400,70408,70424,70436-70437,70443,70464,70470,70480,70497,70501,70507-70510,70523,70528 Modified: branches/ros-branch-0_4_0/reactos/boot/bootdata/hivecls.inf URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/boot/b…
============================================================================== --- branches/ros-branch-0_4_0/reactos/boot/bootdata/hivecls.inf [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/boot/bootdata/hivecls.inf [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -155,12 +155,25 @@ ; Icons HKCR,".ico","",0x00000000,"icofile" +HKCR,".ico","Content Type",0x00000000,"image/x-icon" +HKCR,".ico","PerceivedType",0x00000000,"image" HKCR,"icofile","",0x00000000,"Icon" HKCR,"icofile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-213" HKCR,"icofile\DefaultIcon","",0x00000000,"%1" +HKCR,"icofile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1" + +; EMF Images +HKCR,".emf","",0x00000000,"emffile" +HKCR,".emf","PerceivedType",0x00000000,"image" +HKCR,"emffile","",0x00000000,"EMF Image" +HKCR,"emffile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shimgvw.dll,-301" +HKCR,"emffile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,0" +HKCR,"emffile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1" ; GIF Images HKCR,".gif","",0x00000000,"giffile" +HKCR,".gif","Content Type",0x00000000,"image/gif" +HKCR,".gif","PerceivedType",0x00000000,"image" HKCR,"giffile","",0x00000000,"GIF Image" HKCR,"giffile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shimgvw.dll,-302" HKCR,"giffile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,2" @@ -168,7 +181,11 @@ ; JPEG Images HKCR,".jpg","",0x00000000,"jpegfile" +HKCR,".jpg","Content Type",0x00000000,"image/jpeg" +HKCR,".jpg","PerceivedType",0x00000000,"image" HKCR,".jpeg","",0x00000000,"jpegfile" +HKCR,".jpeg","Content Type",0x00000000,"image/jpeg" +HKCR,".jpeg","PerceivedType",0x00000000,"image" HKCR,"jpegfile","",0x00000000,"JPEG Image" HKCR,"jpegfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shimgvw.dll,-303" HKCR,"jpegfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,0" @@ -176,19 +193,43 @@ ; Bitmap Images HKCR,".bmp","",0x00000000,"bmpfile" -HKCR,"bmpfile","",0x00000000,"Bitmap Image" +HKCR,".bmp","Content Type",0x00000000,"image/bmp" +HKCR,".bmp","PerceivedType",0x00000000,"image" HKCR,".bmp\shellnew","",0x00000000,"" HKCR,".bmp\shellnew","NullFile",0x00020000,"" +HKCR,"bmpfile","",0x00000000,"Bitmap Image" HKCR,"bmpfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shimgvw.dll,-304" HKCR,"bmpfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,1" HKCR,"bmpfile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1" ; PNG Images HKCR,".png","",0x00000000,"pngfile" +HKCR,".png","Content Type",0x00000000,"image/png" +HKCR,".png","PerceivedType",0x00000000,"image" HKCR,"pngfile","",0x00000000,"PNG Image" HKCR,"pngfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shimgvw.dll,-305" HKCR,"pngfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,2" HKCR,"pngfile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1" + +; TIF Images +HKCR,".tif","",0x00000000,"TIFImage.Document" +HKCR,".tif","Content Type",0x00000000,"image/tiff" +HKCR,".tif","PerceivedType",0x00000000,"image" +HKCR,".tiff","",0x00000000,"TIFImage.Document" +HKCR,".tiff","Content Type",0x00000000,"image/tiff" +HKCR,".tiff","PerceivedType",0x00000000,"image" +HKCR,"TIFImage.Document","",0x00000000,"TIF Image" +HKCR,"TIFImage.Document","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shimgvw.dll,-306" +HKCR,"TIFImage.Document\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,0" +HKCR,"TIFImage.Document\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1" + +; WMF Images +HKCR,".wmf","",0x00000000,"wmffile" +HKCR,".wmf","PerceivedType",0x00000000,"image" +HKCR,"wmffile","",0x00000000,"WMF Image" +HKCR,"wmffile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shimgvw.dll,-307" +HKCR,"wmffile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,0" +HKCR,"wmffile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1" ; Configuration Files HKCR,".ini","",0x00000000,"inifile" Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/bg-BG.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/bg-BG.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -18,11 +18,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF Image" IDS_GIF_FILE "GIF Image" IDS_JPG_FILE "JPEG Image" IDS_BMP_FILE "Bitmap Image" IDS_PNG_FILE "PNG Image" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF Image" + IDS_WMF_FILE "WMF Image" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/cs-CZ.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/cs-CZ.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -23,11 +23,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF Image" IDS_GIF_FILE "GIF Image" IDS_JPG_FILE "JPEG Image" IDS_BMP_FILE "Bitmap Image" IDS_PNG_FILE "PNG Image" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF Image" + IDS_WMF_FILE "WMF Image" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/de-DE.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/de-DE.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -18,11 +18,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF-Bilddatei" + IDS_EMF_FILE "EMF-Bilddatei" IDS_GIF_FILE "GIF-Bilddatei" IDS_JPG_FILE "JPEG-Bilddatei" IDS_BMP_FILE "Bitmap-Bilddatei" IDS_PNG_FILE "PNG-Bilddatei" - // IDS_TIF_FILE "TIF-Bilddatei" - // IDS_WMF_FILE "WMF-Bilddatei" + IDS_TIF_FILE "TIF-Bilddatei" + IDS_WMF_FILE "WMF-Bilddatei" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/en-US.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/en-US.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -18,11 +18,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF Image" IDS_GIF_FILE "GIF Image" IDS_JPG_FILE "JPEG Image" IDS_BMP_FILE "Bitmap Image" IDS_PNG_FILE "PNG Image" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF Image" + IDS_WMF_FILE "WMF Image" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/es-ES.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/es-ES.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -20,11 +20,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "Imagen EMF" + IDS_EMF_FILE "Imagen EMF" IDS_GIF_FILE "Imagen GIF" IDS_JPG_FILE "Imagen JPEG" IDS_BMP_FILE "Imagen de mapa de bits" IDS_PNG_FILE "Imagen PNG" - // IDS_TIF_FILE "Imagen TIF" - // IDS_WMF_FILE "Imagen WMF" + IDS_TIF_FILE "Imagen TIF" + IDS_WMF_FILE "Imagen WMF" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/fr-FR.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/fr-FR.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -18,11 +18,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "Image EMF" + IDS_EMF_FILE "Image EMF" IDS_GIF_FILE "Image GIF" IDS_JPG_FILE "Image JPEG" IDS_BMP_FILE "Image Bitmap" IDS_PNG_FILE "Image PNG" - // IDS_TIF_FILE "Image TIF" - // IDS_WMF_FILE "Image WMF" + IDS_TIF_FILE "Image TIF" + IDS_WMF_FILE "Image WMF" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/he-IL.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/he-IL.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/he-IL.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -18,11 +18,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF Image" IDS_GIF_FILE "GIF Image" IDS_JPG_FILE "JPEG Image" IDS_BMP_FILE "Bitmap Image" IDS_PNG_FILE "PNG Image" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF Image" + IDS_WMF_FILE "WMF Image" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/it-IT.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/it-IT.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -18,11 +18,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF Image" IDS_GIF_FILE "GIF Image" IDS_JPG_FILE "JPEG Image" IDS_BMP_FILE "Bitmap Image" IDS_PNG_FILE "PNG Image" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF Image" + IDS_WMF_FILE "WMF Image" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/lt-LT.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/lt-LT.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/lt-LT.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -20,11 +20,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF Image" IDS_GIF_FILE "GIF Image" IDS_JPG_FILE "JPEG Image" IDS_BMP_FILE "Bitmap Image" IDS_PNG_FILE "PNG Image" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF Image" + IDS_WMF_FILE "WMF Image" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/no-NO.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/no-NO.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/no-NO.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -18,11 +18,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF Image" IDS_GIF_FILE "GIF Image" IDS_JPG_FILE "JPEG Image" IDS_BMP_FILE "Bitmap Image" IDS_PNG_FILE "PNG Image" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF Image" + IDS_WMF_FILE "WMF Image" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/pl-PL.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/pl-PL.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -23,11 +23,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF Image" IDS_GIF_FILE "GIF Image" IDS_JPG_FILE "JPEG Image" IDS_BMP_FILE "Bitmap Image" IDS_PNG_FILE "PNG Image" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF Image" + IDS_WMF_FILE "WMF Image" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/ro-RO.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/ro-RO.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -25,11 +25,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "Imagine EMF" + IDS_EMF_FILE "Imagine EMF" IDS_GIF_FILE "Imagine GIF" IDS_JPG_FILE "Imagine JPEG" - IDS_BMP_FILE "Imagine bitmap" + IDS_BMP_FILE "Imagine Bitmap" IDS_PNG_FILE "Imagine PNG" - // IDS_TIF_FILE "Imagine TIF" - // IDS_WMF_FILE "Imagine WMF" + IDS_TIF_FILE "Imagine TIF" + IDS_WMF_FILE "Imagine WMF" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/ru-RU.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/ru-RU.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -18,11 +18,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF изобÑажение" + IDS_EMF_FILE "EMF изобÑажение" IDS_GIF_FILE "GIF изобÑажение" IDS_JPG_FILE "JPEG изобÑажение" IDS_BMP_FILE "Bitmap изобÑажение" IDS_PNG_FILE "PNG изобÑажение" - // IDS_TIF_FILE "TIF изобÑажение" - // IDS_WMF_FILE "WMF изобÑажение" + IDS_TIF_FILE "TIF изобÑажение" + IDS_WMF_FILE "WMF изобÑажение" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/sk-SK.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/sk-SK.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -22,11 +22,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF Image" IDS_GIF_FILE "GIF Image" IDS_JPG_FILE "JPEG Image" IDS_BMP_FILE "Bitmap Image" IDS_PNG_FILE "PNG Image" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF Image" + IDS_WMF_FILE "WMF Image" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/sq-AL.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/sq-AL.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -22,11 +22,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF Image" IDS_GIF_FILE "GIF Image" IDS_JPG_FILE "JPEG Image" IDS_BMP_FILE "Bitmap Image" IDS_PNG_FILE "PNG Image" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF Image" + IDS_WMF_FILE "WMF Image" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/tr-TR.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/tr-TR.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -20,11 +20,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Resmi" + IDS_EMF_FILE "EMF Resmi" IDS_GIF_FILE "GIF Resmi" IDS_JPG_FILE "JPEG Resmi" - IDS_BMP_FILE "Bit EÅlem Resmi" + IDS_BMP_FILE "Bitmap Resmi" IDS_PNG_FILE "PNG Resmi" - // IDS_TIF_FILE "TIF Resmi" - // IDS_WMF_FILE "WMF Resmi" + IDS_TIF_FILE "TIF Resmi" + IDS_WMF_FILE "WMF Resmi" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/uk-UA.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/uk-UA.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -26,11 +26,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF Image" IDS_GIF_FILE "GIF Image" IDS_JPG_FILE "JPEG Image" IDS_BMP_FILE "Bitmap Image" IDS_PNG_FILE "PNG Image" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF Image" + IDS_WMF_FILE "WMF Image" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/zh-CN.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/zh-CN.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -20,11 +20,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF å¾å" IDS_GIF_FILE "GIF å¾å" IDS_JPG_FILE "JPEG å¾å" IDS_BMP_FILE "Bitmap å¾å" IDS_PNG_FILE "PNG å¾å" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF å¾å" + IDS_WMF_FILE "WMF å¾å" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/zh-TW.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/zh-TW.rc [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/lang/zh-TW.rc [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -20,11 +20,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" + IDS_EMF_FILE "EMF 影象" IDS_GIF_FILE "GIF 影象" IDS_JPG_FILE "JPEG 影象" IDS_BMP_FILE "Bitmap 影象" IDS_PNG_FILE "PNG 影象" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + IDS_TIF_FILE "TIF 影象" + IDS_WMF_FILE "WMF 影象" END Modified: branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/resource.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_0/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/resource.h [iso-8859-1] (original) +++ branches/ros-branch-0_4_0/reactos/dll/win32/shimgvw/resource.h [iso-8859-1] Thu Jan 7 19:52:38 2016 @@ -41,13 +41,13 @@ #define IDS_PREVIEW 550 /* Friendly File Type Names */ -// #define IDS_EMF_FILE 301 +#define IDS_EMF_FILE 301 #define IDS_GIF_FILE 302 #define IDS_JPG_FILE 303 #define IDS_BMP_FILE 304 #define IDS_PNG_FILE 305 -// #define IDS_TIF_FILE 306 -// #define IDS_WMF_FILE 307 +#define IDS_TIF_FILE 306 +#define IDS_WMF_FILE 307 /* Tooltips strings */ #define IDS_TOOLTIP_NEXT_PIC 400
8 years, 11 months
1
0
0
0
[pschweitzer] 70531: [FDC] Fix FdcPower() stub so that it doesn't leak IRP on shutdown Dedicated to Thomas. CORE-10117
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Thu Jan 7 19:23:55 2016 New Revision: 70531 URL:
http://svn.reactos.org/svn/reactos?rev=70531&view=rev
Log: [FDC] Fix FdcPower() stub so that it doesn't leak IRP on shutdown Dedicated to Thomas. CORE-10117 Modified: trunk/reactos/drivers/storage/fdc/fdc/fdc.c Modified: trunk/reactos/drivers/storage/fdc/fdc/fdc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/fdc/fdc/fd…
============================================================================== --- trunk/reactos/drivers/storage/fdc/fdc/fdc.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/fdc/fdc/fdc.c [iso-8859-1] Thu Jan 7 19:23:55 2016 @@ -143,8 +143,34 @@ FdcPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { + PIO_STACK_LOCATION IrpSp; + NTSTATUS Status = Irp->IoStatus.Status; + PFDO_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension; + DPRINT("FdcPower()\n"); - return STATUS_UNSUCCESSFUL; + + IrpSp = IoGetCurrentIrpStackLocation(Irp); + + if (DeviceExtension->Common.IsFDO) + { + PoStartNextPowerIrp(Irp); + IoSkipCurrentIrpStackLocation(Irp); + return PoCallDriver(DeviceExtension->LowerDevice, Irp); + } + else + { + switch (IrpSp->MinorFunction) + { + case IRP_MN_QUERY_POWER: + case IRP_MN_SET_POWER: + Status = STATUS_SUCCESS; + break; + } + PoStartNextPowerIrp(Irp); + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; + } }
8 years, 11 months
1
0
0
0
[hbelusca] 70530: [SMSS] - Reenable RTL_QUERY_REGISTRY_DELETE: the "PendingFileRenameOperations(2)" and "AllowProtectedRenames" registry values are deleted after being parsed: we don't retry at eve...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Jan 7 19:03:35 2016 New Revision: 70530 URL:
http://svn.reactos.org/svn/reactos?rev=70530&view=rev
Log: [SMSS] - Reenable RTL_QUERY_REGISTRY_DELETE: the "PendingFileRenameOperations(2)" and "AllowProtectedRenames" registry values are deleted after being parsed: we don't retry at every reboot to remove/rename files that were already deleted/renamed. - Remove superfluous parentheses. - Warn a FIXME if SFC-protected file renames are allowed and we are processing file renames (the "protected file renames" stuff is unimplemented atm.) Modified: trunk/reactos/base/system/smss/sminit.c Modified: trunk/reactos/base/system/smss/sminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/sminit.c?…
============================================================================== --- trunk/reactos/base/system/smss/sminit.c [iso-8859-1] (original) +++ trunk/reactos/base/system/smss/sminit.c [iso-8859-1] Thu Jan 7 19:03:35 2016 @@ -608,7 +608,7 @@ { SmpConfigureAllowProtectedRenames, - 0, //RTL_QUERY_REGISTRY_DELETE, + RTL_QUERY_REGISTRY_DELETE, L"AllowProtectedRenames", NULL, REG_DWORD, @@ -648,7 +648,7 @@ { SmpConfigureFileRenames, - 0, //RTL_QUERY_REGISTRY_DELETE, + RTL_QUERY_REGISTRY_DELETE, L"PendingFileRenameOperations", &SmpFileRenameList, REG_NONE, @@ -658,7 +658,7 @@ { SmpConfigureFileRenames, - 0, //RTL_QUERY_REGISTRY_DELETE, + RTL_QUERY_REGISTRY_DELETE, L"PendingFileRenameOperations2", &SmpFileRenameList, REG_NONE, @@ -1989,6 +1989,10 @@ Status = RtlAdjustPrivilege(SE_RESTORE_PRIVILEGE, TRUE, FALSE, &OldState); if (NT_SUCCESS(Status)) HavePrivilege = TRUE; + // FIXME: Handle SFC-protected file renames! + if (SmpAllowProtectedRenames) + DPRINT1("SMSS: FIXME: Handle SFC-protected file renames!\n"); + /* Process pending files to rename */ Head = &SmpFileRenameList; while (!IsListEmpty(Head)) @@ -2073,10 +2077,10 @@ InformationClass); /* Check if we seem to have failed because the file was readonly */ - if ((!NT_SUCCESS(Status) && + if (!NT_SUCCESS(Status) && (InformationClass == FileRenameInformation) && (Status == STATUS_OBJECT_NAME_COLLISION) && - (Buffer->ReplaceIfExists))) + Buffer->ReplaceIfExists) { /* Open the file for write attribute access this time... */ DPRINT1("\nSMSS: '%wZ' => '%wZ' failed - Status == %x, Possible readonly target\n",
8 years, 11 months
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
20
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Results per page:
10
25
50
100
200