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
December 2014
----- 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
17 participants
387 discussions
Start a n
N
ew thread
[hbelusca] 65653: [CONSRV]: Rename context members with a more explicit name (code "style" only).
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Dec 14 21:51:32 2014 New Revision: 65653 URL:
http://svn.reactos.org/svn/reactos?rev=65653&view=rev
Log: [CONSRV]: Rename context members with a more explicit name (code "style" only). Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/conoutput.c branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/conoutput.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/conoutput.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/conoutput.c [iso-8859-1] Sun Dec 14 21:51:32 2014 @@ -64,8 +64,6 @@ } else if (Buffer->Header.Type == SCREEN_BUFFER) { - // TODO: Free Buffer->Data - /* Free the palette handle */ if (Buffer->PaletteHandle != NULL) DeleteObject(Buffer->PaletteHandle); Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] Sun Dec 14 21:51:32 2014 @@ -138,9 +138,9 @@ CreateSysMenu(HWND hWnd); static DWORD NTAPI -GuiConsoleInputThread(PVOID Data) -{ - PHANDLE GraphicsStartupEvent = (PHANDLE)Data; +GuiConsoleInputThread(PVOID Param) +{ + PHANDLE GraphicsStartupEvent = (PHANDLE)Param; LONG WindowCount = 0; MSG msg; @@ -348,12 +348,12 @@ PGUI_CONSOLE_DATA GuiData; GUI_CONSOLE_INFO TermInfo; - if (This == NULL || Console == NULL || This->OldData == NULL) + if (This == NULL || Console == NULL || This->Context2 == NULL) return STATUS_INVALID_PARAMETER; ASSERT(This->Console == Console); - GuiInitInfo = This->OldData; + GuiInitInfo = This->Context2; if (GuiInitInfo->ConsoleInfo == NULL || GuiInitInfo->ConsoleStartInfo == NULL) return STATUS_INVALID_PARAMETER; @@ -368,7 +368,7 @@ DPRINT1("CONSRV: Failed to create GUI_CONSOLE_DATA\n"); return STATUS_UNSUCCESSFUL; } - ///// /* HACK */ Console->FrontEndIFace.Data = (PVOID)GuiData; /* HACK */ + ///// /* HACK */ Console->FrontEndIFace.Context = (PVOID)GuiData; /* HACK */ GuiData->Console = Console; GuiData->ActiveBuffer = Console->ActiveBuffer; GuiData->hWindow = NULL; @@ -472,9 +472,9 @@ // TODO: Retrieve the selection mode via the registry. /* Finally, finish to initialize the frontend structure */ - This->Data = GuiData; - if (This->OldData) ConsoleFreeHeap(This->OldData); - This->OldData = NULL; + This->Context = GuiData; + if (This->Context2) ConsoleFreeHeap(This->Context2); + This->Context2 = NULL; /* * We need to wait until the GUI has been fully initialized @@ -512,7 +512,7 @@ static VOID NTAPI GuiDeinitFrontEnd(IN OUT PFRONTEND This) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; DPRINT("Send PM_DESTROY_CONSOLE message and wait on hGuiTermEvent...\n"); PostThreadMessageW(dwInputThreadId, PM_DESTROY_CONSOLE, 0, (LPARAM)GuiData); @@ -534,7 +534,7 @@ DestroyIcon(GuiData->hIconSm); } - This->Data = NULL; + This->Context = NULL; DeleteCriticalSection(&GuiData->Lock); ConsoleFreeHeap(GuiData); @@ -545,7 +545,7 @@ GuiDrawRegion(IN OUT PFRONTEND This, SMALL_RECT* Region) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; /* Do nothing if the window is hidden */ if (!GuiData->IsWindowVisible) return; @@ -562,7 +562,7 @@ PWCHAR Buffer, UINT Length) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; PCONSOLE_SCREEN_BUFFER Buff; SHORT CursorEndX, CursorEndY; RECT ScrollRect; @@ -619,7 +619,7 @@ /* static */ VOID NTAPI GuiRingBell(IN OUT PFRONTEND This) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; /* Emit an error beep sound */ SendNotifyMessage(GuiData->hWindow, PM_CONSOLE_BEEP, 0, 0); @@ -629,7 +629,7 @@ GuiSetCursorInfo(IN OUT PFRONTEND This, PCONSOLE_SCREEN_BUFFER Buff) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; /* Do nothing if the window is hidden */ if (!GuiData->IsWindowVisible) return TRUE; @@ -648,7 +648,7 @@ SHORT OldCursorX, SHORT OldCursorY) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; /* Do nothing if the window is hidden */ if (!GuiData->IsWindowVisible) return TRUE; @@ -667,7 +667,7 @@ static VOID NTAPI GuiResizeTerminal(IN OUT PFRONTEND This) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; /* Resize the window to the user's values */ PostMessageW(GuiData->hWindow, PM_RESIZE_TERMINAL, 0, 0); @@ -676,7 +676,7 @@ static VOID NTAPI GuiSetActiveScreenBuffer(IN OUT PFRONTEND This) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; PCONSOLE_SCREEN_BUFFER ActiveBuffer; HPALETTE hPalette; @@ -720,7 +720,7 @@ GuiReleaseScreenBuffer(IN OUT PFRONTEND This, IN PCONSOLE_SCREEN_BUFFER ScreenBuffer) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; /* * If we were notified to release a screen buffer that is not actually @@ -767,7 +767,7 @@ static VOID NTAPI GuiRefreshInternalInfo(IN OUT PFRONTEND This) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; /* Update the console leader information held by the window */ SetConWndConsoleLeaderCID(GuiData); @@ -789,7 +789,7 @@ static VOID NTAPI GuiChangeTitle(IN OUT PFRONTEND This) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; // PostMessageW(GuiData->hWindow, PM_CONSOLE_SET_TITLE, 0, 0); SetWindowText(GuiData->hWindow, GuiData->Console->Title.Buffer); } @@ -798,7 +798,7 @@ GuiChangeIcon(IN OUT PFRONTEND This, HICON IconHandle) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; HICON hIcon, hIconSm; if (IconHandle == NULL) @@ -842,7 +842,7 @@ static HWND NTAPI GuiGetConsoleWindowHandle(IN OUT PFRONTEND This) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; return GuiData->hWindow; } @@ -850,7 +850,7 @@ GuiGetLargestConsoleWindowSize(IN OUT PFRONTEND This, PCOORD pSize) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; PCONSOLE_SCREEN_BUFFER ActiveBuffer; RECT WorkArea; LONG width, height; @@ -893,7 +893,7 @@ GuiGetSelectionInfo(IN OUT PFRONTEND This, PCONSOLE_SELECTION_INFO pSelectionInfo) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; if (pSelectionInfo == NULL) return FALSE; @@ -909,7 +909,7 @@ HPALETTE PaletteHandle, UINT PaletteUsage) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; HPALETTE OldPalette; // if (GetType(GuiData->ActiveBuffer) != GRAPHICS_BUFFER) return FALSE; @@ -934,7 +934,7 @@ static ULONG NTAPI GuiGetDisplayMode(IN OUT PFRONTEND This) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; ULONG DisplayMode = 0; if (GuiData->GuiInfo.FullScreen) @@ -949,7 +949,7 @@ GuiSetDisplayMode(IN OUT PFRONTEND This, ULONG NewMode) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; BOOL FullScreen; if (NewMode & ~(CONSOLE_FULLSCREEN_MODE | CONSOLE_WINDOWED_MODE)) @@ -972,7 +972,7 @@ GuiShowMouseCursor(IN OUT PFRONTEND This, BOOL Show) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; if (GuiData->IsWindowVisible) { @@ -991,7 +991,7 @@ GuiSetMouseCursor(IN OUT PFRONTEND This, HCURSOR CursorHandle) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; /* Do nothing if the window is hidden */ if (!GuiData->IsWindowVisible) return TRUE; @@ -1013,7 +1013,7 @@ UINT CmdIdLow, UINT CmdIdHigh) { - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; GuiData->CmdIdLow = CmdIdLow ; GuiData->CmdIdHigh = CmdIdHigh; @@ -1031,7 +1031,7 @@ * for more information. */ - PGUI_CONSOLE_DATA GuiData = This->Data; + PGUI_CONSOLE_DATA GuiData = This->Context; HMENU hSysMenu = GetSystemMenu(GuiData->hWindow, FALSE); if (hSysMenu == NULL) return FALSE; @@ -1100,9 +1100,9 @@ GuiInitInfo->IsWindowVisible = ConsoleInitInfo->IsWindowVisible; /* Finally, initialize the frontend structure */ - FrontEnd->Vtbl = &GuiVtbl; - FrontEnd->Data = NULL; - FrontEnd->OldData = GuiInitInfo; + FrontEnd->Vtbl = &GuiVtbl; + FrontEnd->Context = NULL; + FrontEnd->Context2 = GuiInitInfo; return STATUS_SUCCESS; } @@ -1112,8 +1112,8 @@ { if (FrontEnd == NULL) return STATUS_INVALID_PARAMETER; - if (FrontEnd->Data) GuiDeinitFrontEnd(FrontEnd); - if (FrontEnd->OldData) ConsoleFreeHeap(FrontEnd->OldData); + if (FrontEnd->Context ) GuiDeinitFrontEnd(FrontEnd); + if (FrontEnd->Context2) ConsoleFreeHeap(FrontEnd->Context2); return STATUS_SUCCESS; } Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c [iso-8859-1] Sun Dec 14 21:51:32 2014 @@ -230,7 +230,7 @@ /* Initialize the ConSrv terminal */ Terminal->Vtbl = &ConSrvTermVtbl; // Terminal->Console will be initialized by ConDrvRegisterTerminal - Terminal->Data = FrontEnd; /* We store the frontend pointer in the terminal private data */ + Terminal->Context = FrontEnd; /* We store the frontend pointer in the terminal private context */ return STATUS_SUCCESS; } @@ -239,10 +239,10 @@ ConSrvDeinitTerminal(IN OUT PTERMINAL Terminal) { NTSTATUS Status = STATUS_SUCCESS; - PFRONTEND FrontEnd = Terminal->Data; + PFRONTEND FrontEnd = Terminal->Context; /* Reset the ConSrv terminal */ - Terminal->Data = NULL; + Terminal->Context = NULL; Terminal->Vtbl = NULL; /* Unload the frontend */ @@ -263,7 +263,7 @@ IN PCONSOLE Console) { NTSTATUS Status; - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; /* Initialize the console pointer for our frontend */ FrontEnd->Console = Console; @@ -286,7 +286,7 @@ static VOID NTAPI ConSrvTermDeinitTerminal(IN OUT PTERMINAL This) { - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; FrontEnd->Vtbl->DeinitFrontEnd(FrontEnd); } @@ -304,7 +304,7 @@ IN ULONG NumCharsToRead, OUT PULONG NumCharsRead OPTIONAL) { - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; PCONSRV_CONSOLE Console = FrontEnd->Console; PCONSOLE_INPUT_BUFFER InputBuffer = &Console->InputBuffer; PUNICODE_STRING ExeName = Parameter; @@ -637,7 +637,7 @@ DWORD Length, BOOL Attrib) { - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; return ConioWriteConsole(FrontEnd, Buff, Buffer, @@ -668,7 +668,7 @@ ConSrvTermDrawRegion(IN OUT PTERMINAL This, SMALL_RECT* Region) { - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; FrontEnd->Vtbl->DrawRegion(FrontEnd, Region); } @@ -676,7 +676,7 @@ ConSrvTermSetCursorInfo(IN OUT PTERMINAL This, PCONSOLE_SCREEN_BUFFER ScreenBuffer) { - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; return FrontEnd->Vtbl->SetCursorInfo(FrontEnd, ScreenBuffer); } @@ -686,7 +686,7 @@ SHORT OldCursorX, SHORT OldCursorY) { - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; return FrontEnd->Vtbl->SetScreenInfo(FrontEnd, ScreenBuffer, OldCursorX, @@ -696,14 +696,14 @@ static VOID NTAPI ConSrvTermResizeTerminal(IN OUT PTERMINAL This) { - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; FrontEnd->Vtbl->ResizeTerminal(FrontEnd); } static VOID NTAPI ConSrvTermSetActiveScreenBuffer(IN OUT PTERMINAL This) { - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; FrontEnd->Vtbl->SetActiveScreenBuffer(FrontEnd); } @@ -711,7 +711,7 @@ ConSrvTermReleaseScreenBuffer(IN OUT PTERMINAL This, IN PCONSOLE_SCREEN_BUFFER ScreenBuffer) { - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; FrontEnd->Vtbl->ReleaseScreenBuffer(FrontEnd, ScreenBuffer); } @@ -719,7 +719,7 @@ ConSrvTermGetLargestConsoleWindowSize(IN OUT PTERMINAL This, PCOORD pSize) { - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; FrontEnd->Vtbl->GetLargestConsoleWindowSize(FrontEnd, pSize); } @@ -728,7 +728,7 @@ HPALETTE PaletteHandle, UINT PaletteUsage) { - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; return FrontEnd->Vtbl->SetPalette(FrontEnd, PaletteHandle, PaletteUsage); } @@ -736,7 +736,7 @@ ConSrvTermShowMouseCursor(IN OUT PTERMINAL This, BOOL Show) { - PFRONTEND FrontEnd = This->Data; + PFRONTEND FrontEnd = This->Context; return FrontEnd->Vtbl->ShowMouseCursor(FrontEnd, Show); } Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c [iso-8859-1] Sun Dec 14 21:51:32 2014 @@ -327,9 +327,9 @@ } static DWORD NTAPI -TuiConsoleThread(PVOID Data) -{ - PTUI_CONSOLE_DATA TuiData = (PTUI_CONSOLE_DATA)Data; +TuiConsoleThread(PVOID Param) +{ + PTUI_CONSOLE_DATA TuiData = (PTUI_CONSOLE_DATA)Param; PCONSRV_CONSOLE Console = TuiData->Console; HWND NewWindow; MSG msg; @@ -482,7 +482,7 @@ DPRINT1("CONSRV: Failed to create TUI_CONSOLE_DATA\n"); return STATUS_UNSUCCESSFUL; } - // Console->FrontEndIFace.Data = (PVOID)TuiData; + // Console->FrontEndIFace.Context = (PVOID)TuiData; TuiData->Console = Console; TuiData->hWindow = NULL; @@ -530,8 +530,8 @@ LeaveCriticalSection(&ActiveVirtConsLock); /* Finally, initialize the frontend structure */ - This->Data = TuiData; - This->OldData = NULL; + This->Context = TuiData; + This->Context2 = NULL; return STATUS_SUCCESS; } @@ -540,7 +540,7 @@ TuiDeinitFrontEnd(IN OUT PFRONTEND This) { // PCONSRV_CONSOLE Console = This->Console; - PTUI_CONSOLE_DATA TuiData = This->Data; // Console->FrontEndIFace.Data; + PTUI_CONSOLE_DATA TuiData = This->Context; // Console->FrontEndIFace.Context; /* Close the notification window */ DestroyWindow(TuiData->hWindow); @@ -571,8 +571,8 @@ /* Switch to the next console */ if (NULL != ActiveConsole) ConioDrawConsole(ActiveConsole->Console); - // Console->FrontEndIFace.Data = NULL; - This->Data = NULL; + // Console->FrontEndIFace.Context = NULL; + This->Context = NULL; DeleteCriticalSection(&TuiData->Lock); ConsoleFreeHeap(TuiData); } @@ -723,7 +723,7 @@ static HWND NTAPI TuiGetConsoleWindowHandle(IN OUT PFRONTEND This) { - PTUI_CONSOLE_DATA TuiData = This->Data; + PTUI_CONSOLE_DATA TuiData = This->Context; return TuiData->hWindow; } @@ -845,9 +845,9 @@ if (!TuiInit(ConsoleInfo->CodePage)) return STATUS_UNSUCCESSFUL; /* Finally, initialize the frontend structure */ - FrontEnd->Vtbl = &TuiVtbl; - FrontEnd->Data = NULL; - FrontEnd->OldData = NULL; + FrontEnd->Vtbl = &TuiVtbl; + FrontEnd->Context = NULL; + FrontEnd->Context2 = NULL; return STATUS_SUCCESS; } @@ -856,7 +856,7 @@ TuiUnloadFrontEnd(IN OUT PFRONTEND FrontEnd) { if (FrontEnd == NULL) return STATUS_INVALID_PARAMETER; - if (FrontEnd->Data) TuiDeinitFrontEnd(FrontEnd); + if (FrontEnd->Context) TuiDeinitFrontEnd(FrontEnd); return STATUS_SUCCESS; } Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1] Sun Dec 14 21:51:32 2014 @@ -273,7 +273,7 @@ { PTERMINAL_VTBL Vtbl; /* Virtual table */ struct _CONSOLE* Console; /* Console to which the terminal is attached to */ - PVOID Data; /* Private data */ + PVOID Context; /* Private context */ }; /* Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h [iso-8859-1] Sun Dec 14 21:51:32 2014 @@ -117,8 +117,8 @@ NTSTATUS (NTAPI *UnloadFrontEnd)(IN OUT PFRONTEND This); struct _CONSRV_CONSOLE* Console; /* Console to which the frontend is attached to */ - PVOID Data; /* Private data */ - PVOID OldData; /* Reserved */ + PVOID Context; /* Private context */ + PVOID Context2; /* Private context */ }; /* PauseFlags values (internal only) */
10 years
1
0
0
0
[pschweitzer] 65652: [NTFS] - Implement NtfsGrabFCBFromTableById() and NtfsGetFCBForFileById(). These two are responsible for opening and retrieving a file open by ID. - Modified NtfsMakeFCBFromDir...
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Dec 14 21:18:47 2014 New Revision: 65652 URL:
http://svn.reactos.org/svn/reactos?rev=65652&view=rev
Log: [NTFS] - Implement NtfsGrabFCBFromTableById() and NtfsGetFCBForFileById(). These two are responsible for opening and retrieving a file open by ID. - Modified NtfsMakeFCBFromDirEntry() so that it supports openings by ID which come with less information than normal openings. - Modified NtfsGrabFCBFromTable() so that it doesn't return a FCB which would have been opened by ID. - Modified NtfsOpenFile() so that it allows opening a file by ID using the two FCB helpers functions defined upper. - Modified NtfsCreateFile() so that it can validate input in case of opening by ID. To make it short, all this implements file opening by ID in NTFS driver. I made the choice to separate FCB which are coming from "normal" opening and these from ID opening. The reason is that a file opening with ID has less information than a normal opening, and may fail on these information retreival. This is due to the fact that if opening by ID can virtual open all the files, because it ignores authorizations, traverses checks, in the end for retrieving the information, such checks can be done and fail. I also left all this disabled so far, because it appears to regress NFI. I will investigate this. CORE-8725 Modified: trunk/reactos/drivers/filesystems/ntfs/create.c trunk/reactos/drivers/filesystems/ntfs/fcb.c trunk/reactos/drivers/filesystems/ntfs/ntfs.h Modified: trunk/reactos/drivers/filesystems/ntfs/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/c…
============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/create.c [iso-8859-1] Sun Dec 14 21:18:47 2014 @@ -80,6 +80,7 @@ NtfsOpenFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject, PWSTR FileName, + BOOLEAN OpenById, PNTFS_FCB * FoundFCB) { PNTFS_FCB ParentFcb; @@ -87,55 +88,81 @@ NTSTATUS Status; PWSTR AbsFileName = NULL; - DPRINT1("NtfsOpenFile(%p, %p, %S, %p)\n", DeviceExt, FileObject, FileName, FoundFCB); + DPRINT1("NtfsOpenFile(%p, %p, %S, %u, %p)\n", DeviceExt, FileObject, (!OpenById ? FileName : NULL), OpenById, FoundFCB); *FoundFCB = NULL; - if (FileObject->RelatedFileObject) - { - DPRINT("Converting relative filename to absolute filename\n"); - - Status = NtfsMakeAbsoluteFilename(FileObject->RelatedFileObject, - FileName, - &AbsFileName); - FileName = AbsFileName; - if (!NT_SUCCESS(Status)) - { - return Status; - } - - return STATUS_UNSUCCESSFUL; - } - - //FIXME: Get cannonical path name (remove .'s, ..'s and extra separators) - - DPRINT("PathName to open: %S\n", FileName); - - /* try first to find an existing FCB in memory */ - DPRINT("Checking for existing FCB in memory\n"); - Fcb = NtfsGrabFCBFromTable(DeviceExt, - FileName); - if (Fcb == NULL) - { - DPRINT("No existing FCB found, making a new one if file exists.\n"); - Status = NtfsGetFCBForFile(DeviceExt, - &ParentFcb, - &Fcb, + if (OpenById) + { + ULONGLONG Id = (*(PULONGLONG)FileName) & NTFS_MFT_MASK; + + DPRINT1("Will attempt to open by id: %I64x\n", Id); + + Fcb = NtfsGrabFCBFromTableById(DeviceExt, + Id); + if (Fcb == NULL) + { + Status = NtfsGetFCBForFileById(DeviceExt, + &Fcb, + Id); + if (!NT_SUCCESS (Status)) + { + DPRINT("Could not make a new FCB, status: %x\n", Status); + + return Status; + } + + Fcb->Flags |= FCB_IS_OPEN_BY_ID; + } + } + else + { + if (FileObject->RelatedFileObject) + { + DPRINT("Converting relative filename to absolute filename\n"); + + Status = NtfsMakeAbsoluteFilename(FileObject->RelatedFileObject, + FileName, + &AbsFileName); + FileName = AbsFileName; + if (!NT_SUCCESS(Status)) + { + return Status; + } + + return STATUS_UNSUCCESSFUL; + } + + //FIXME: Get cannonical path name (remove .'s, ..'s and extra separators) + + DPRINT("PathName to open: %S\n", FileName); + + /* try first to find an existing FCB in memory */ + DPRINT("Checking for existing FCB in memory\n"); + Fcb = NtfsGrabFCBFromTable(DeviceExt, FileName); - if (ParentFcb != NULL) - { - NtfsReleaseFCB(DeviceExt, - ParentFcb); - } - - if (!NT_SUCCESS (Status)) - { - DPRINT("Could not make a new FCB, status: %x\n", Status); - - if (AbsFileName) - ExFreePool(AbsFileName); - - return Status; + if (Fcb == NULL) + { + DPRINT("No existing FCB found, making a new one if file exists.\n"); + Status = NtfsGetFCBForFile(DeviceExt, + &ParentFcb, + &Fcb, + FileName); + if (ParentFcb != NULL) + { + NtfsReleaseFCB(DeviceExt, + ParentFcb); + } + + if (!NT_SUCCESS (Status)) + { + DPRINT("Could not make a new FCB, status: %x\n", Status); + + if (AbsFileName) + ExFreePool(AbsFileName); + + return Status; + } } } @@ -201,6 +228,12 @@ return STATUS_ACCESS_DENIED; } + if ((RequestedOptions & FILE_OPEN_BY_FILE_ID) == FILE_OPEN_BY_FILE_ID && + FileObject->FileName.Length != sizeof(ULONGLONG)) + { + return STATUS_INVALID_PARAMETER; + } + /* This a open operation for the volume itself */ if (FileObject->FileName.Length == 0 && (FileObject->RelatedFileObject == NULL || FileObject->RelatedFileObject->FsContext2 != NULL)) @@ -226,6 +259,7 @@ Status = NtfsOpenFile(DeviceExt, FileObject, FileObject->FileName.Buffer, + ((RequestedOptions & FILE_OPEN_BY_FILE_ID) == FILE_OPEN_BY_FILE_ID), &Fcb); if (NT_SUCCESS(Status)) Modified: trunk/reactos/drivers/filesystems/ntfs/fcb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/fcb.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/fcb.c [iso-8859-1] Sun Dec 14 21:18:47 2014 @@ -220,7 +220,8 @@ Fcb = CONTAINING_RECORD(current_entry, NTFS_FCB, FcbListEntry); DPRINT("Comparing '%S' and '%S'\n", FileName, Fcb->PathName); - if (_wcsicmp(FileName, Fcb->PathName) == 0) + if ((Fcb->Flags & FCB_IS_OPEN_BY_ID) != FCB_IS_OPEN_BY_ID && + _wcsicmp(FileName, Fcb->PathName) == 0) { Fcb->RefCount++; KeReleaseSpinLock(&Vcb->FcbListLock, oldIrql); @@ -228,6 +229,38 @@ } //FIXME: need to compare against short name in FCB here + + current_entry = current_entry->Flink; + } + + KeReleaseSpinLock(&Vcb->FcbListLock, oldIrql); + + return NULL; +} + + +PNTFS_FCB +NtfsGrabFCBFromTableById(PNTFS_VCB Vcb, + ULONGLONG Id) +{ + KIRQL oldIrql; + PNTFS_FCB Fcb; + PLIST_ENTRY current_entry; + + KeAcquireSpinLock(&Vcb->FcbListLock, &oldIrql); + + current_entry = Vcb->FcbListHead.Flink; + while (current_entry != &Vcb->FcbListHead) + { + Fcb = CONTAINING_RECORD(current_entry, NTFS_FCB, FcbListEntry); + + if ((Fcb->Flags & FCB_IS_OPEN_BY_ID) == FCB_IS_OPEN_BY_ID && + Fcb->MFTIndex == Id) + { + Fcb->RefCount++; + KeReleaseSpinLock(&Vcb->FcbListLock, oldIrql); + return Fcb; + } current_entry = current_entry->Flink; } @@ -410,18 +443,26 @@ return STATUS_OBJECT_NAME_NOT_FOUND; // Not sure that's the best here } - if (Name->Buffer[0] != 0 && wcslen(DirectoryFCB->PathName) + - sizeof(WCHAR) + Name->Length / sizeof(WCHAR) > MAX_PATH) - { - return STATUS_OBJECT_NAME_INVALID; - } - - wcscpy(pathName, DirectoryFCB->PathName); - if (!NtfsFCBIsRoot(DirectoryFCB)) - { - wcscat(pathName, L"\\"); - } - wcscat(pathName, Name->Buffer); + if (DirectoryFCB && Name) + { + if (Name->Buffer[0] != 0 && wcslen(DirectoryFCB->PathName) + + sizeof(WCHAR) + Name->Length / sizeof(WCHAR) > MAX_PATH) + { + return STATUS_OBJECT_NAME_INVALID; + } + + wcscpy(pathName, DirectoryFCB->PathName); + if (!NtfsFCBIsRoot(DirectoryFCB)) + { + wcscat(pathName, L"\\"); + } + wcscat(pathName, Name->Buffer); + } + else + { + RtlCopyMemory(pathName, FileName->Name, FileName->NameLength * sizeof (WCHAR)); + pathName[FileName->NameLength] = UNICODE_NULL; + } rcFCB = NtfsCreateFCB(pathName, Vcb); if (!rcFCB) @@ -655,6 +696,42 @@ NTSTATUS +NtfsGetFCBForFileById(PNTFS_VCB Vcb, + PNTFS_FCB *pFCB, + ULONGLONG Id) +{ + NTSTATUS Status; + PFILE_RECORD_HEADER FileRecord; + + FileRecord = ExAllocatePoolWithTag(NonPagedPool, + Vcb->NtfsInfo.BytesPerFileRecord, + TAG_NTFS); + if (FileRecord == NULL) + { + return STATUS_INSUFFICIENT_RESOURCES; + } + + Status = ReadFileRecord(Vcb, Id, FileRecord); + if (!NT_SUCCESS(Status)) + { + ExFreePoolWithTag(FileRecord, TAG_NTFS); + return Status; + } + + if ((FileRecord->Flags & FRH_IN_USE) != FRH_IN_USE) + { + ExFreePoolWithTag(FileRecord, TAG_NTFS); + return STATUS_INVALID_PARAMETER; + } + + Status = NtfsMakeFCBFromDirEntry(Vcb, NULL, NULL, FileRecord, Id, pFCB); + + ExFreePoolWithTag(FileRecord, TAG_NTFS); + + return Status; +} + +NTSTATUS NtfsReadFCBAttribute(PNTFS_VCB Vcb, PNTFS_FCB pFCB, ULONG Type, Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Sun Dec 14 21:18:47 2014 @@ -416,6 +416,7 @@ #define FCB_CACHE_INITIALIZED 0x0001 #define FCB_IS_VOLUME_STREAM 0x0002 #define FCB_IS_VOLUME 0x0004 +#define FCB_IS_OPEN_BY_ID 0x0008 #define MAX_PATH 260 typedef struct _FCB @@ -599,6 +600,10 @@ NtfsGrabFCBFromTable(PNTFS_VCB Vcb, PCWSTR FileName); +PNTFS_FCB +NtfsGrabFCBFromTableById(PNTFS_VCB Vcb, + ULONGLONG Id); + NTSTATUS NtfsFCBInitializeCache(PNTFS_VCB Vcb, PNTFS_FCB Fcb); @@ -619,6 +624,11 @@ PNTFS_FCB *pParentFCB, PNTFS_FCB *pFCB, const PWSTR pFileName); + +NTSTATUS +NtfsGetFCBForFileById(PNTFS_VCB Vcb, + PNTFS_FCB *pFCB, + ULONGLONG Id); NTSTATUS NtfsReadFCBAttribute(PNTFS_VCB Vcb,
10 years
1
0
0
0
[hbelusca] 65651: [CONSRV]: More code cleaning.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Dec 14 21:18:40 2014 New Revision: 65651 URL:
http://svn.reactos.org/svn/reactos?rev=65651&view=rev
Log: [CONSRV]: More code cleaning. Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c [iso-8859-1] Sun Dec 14 21:18:40 2014 @@ -738,7 +738,7 @@ /* Deinit the ConSrv terminal */ // FIXME!! - // ConSrvDeinitTerminal(&Terminal); // &ConSrvConsole->Console->TermIFace + // ConSrvDeinitTerminal(&Terminal); } Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1] Sun Dec 14 21:18:40 2014 @@ -108,8 +108,6 @@ // WORD ScreenDefaultAttrib; /* Default screen char attribute */ // WORD PopupDefaultAttrib; /* Default popup char attribute */ USHORT Mode; /* Output buffer modes */ - - // PVOID Data; /* Private data for the frontend to use */ }; @@ -259,7 +257,7 @@ INT (NTAPI *ShowMouseCursor)(IN OUT PTERMINAL This, BOOL Show); -#if 0 // Possible future front-end interface +#if 0 // Possible future terminal interface BOOL (NTAPI *GetTerminalProperty)(IN OUT PTERMINAL This, ULONG Flag, PVOID Info, @@ -274,7 +272,7 @@ struct _TERMINAL { PTERMINAL_VTBL Vtbl; /* Virtual table */ - struct _CONSOLE* Console; /* Console to which the frontend is attached to */ + struct _CONSOLE* Console; /* Console to which the terminal is attached to */ PVOID Data; /* Private data */ };
10 years
1
0
0
0
[pschweitzer] 65650: [NTFS] Make the NTFS driver more verbose in file information requests
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Dec 14 21:09:29 2014 New Revision: 65650 URL:
http://svn.reactos.org/svn/reactos?rev=65650&view=rev
Log: [NTFS] Make the NTFS driver more verbose in file information requests Modified: trunk/reactos/drivers/filesystems/ntfs/finfo.c Modified: trunk/reactos/drivers/filesystems/ntfs/finfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] Sun Dec 14 21:09:29 2014 @@ -45,7 +45,7 @@ { UNREFERENCED_PARAMETER(DeviceObject); - DPRINT("NtfsGetStandardInformation() called\n"); + DPRINT1("NtfsGetStandardInformation(%p, %p, %p, %p)\n", Fcb, DeviceObject, StandardInfo, BufferLength); if (*BufferLength < sizeof(FILE_STANDARD_INFORMATION)) return STATUS_BUFFER_OVERFLOW; @@ -75,7 +75,7 @@ PFILE_POSITION_INFORMATION PositionInfo, PULONG BufferLength) { - DPRINT("NtfsGetPositionInformation() called\n"); + DPRINT1("NtfsGetPositionInformation(%p, %p, %p)\n", FileObject, PositionInfo, BufferLength); if (*BufferLength < sizeof(FILE_POSITION_INFORMATION)) return STATUS_BUFFER_OVERFLOW; @@ -101,7 +101,7 @@ { PFILENAME_ATTRIBUTE FileName = &Fcb->Entry; - DPRINT("NtfsGetBasicInformation() called\n"); + DPRINT1("NtfsGetBasicInformation(%p, %p, %p, %p, %p)\n", FileObject, Fcb, DeviceObject, BasicInfo, BufferLength); if (*BufferLength < sizeof(FILE_BASIC_INFORMATION)) return STATUS_BUFFER_OVERFLOW; @@ -135,7 +135,7 @@ UNREFERENCED_PARAMETER(FileObject); UNREFERENCED_PARAMETER(DeviceObject); - DPRINT("NtfsGetNameInformation() called\n"); + DPRINT1("NtfsGetNameInformation(%p, %p, %p, %p, %p)\n", FileObject, Fcb, DeviceObject, NameInfo, BufferLength); ASSERT(NameInfo != NULL); ASSERT(Fcb != NULL); @@ -175,7 +175,7 @@ PFILE_INTERNAL_INFORMATION InternalInfo, PULONG BufferLength) { - DPRINT("NtfsGetInternalInformation() called\n"); + DPRINT1("NtfsGetInternalInformation(%p, %p, %p)\n", Fcb, InternalInfo, BufferLength); ASSERT(InternalInfo); ASSERT(Fcb); @@ -199,6 +199,8 @@ PULONG BufferLength) { PFILENAME_ATTRIBUTE FileName = &Fcb->Entry; + + DPRINT1("NtfsGetNetworkOpenInformation(%p, %p, %p, %p)\n", Fcb, DeviceExt, NetworkInfo, BufferLength); if (*BufferLength < sizeof(FILE_NETWORK_OPEN_INFORMATION)) return(STATUS_BUFFER_OVERFLOW); @@ -233,7 +235,7 @@ ULONG BufferLength; NTSTATUS Status = STATUS_SUCCESS; - DPRINT("NtfsQueryInformation() called\n"); + DPRINT1("NtfsQueryInformation(%p, %p)\n", DeviceObject, Irp); Stack = IoGetCurrentIrpStackLocation(Irp); FileInformationClass = Stack->Parameters.QueryFile.FileInformationClass; @@ -289,11 +291,12 @@ case FileAlternateNameInformation: case FileAllInformation: + DPRINT1("Unimplemented information class %u\n", FileInformationClass); Status = STATUS_NOT_IMPLEMENTED; break; default: - DPRINT("Unimplemented information class %u\n", FileInformationClass); + DPRINT1("Unimplemented information class %u\n", FileInformationClass); Status = STATUS_INVALID_PARAMETER; }
10 years
1
0
0
0
[hbelusca] 65649: [CONSRV]: Move ConioDrawConsole to where it should belong.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Dec 14 19:01:52 2014 New Revision: 65649 URL:
http://svn.reactos.org/svn/reactos?rev=65649&view=rev
Log: [CONSRV]: Move ConioDrawConsole to where it should belong. Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/conoutput.c branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/console.c branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/input.c branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/conoutput.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/conoutput.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/conoutput.c [iso-8859-1] Sun Dec 14 19:01:52 2014 @@ -159,20 +159,6 @@ CONSOLE_SCREEN_BUFFER_Destroy(Buffer); } -VOID -ConioDrawConsole(PCONSOLE Console) -{ - SMALL_RECT Region; - PCONSOLE_SCREEN_BUFFER ActiveBuffer = Console->ActiveBuffer; - - if (ActiveBuffer) - { - ConioInitRect(&Region, 0, 0, - ActiveBuffer->ViewSize.Y - 1, ActiveBuffer->ViewSize.X - 1); - TermDrawRegion(Console, &Region); - } -} - static VOID ConioSetActiveScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer) { Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/console.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/console.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/console.c [iso-8859-1] Sun Dec 14 19:01:52 2014 @@ -297,7 +297,6 @@ /* Copy buffer contents to screen */ // Terminal.Draw(); - // ConioDrawConsole(Console); DPRINT("Terminal initialization done\n"); return STATUS_SUCCESS; Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1] Sun Dec 14 19:01:52 2014 @@ -494,7 +494,8 @@ /* Make sure ReadRegion is inside the screen buffer */ ConioInitRect(&ScreenBuffer, 0, 0, - Buffer->ScreenBufferSize.Y - 1, Buffer->ScreenBufferSize.X - 1); + Buffer->ScreenBufferSize.Y - 1, + Buffer->ScreenBufferSize.X - 1); if (!ConioGetIntersection(&CapturedReadRegion, &ScreenBuffer, &CapturedReadRegion)) { /* @@ -557,7 +558,8 @@ /* Make sure WriteRegion is inside the screen buffer */ ConioInitRect(&ScreenBuffer, 0, 0, - Buffer->ScreenBufferSize.Y - 1, Buffer->ScreenBufferSize.X - 1); + Buffer->ScreenBufferSize.Y - 1, + Buffer->ScreenBufferSize.X - 1); if (!ConioGetIntersection(&CapturedWriteRegion, &ScreenBuffer, &CapturedWriteRegion)) { /* @@ -625,7 +627,8 @@ /* Make sure WriteRegion is inside the screen buffer */ ConioInitRect(&ScreenBuffer, 0, 0, - Buffer->ScreenBufferSize.Y - 1, Buffer->ScreenBufferSize.X - 1); + Buffer->ScreenBufferSize.Y - 1, + Buffer->ScreenBufferSize.X - 1); if (!ConioGetIntersection(&CapturedWriteRegion, &ScreenBuffer, &CapturedWriteRegion)) { /* @@ -1154,7 +1157,8 @@ /* Make sure the source rectangle is inside the screen buffer */ ConioInitRect(&ScreenBuffer, 0, 0, - Buffer->ScreenBufferSize.Y - 1, Buffer->ScreenBufferSize.X - 1); + Buffer->ScreenBufferSize.Y - 1, + Buffer->ScreenBufferSize.X - 1); if (!ConioGetIntersection(&SrcRegion, &ScreenBuffer, ScrollRectangle)) { return STATUS_SUCCESS; Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/input.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/input.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/input.c [iso-8859-1] Sun Dec 14 19:01:52 2014 @@ -71,7 +71,7 @@ INPUT_RECORD er; - if (NULL == Console) + if (Console == NULL) { DPRINT1("No Active Console!\n"); return; @@ -169,7 +169,7 @@ } } - ConioDrawConsole((PCONSOLE)Console); + ConioDrawConsole(Console); return; } Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/terminal.c [iso-8859-1] Sun Dec 14 19:01:52 2014 @@ -649,6 +649,21 @@ +VOID +ConioDrawConsole(PCONSRV_CONSOLE Console) +{ + SMALL_RECT Region; + PCONSOLE_SCREEN_BUFFER ActiveBuffer = Console->ActiveBuffer; + + if (!ActiveBuffer) return; + + ConioInitRect(&Region, 0, 0, + ActiveBuffer->ViewSize.Y - 1, + ActiveBuffer->ViewSize.X - 1); + TermDrawRegion(Console, &Region); + // Console->FrontEndIFace.Vtbl->DrawRegion(&Console->FrontEndIFace, &Region); +} + static VOID NTAPI ConSrvTermDrawRegion(IN OUT PTERMINAL This, SMALL_RECT* Region) Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1] Sun Dec 14 19:01:52 2014 @@ -347,7 +347,6 @@ /* conoutput.c */ PCHAR_INFO ConioCoordToPointer(PTEXTMODE_SCREEN_BUFFER Buff, ULONG X, ULONG Y); -VOID ConioDrawConsole(PCONSOLE /*PCONSRV_CONSOLE*/ Console); NTSTATUS ConioResizeBuffer(PCONSOLE /*PCONSRV_CONSOLE*/ Console, PTEXTMODE_SCREEN_BUFFER ScreenBuffer, COORD Size); Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h [iso-8859-1] Sun Dec 14 19:01:52 2014 @@ -2,7 +2,8 @@ * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Console Server DLL * FILE: consrv/include/conio_winsrv.h - * PURPOSE: Public Console I/O Interface + * PURPOSE: Public Console I/O Interface - Offers wrap-up structures + * over the console objects exposed by the console driver. * PROGRAMMERS: Gé van Geldorp * Jeffrey Morlan * Hermes Belusca-Maito (hermes.belusca(a)sfr.fr) @@ -217,9 +218,11 @@ /* conoutput.c */ PCHAR_INFO ConioCoordToPointer(PTEXTMODE_SCREEN_BUFFER Buff, ULONG X, ULONG Y); -VOID ConioDrawConsole(PCONSOLE /*PCONSRV_CONSOLE*/ Console); NTSTATUS ConioResizeBuffer(PCONSOLE /*PCONSRV_CONSOLE*/ Console, PTEXTMODE_SCREEN_BUFFER ScreenBuffer, COORD Size); +/* terminal.c */ +VOID ConioDrawConsole(PCONSRV_CONSOLE Console); + /* EOF */
10 years
1
0
0
0
[dreimer] 65648: [TREE] German translation for tree utility.
by dreimer@svn.reactos.org
Author: dreimer Date: Sun Dec 14 18:58:51 2014 New Revision: 65648 URL:
http://svn.reactos.org/svn/reactos?rev=65648&view=rev
Log: [TREE] German translation for tree utility. Added: trunk/reactos/base/applications/cmdutils/tree/lang/de-DE.rc (with props) Modified: trunk/reactos/base/applications/cmdutils/tree/tree.rc Added: trunk/reactos/base/applications/cmdutils/tree/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/tree/lang/de-DE.rc (added) +++ trunk/reactos/base/applications/cmdutils/tree/lang/de-DE.rc [iso-8859-1] Sun Dec 14 18:58:51 2014 @@ -0,0 +1,12 @@ +LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL + +STRINGTABLE +BEGIN + IDS_USAGE "Zeigt die Ordnerstruktur eines Laufwerks oder Pfads grafisch an.\n\n\ +TREE [Laufwerk:][Pfad] [/F] [/A]\n\n\ +\t/F Zeigt die Namen der Dateien in jedem Ordner an.\n\ +\t/A Verwendet den ASCII- statt des erweiterten Zeichensatzes.\n" + IDS_NO_SUBDIRECTORIES "Es sind keine Unterordner vorhanden" + IDS_FOLDER_PATH "Auflistung der Ordnerpfade\n" + IDS_VOL_SERIAL "Volumeseriennummer : %x:%x\n" +END Propchange: trunk/reactos/base/applications/cmdutils/tree/lang/de-DE.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/applications/cmdutils/tree/tree.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/tree/tree.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/tree/tree.rc [iso-8859-1] Sun Dec 14 18:58:51 2014 @@ -12,6 +12,9 @@ /* UTF-8 */ #pragma code_page(65001) +#ifdef LANGUAGE_DE_DE + #include "lang/de-DE.rc" +#endif #ifdef LANGUAGE_EN_US #include "lang/en-US.rc" #endif
10 years
1
0
0
0
[zguo] 65647: [SETUP] Add registry value for wallpaper directory. Patch by Ricardo Hanke. CORE-8797
by zguo@svn.reactos.org
Author: zguo Date: Sun Dec 14 18:39:24 2014 New Revision: 65647 URL:
http://svn.reactos.org/svn/reactos?rev=65647&view=rev
Log: [SETUP] Add registry value for wallpaper directory. Patch by Ricardo Hanke. CORE-8797 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] Sun Dec 14 18:39:24 2014 @@ -88,6 +88,7 @@ HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion","DevicePath",0x00020002,"%SystemRoot%\inf" HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion","MediaPathUnexpanded",0x00020000,"%SystemRoot%\Media" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion","WallPaperDir",0x00020002,"%SystemRoot%\Web\Wallpaper" HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths",,0x00000012 HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Applets",,0x00000012 HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cpls",,0x00000012
10 years
1
0
0
0
[zguo] 65646: [TREE] Cleanup of Tree utility by Lee Schroeder. CORE-8908
by zguo@svn.reactos.org
Author: zguo Date: Sun Dec 14 18:30:14 2014 New Revision: 65646 URL:
http://svn.reactos.org/svn/reactos?rev=65646&view=rev
Log: [TREE] Cleanup of Tree utility by Lee Schroeder. CORE-8908 Added: trunk/reactos/base/applications/cmdutils/tree/lang/ trunk/reactos/base/applications/cmdutils/tree/lang/en-US.rc (with props) trunk/reactos/base/applications/cmdutils/tree/resource.h (with props) trunk/reactos/base/applications/cmdutils/tree/tree.rc (with props) Modified: trunk/reactos/base/applications/cmdutils/tree/CMakeLists.txt trunk/reactos/base/applications/cmdutils/tree/tree.c Modified: trunk/reactos/base/applications/cmdutils/tree/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/tree/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/tree/CMakeLists.txt [iso-8859-1] Sun Dec 14 18:30:14 2014 @@ -1,5 +1,6 @@ -add_executable(tree tree.c) +add_executable(tree tree.c tree.rc) set_module_type(tree win32cui UNICODE) +set_target_properties(tree PROPERTIES SUFFIX ".com") add_importlibs(tree msvcrt kernel32 user32) add_cd_file(TARGET tree DESTINATION reactos/system32 FOR all) Added: trunk/reactos/base/applications/cmdutils/tree/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/tree/lang/en-US.rc (added) +++ trunk/reactos/base/applications/cmdutils/tree/lang/en-US.rc [iso-8859-1] Sun Dec 14 18:30:14 2014 @@ -0,0 +1,12 @@ +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +STRINGTABLE +BEGIN + IDS_USAGE "Visually displays the folder structure of a drive or path.\n\n\ +TREE [drive:][path] [/F] [/A]\n\n\ +\t/F Display the names of the files in each folder.\n\ +\t/A Use ASCII instead of extended characters.\n" + IDS_NO_SUBDIRECTORIES "No subdirectories exist" + IDS_FOLDER_PATH "Folder PATH Listing\n" + IDS_VOL_SERIAL "Volume serial number is %x:%x\n" +END Propchange: trunk/reactos/base/applications/cmdutils/tree/lang/en-US.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/cmdutils/tree/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/tree/resource.h (added) +++ trunk/reactos/base/applications/cmdutils/tree/resource.h [iso-8859-1] Sun Dec 14 18:30:14 2014 @@ -0,0 +1,9 @@ +#ifndef RESOURCE_H +#define RESOURCE_H + +#define IDS_USAGE 0 +#define IDS_NO_SUBDIRECTORIES 1 +#define IDS_FOLDER_PATH 2 +#define IDS_VOL_SERIAL 3 + +#endif /* RESOURCE_H */ Propchange: trunk/reactos/base/applications/cmdutils/tree/resource.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/applications/cmdutils/tree/tree.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/tree/tree.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/tree/tree.c [iso-8859-1] Sun Dec 14 18:30:14 2014 @@ -9,16 +9,32 @@ // #include <windows.h> #include <stdio.h> +//#include <stdarg.h> + +#include "resource.h" #define STR_MAX 2048 - -const wchar_t *HELP = L"\nGraphically displays the folder structure of a drive or path. \n\nTREE [drive:][path] [/F] [/A]\n\n /F Display the names of the files in each folder.\n\n\n"; -const wchar_t *INVALID = L"No subfolders exist"; static void DrawTree(const wchar_t* strPath, const WIN32_FIND_DATA *arrFolder, const size_t szArr, UINT width, const wchar_t *prevLine, BOOL drawfolder); static void GetDirectoryStructure(wchar_t* strPath, UINT width, const wchar_t* prevLine); BOOL bShowFiles = FALSE; //if this flag is set to true, files will also be listed +BOOL bUseAscii = FALSE; //if this flag is true, ASCII characters will be used instead of UNICODE ones + +/* + * This takes strings from a resource string table + * and outputs it to the console. + */ +VOID PrintResourceString(INT resID, ...) +{ + WCHAR tmpBuffer[STR_MAX]; + va_list arg_ptr; + + va_start(arg_ptr, resID); + LoadStringW(GetModuleHandle(NULL), resID, tmpBuffer, STR_MAX); + vfwprintf(stdout, tmpBuffer, arg_ptr); + va_end(arg_ptr); +} /** * @name: HasSubFolder @@ -101,10 +117,17 @@ for(j=0;j<width-1;++j) { //if the previous line has 'â' or 'â' then the current line will add 'â' to continue the connecting line - if((BYTE)prevLine[j] == 195 || (BYTE)prevLine[j] == 179) - { - wchar_t a[]={179,0}; - wcscat(consoleOut,a); + if((BYTE)prevLine[j] == 195 || (BYTE)prevLine[j] == 179 || (BYTE)prevLine[j] == L'+' || (BYTE)prevLine[j] == L'|') + { + if (bUseAscii) + { + wchar_t a[]={179,0}; + wcscat(consoleOut,a); + } + else + { + wcscat(consoleOut,L"|"); + } } else { @@ -117,14 +140,20 @@ if(drawfolder) { // will add 'ââââFolder name - wsprintf(str, L"%c%c%c%c%s", 195, 196, 196, 196, (wchar_t*)arrFolder[i].cFileName); + if (bUseAscii) + wsprintf(str, L"+---%s", (wchar_t*)arrFolder[i].cFileName); + else + wsprintf(str, L"%c%c%c%c%s", 195, 196, 196, 196, (wchar_t*)arrFolder[i].cFileName); } else { if(bHasSubFolder) { // will add 'â FileNamw' //thie line is added to connect the belowfolder sub structure - wsprintf(str,L"%c %s", 179, (wchar_t*)arrFolder[i].cFileName); + if (bUseAscii) + wsprintf(str,L"| %s", (wchar_t*)arrFolder[i].cFileName); + else + wsprintf(str,L"%c %s", 179, (wchar_t*)arrFolder[i].cFileName); } else { @@ -138,14 +167,20 @@ if(drawfolder) { // 'ââââFolder name' - wsprintf(str, L"%c%c%c%c%s", 192, 196, 196, 196, (wchar_t*)arrFolder[i].cFileName); + if (bUseAscii) + wsprintf(str, L"\\---%s", (wchar_t*)arrFolder[i].cFileName); + else + wsprintf(str, L"%c%c%c%c%s", 192, 196, 196, 196, (wchar_t*)arrFolder[i].cFileName); } else { if(bHasSubFolder) { // 'â FileName' - wsprintf(str,L"%c %s", 179, (wchar_t*)arrFolder[i].cFileName); + if (bUseAscii) + wsprintf(str,L"| %s", (wchar_t*)arrFolder[i].cFileName); + else + wsprintf(str,L"%c %s", 179, (wchar_t*)arrFolder[i].cFileName); } else { @@ -279,14 +314,21 @@ for(i = 1; i < argc; ++i) //parse the command line { - if(wcscmp(argv[i], L"/?") == 0) - { - wprintf(HELP); //will print help and exit after - return 0; - } - else if(wcscmp(argv[i],L"/F")==0 || wcscmp(argv[i],L"/f")==0) - { - bShowFiles=TRUE; //if set to true, will populate all the files within the folder structure + if (argv[i][0] == L'-' || argv[i][0] == L'/') + { + switch (towlower(argv[i][1])) + { + case L'?': + PrintResourceString(IDS_USAGE); //will print help and exit after + return 0; + case L'f': + bShowFiles=TRUE; //if set to true, will populate all the files within the folder structure + break; + case L'a': + bUseAscii=TRUE; + break; + default:break; + } } else { @@ -294,16 +336,16 @@ BOOL b=SetCurrentDirectoryW(argv[i]); //will set the current directory for this executable if(b==FALSE) { - wprintf(INVALID); + PrintResourceString(IDS_NO_SUBDIRECTORIES); return 1; } } } - wprintf(L"Folder PATH listing\n"); + PrintResourceString(IDS_FOLDER_PATH); GetVolumeInformation(NULL, NULL, 0, &dwSerial, NULL, NULL, NULL, 0); - wprintf(L"Volume serial number is %x:%x\n", dwSerial >> 16, dwSerial & 0xffff); + PrintResourceString(IDS_VOL_SERIAL, dwSerial >> 16, dwSerial & 0xffff); sz = GetCurrentDirectory(1, &t); //get the buffer size strPath = (wchar_t*)malloc(sizeof(wchar_t) * sz); //must not return before calling delete[] Added: trunk/reactos/base/applications/cmdutils/tree/tree.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/tree/tree.rc (added) +++ trunk/reactos/base/applications/cmdutils/tree/tree.rc [iso-8859-1] Sun Dec 14 18:30:14 2014 @@ -0,0 +1,17 @@ +#include <windef.h> +#include <winuser.h> + +#include "resource.h" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Tree Walk Utility" +#define REACTOS_STR_INTERNAL_NAME "tree" +#define REACTOS_STR_ORIGINAL_FILENAME "tree.exe" +#include <reactos/version.rc> + +/* UTF-8 */ +#pragma code_page(65001) +#ifdef LANGUAGE_EN_US + #include "lang/en-US.rc" +#endif Propchange: trunk/reactos/base/applications/cmdutils/tree/tree.rc ------------------------------------------------------------------------------ svn:eol-style = native
10 years
1
0
0
0
[pschweitzer] 65645: [NTFS] Implement GetVolumeBitmap(). This allows NFI to find which file is at which LCN: http://www.heisspiter.net/~Pierre/rostests/NTFS_NFI_LCN.png So far, NFI is not as verbos...
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Dec 14 18:13:57 2014 New Revision: 65645 URL:
http://svn.reactos.org/svn/reactos?rev=65645&view=rev
Log: [NTFS] Implement GetVolumeBitmap(). This allows NFI to find which file is at which LCN:
http://www.heisspiter.net/~Pierre/rostests/NTFS_NFI_LCN.png
So far, NFI is not as verbose as it is on Windows in such cases, because FILE_OPEN_BY_FILE_ID is *still* unimplemented (you should consider implementing it Pierre ;-)). I checked with Windows, the correct file is found though! CORE-8725 Modified: trunk/reactos/drivers/filesystems/ntfs/fsctl.c Modified: trunk/reactos/drivers/filesystems/ntfs/fsctl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/fsctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/fsctl.c [iso-8859-1] Sun Dec 14 18:13:57 2014 @@ -666,6 +666,11 @@ PIO_STACK_LOCATION Stack; PVOLUME_BITMAP_BUFFER BitmapBuffer; LONGLONG StartingLcn; + PFILE_RECORD_HEADER BitmapRecord; + PNTFS_ATTR_CONTEXT DataContext; + ULONGLONG TotalClusters; + ULONGLONG ToCopy; + BOOLEAN Overflow = FALSE; DPRINT1("GetVolumeBitmap(%p, %p)\n", DeviceExt, Irp); @@ -722,8 +727,59 @@ return STATUS_INVALID_PARAMETER; } - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + /* Round down to a multiple of 8 */ + StartingLcn = StartingLcn & ~7; + TotalClusters = DeviceExt->NtfsInfo.ClusterCount - StartingLcn; + ToCopy = TotalClusters / 8; + if ((ToCopy + FIELD_OFFSET(VOLUME_BITMAP_BUFFER, Buffer)) > Stack->Parameters.FileSystemControl.OutputBufferLength) + { + DPRINT1("Buffer too small: %x, needed: %x\n", Stack->Parameters.FileSystemControl.OutputBufferLength, (ToCopy + FIELD_OFFSET(VOLUME_BITMAP_BUFFER, Buffer))); + Overflow = TRUE; + ToCopy = Stack->Parameters.FileSystemControl.OutputBufferLength - FIELD_OFFSET(VOLUME_BITMAP_BUFFER, Buffer); + } + + BitmapRecord = ExAllocatePoolWithTag(NonPagedPool, + DeviceExt->NtfsInfo.BytesPerFileRecord, + TAG_NTFS); + if (BitmapRecord == NULL) + { + return STATUS_INSUFFICIENT_RESOURCES; + } + + Status = ReadFileRecord(DeviceExt, NTFS_FILE_BITMAP, BitmapRecord); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed reading volume bitmap: %lx\n", Status); + ExFreePoolWithTag(BitmapRecord, TAG_NTFS); + return Status; + } + + Status = FindAttribute(DeviceExt, BitmapRecord, AttributeData, L"", 0, &DataContext); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed find $DATA for bitmap: %lx\n", Status); + ExFreePoolWithTag(BitmapRecord, TAG_NTFS); + return Status; + } + + BitmapBuffer->StartingLcn.QuadPart = StartingLcn; + BitmapBuffer->BitmapSize.QuadPart = ToCopy * 8; + + Irp->IoStatus.Information = FIELD_OFFSET(VOLUME_BITMAP_BUFFER, Buffer); + _SEH2_TRY + { + Irp->IoStatus.Information += ReadAttribute(DeviceExt, DataContext, StartingLcn / 8, (PCHAR)BitmapBuffer->Buffer, ToCopy); + Status = (Overflow ? STATUS_BUFFER_OVERFLOW : STATUS_SUCCESS); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + ReleaseAttributeContext(DataContext); + ExFreePoolWithTag(BitmapRecord, TAG_NTFS); + + return STATUS_SUCCESS; }
10 years
1
0
0
0
[hbelusca] 65644: [CONSRV]: Add PCONSRV_CONSOLE --> PCONSOLE casts (needed *on purpose*).
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Dec 14 18:05:50 2014 New Revision: 65644 URL:
http://svn.reactos.org/svn/reactos?rev=65644&view=rev
Log: [CONSRV]: Add PCONSRV_CONSOLE --> PCONSOLE casts (needed *on purpose*). Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/fullscreen.c branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/graphics.c branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/text.c branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [iso-8859-1] Sun Dec 14 18:05:50 2014 @@ -288,7 +288,7 @@ DPRINT("Menu item ID: %d\n", CmdId); - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; er.EventType = MENU_EVENT; er.Event.MenuEvent.dwCommandId = CmdId; @@ -753,7 +753,7 @@ PCONSRV_CONSOLE Console = GuiData->Console; INPUT_RECORD er; - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; er.EventType = FOCUS_EVENT; er.Event.FocusEvent.bSetFocus = SetFocus; @@ -1151,7 +1151,7 @@ PCONSRV_CONSOLE Console = GuiData->Console; PCONSOLE_SCREEN_BUFFER ActiveBuffer; - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; ActiveBuffer = GuiData->ActiveBuffer; @@ -1321,7 +1321,7 @@ SetTimer(GuiData->hWindow, CONGUI_UPDATE_TIMER, CURSOR_BLINK_TIME, NULL); - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; Buff = GuiData->ActiveBuffer; @@ -1423,7 +1423,7 @@ { PCONSRV_CONSOLE Console = GuiData->Console; - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return TRUE; // TODO: Prompt for termination ? (Warn the user about possible apps running in this console) @@ -1525,7 +1525,7 @@ goto Quit; } - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) { Err = TRUE; goto Quit; @@ -1856,7 +1856,7 @@ DWORD windx, windy; UINT WidthUnit, HeightUnit; - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; ActiveBuffer = GuiData->ActiveBuffer; @@ -1888,7 +1888,7 @@ /* Do nothing if the window is hidden */ if (!GuiData->IsWindowVisible) return; - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; if ((GuiData->WindowSizeLock == FALSE) && (wParam == SIZE_RESTORED || wParam == SIZE_MAXIMIZED || wParam == SIZE_MINIMIZED)) @@ -1998,7 +1998,7 @@ int old_pos, Maximum; PSHORT pShowXY; - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return 0; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return 0; Buff = GuiData->ActiveBuffer; Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/fullscreen.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/fullscreen.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/fullscreen.c [iso-8859-1] Sun Dec 14 18:05:50 2014 @@ -177,7 +177,7 @@ PCONSRV_CONSOLE Console = GuiData->Console; BOOL FullScreen; - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; /* Switch to full-screen or to windowed mode */ FullScreen = !GuiData->GuiInfo.FullScreen; Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/graphics.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/graphics.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/graphics.c [iso-8859-1] Sun Dec 14 18:05:50 2014 @@ -131,7 +131,7 @@ if (Buffer->BitMap == NULL) return; - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; rcFramebuffer->left = Buffer->ViewOrigin.X * 1 + rcView->left; rcFramebuffer->top = Buffer->ViewOrigin.Y * 1 + rcView->top; Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c [iso-8859-1] Sun Dec 14 18:05:50 2014 @@ -238,7 +238,7 @@ DPRINT("GuiConsoleShowConsoleProperties entered\n"); - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; /* * Create a memory section to share with the applet, and map it. @@ -429,7 +429,7 @@ PTERMINAL_INFO TermInfo = NULL; PGUI_CONSOLE_INFO GuiInfo = NULL; - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; /* Get the console leader process, our client */ ProcessData = ConSrvGetConsoleLeaderProcess(Console); @@ -575,7 +575,7 @@ SIZE_T Length; #endif - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; /* Get the console leader process, our client */ ProcessData = ConSrvGetConsoleLeaderProcess(Console); Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/text.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/text.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/text.c [iso-8859-1] Sun Dec 14 18:05:50 2014 @@ -354,7 +354,7 @@ if (Buffer->Buffer == NULL) return; - if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; + if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; rcFramebuffer->left = Buffer->ViewOrigin.X * GuiData->CharWidth + rcView->left; rcFramebuffer->top = Buffer->ViewOrigin.Y * GuiData->CharHeight + rcView->top; Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c [iso-8859-1] Sun Dec 14 18:05:50 2014 @@ -291,7 +291,7 @@ } #endif - if (ConDrvValidateConsoleUnsafe(ActiveConsole->Console, CONSOLE_RUNNING, TRUE)) + if (ConDrvValidateConsoleUnsafe((PCONSOLE)ActiveConsole->Console, CONSOLE_RUNNING, TRUE)) { MSG Message; Message.hwnd = hWnd; @@ -307,7 +307,7 @@ case WM_ACTIVATE: { - if (ConDrvValidateConsoleUnsafe(ActiveConsole->Console, CONSOLE_RUNNING, TRUE)) + if (ConDrvValidateConsoleUnsafe((PCONSOLE)ActiveConsole->Console, CONSOLE_RUNNING, TRUE)) { if (LOWORD(wParam) != WA_INACTIVE) {
10 years
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
39
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Results per page:
10
25
50
100
200