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
September 2009
----- 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
16 participants
270 discussions
Start a n
N
ew thread
[sginsberg] 43206: - Comment fixes
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Sep 28 20:02:45 2009 New Revision: 43206 URL:
http://svn.reactos.org/svn/reactos?rev=43206&view=rev
Log: - Comment fixes Modified: trunk/reactos/include/psdk/sdkddkver.h Modified: trunk/reactos/include/psdk/sdkddkver.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/sdkddkver.h?r…
============================================================================== --- trunk/reactos/include/psdk/sdkddkver.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/sdkddkver.h [iso-8859-1] Mon Sep 28 20:02:45 2009 @@ -1,4 +1,4 @@ -/* ReactOS DDK +/* ReactOS PSDK/DDK This file is in the public domain. @@ -151,7 +151,7 @@ #endif #endif -/* Make Sure NTDDI_VERSION and _WIN32_WINNT Match */ +/* Make Sure NTDDI_VERSION and _WIN32_WINNT Matches */ #if ((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (_WIN32_WINNT != _WIN32_WINNT_WIN2K)) || \ ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP)) || \ ((OSVER(NTDDI_VERSION) == NTDDI_WS03) && (_WIN32_WINNT != _WIN32_WINNT_WS03)) || \
15 years, 2 months
1
0
0
0
[sginsberg] 43205: Hey Arch, how do you expect kernel32 to build with Microsoft's headers if you define a NTDDI_VERSION that conflicts with _WIN32_WINNT and makes sdkddkver.h cry? Remove the conflicting define from the .rbuild and redefine it in the header before including the NDK (this is needed because we need Vista types from the PSDK but require 2003 types from the NDK -- glorious, eh?). Prepare sddkver.h for mingw-w64 import: - Point out the fact that the header is in the public domain. - A
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Sep 28 19:45:23 2009 New Revision: 43205 URL:
http://svn.reactos.org/svn/reactos?rev=43205&view=rev
Log: Hey Arch, how do you expect kernel32 to build with Microsoft's headers if you define a NTDDI_VERSION that conflicts with _WIN32_WINNT and makes sdkddkver.h cry? Remove the conflicting define from the .rbuild and redefine it in the header before including the NDK (this is needed because we need Vista types from the PSDK but require 2003 types from the NDK -- glorious, eh?). Prepare sddkver.h for mingw-w64 import: - Point out the fact that the header is in the public domain. - Add some missing stuff, including a NTDDI_VERSION sanity check. - Format fixes, add some comments Modified: trunk/reactos/dll/win32/kernel32/k32.h trunk/reactos/dll/win32/kernel32/kernel32.rbuild trunk/reactos/include/psdk/sdkddkver.h Modified: trunk/reactos/dll/win32/kernel32/k32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/k32.h?r…
============================================================================== --- trunk/reactos/dll/win32/kernel32/k32.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/k32.h [iso-8859-1] Mon Sep 28 19:45:23 2009 @@ -16,11 +16,15 @@ #include <windows.h> #include <tlhelp32.h> -#ifdef __GNUC__ -#include "intrin.h" -#endif +/* Redefine NTDDI_VERSION to 2K3 SP1 to get correct NDK definitions */ +#undef NTDDI_VERSION +#define NTDDI_VERSION NTDDI_WS03SP1 #include <ndk/ntndk.h> + + +#undef NTDDI_WS03SP1 + /* CSRSS Header */ #include <csrss/csrss.h> Modified: trunk/reactos/dll/win32/kernel32/kernel32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel3…
============================================================================== --- trunk/reactos/dll/win32/kernel32/kernel32.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/kernel32.rbuild [iso-8859-1] Mon Sep 28 19:45:23 2009 @@ -13,7 +13,6 @@ <define name="_KERNEL32_" /> <redefine name="_WIN32_WINNT">0x0600</redefine> <define name="__NO_CTYPE_INLINES" /> - <define name="NTDDI_VERSION">0x05020100</define> <dependency>errcodes</dependency> <!-- See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<pch>k32.h</pch> Modified: trunk/reactos/include/psdk/sdkddkver.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/sdkddkver.h?r…
============================================================================== --- trunk/reactos/include/psdk/sdkddkver.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/sdkddkver.h [iso-8859-1] Mon Sep 28 19:45:23 2009 @@ -1,12 +1,31 @@ +/* ReactOS DDK + +This file is in the public domain. + +Header Name: + + sdkddkver.h + +Abstract: + + Version definitions for SDK and DDK. + +--*/ + #ifndef _INC_SDKDDKVER #define _INC_SDKDDKVER -/* Version constants */ +/* _WIN32_WINNT */ #define _WIN32_WINNT_NT4 0x0400 #define _WIN32_WINNT_WIN2K 0x0500 #define _WIN32_WINNT_WINXP 0x0501 #define _WIN32_WINNT_WS03 0x0502 +#define _WIN32_WINNT_WIN6 0x0600 +#define _WIN32_WINNT_VISTA 0x0600 +#define _WIN32_WINNT_WS08 0x0600 #define _WIN32_WINNT_LONGHORN 0x0600 + +/* _WIN32_IE */ #define _WIN32_IE_IE20 0x0200 #define _WIN32_IE_IE30 0x0300 #define _WIN32_IE_IE302 0x0302 @@ -19,6 +38,8 @@ #define _WIN32_IE_IE60SP1 0x0601 #define _WIN32_IE_IE60SP2 0x0603 #define _WIN32_IE_IE70 0x0700 + +/* Mappings Between IE Version and Windows Version */ #define _WIN32_IE_NT4 _WIN32_IE_IE20 #define _WIN32_IE_NT4SP1 _WIN32_IE_IE20 #define _WIN32_IE_NT4SP2 _WIN32_IE_IE20 @@ -39,7 +60,10 @@ #define _WIN32_IE_XPSP2 _WIN32_IE_IE60SP2 #define _WIN32_IE_WS03 0x0602 #define _WIN32_IE_WS03SP1 _WIN32_IE_IE60SP2 +#define _WIN32_IE_WIN6 _WIN32_IE_IE70 #define _WIN32_IE_LONGHORN _WIN32_IE_IE70 + +/* NTDDI_VERSION */ #define NTDDI_WIN2K 0x05000000 #define NTDDI_WIN2KSP1 0x05000100 #define NTDDI_WIN2KSP2 0x05000200 @@ -71,13 +95,23 @@ #define NTDDI_WS08SP3 NTDDI_WIN6SP3 #define NTDDI_WS08SP4 NTDDI_WIN6SP4 +/* Version Fields in NTDDI_VERSION */ +#define OSVERSION_MASK 0xFFFF0000 +#define SPVERSION_MASK 0x0000FF00 +#define SUBVERSION_MASK 0x000000FF + +/* Macros to Extract Version Fields From NTDDI_VERSION */ +#define OSVER(Version) ((Version) & OSVERSION_MASK) +#define SPVER(Version) (((Version) & SPVERSION_MASK) >> 8) +#define SUBVER(Version) (((Version) & SUBVERSION_MASK)) + /* Macros to get the NTDDI for a given WIN32 */ -#define NTDDI_VERSION_FROM_WIN32_WINNT2(ver) ver##0000 -#define NTDDI_VERSION_FROM_WIN32_WINNT(ver) NTDDI_VERSION_FROM_WIN32_WINNT2(ver) +#define NTDDI_VERSION_FROM_WIN32_WINNT2(Version) Version##0000 +#define NTDDI_VERSION_FROM_WIN32_WINNT(Version) NTDDI_VERSION_FROM_WIN32_WINNT2(Version) /* Select Default WIN32_WINNT Value */ #if !defined(_WIN32_WINNT) && !defined(_CHICAGO_) -#define _WIN32_WINNT 0x0600 +#define _WIN32_WINNT 0x0600 #endif /* Choose NTDDI Version */ @@ -117,4 +151,12 @@ #endif #endif +/* Make Sure NTDDI_VERSION and _WIN32_WINNT Match */ +#if ((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (_WIN32_WINNT != _WIN32_WINNT_WIN2K)) || \ + ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP)) || \ + ((OSVER(NTDDI_VERSION) == NTDDI_WS03) && (_WIN32_WINNT != _WIN32_WINNT_WS03)) || \ + ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP)) +#error NTDDI_VERSION and _WIN32_WINNT mismatch! #endif + +#endif
15 years, 2 months
1
0
0
0
[janderwald] 43204: - Implement KSPROPERTY_PIN_NAME properly - KsPinPropertyHandler does *NOT* set Status in the IRP
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Sep 28 15:33:17 2009 New Revision: 43204 URL:
http://svn.reactos.org/svn/reactos?rev=43204&view=rev
Log: - Implement KSPROPERTY_PIN_NAME properly - KsPinPropertyHandler does *NOT* set Status in the IRP Modified: trunk/reactos/drivers/ksfilter/ks/connectivity.c Modified: trunk/reactos/drivers/ksfilter/ks/connectivity.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/connec…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/connectivity.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/connectivity.c [iso-8859-1] Mon Sep 28 15:33:17 2009 @@ -174,6 +174,97 @@ return STATUS_SUCCESS; } + +NTSTATUS +KspReadMediaCategory( + IN LPGUID Category, + PKEY_VALUE_PARTIAL_INFORMATION *OutInformation) +{ + UNICODE_STRING MediaPath = RTL_CONSTANT_STRING(L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control\\MediaCategories\\"); + UNICODE_STRING Name = RTL_CONSTANT_STRING(L"Name"); + UNICODE_STRING GuidString, Path; + NTSTATUS Status; + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE hKey; + ULONG Size; + PKEY_VALUE_PARTIAL_INFORMATION KeyInfo; + + /* convert the guid to string */ + Status = RtlStringFromGUID(Category, &GuidString); + if (!NT_SUCCESS(Status)) + return Status; + + /* allocate buffer for the registry key */ + Path.Length = 0; + Path.MaximumLength = MediaPath.MaximumLength + GuidString.MaximumLength; + Path.Buffer = ExAllocatePool(NonPagedPool, Path.MaximumLength); + if (!Path.Buffer) + { + /* not enough memory */ + RtlFreeUnicodeString(&GuidString); + return STATUS_INSUFFICIENT_RESOURCES; + } + + RtlAppendUnicodeStringToString(&Path, &MediaPath); + RtlAppendUnicodeStringToString(&Path, &GuidString); + + /* free guid string */ + RtlFreeUnicodeString(&GuidString); + + /* initialize object attributes */ + InitializeObjectAttributes(&ObjectAttributes, &Path, OBJ_CASE_INSENSITIVE, NULL, NULL); + + /* open the key */ + Status = ZwOpenKey(&hKey, GENERIC_READ, &ObjectAttributes); + + DPRINT1("ZwOpenKey() status 0x%08lx %S\n", Status, Path.Buffer); + + /* free path buffer */ + ExFreePool(Path.Buffer); + + /* check for success */ + if (!NT_SUCCESS(Status)) + { + DPRINT1("ZwOpenKey() failed with status 0x%08lx\n", Status); + return Status; + } + + /* query the name size */ + Status = ZwQueryValueKey(hKey, &Name, KeyValuePartialInformation, NULL, 0, &Size); + if (!NT_SUCCESS(Status) && Status != STATUS_BUFFER_TOO_SMALL) + { + /* failed to query for name key */ + ZwClose(hKey); + return Status; + } + + /* allocate buffer to read key info */ + KeyInfo = (PKEY_VALUE_PARTIAL_INFORMATION) ExAllocatePool(NonPagedPool, Size); + if (!KeyInfo) + { + /* not enough memory */ + ZwClose(hKey); + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* now read the info */ + Status = ZwQueryValueKey(hKey, &Name, KeyValuePartialInformation, (PVOID)KeyInfo, Size, &Size); + + /* close the key */ + ZwClose(hKey); + + if (!NT_SUCCESS(Status)) + { + /* failed to read key */ + ExFreePool(KeyInfo); + return Status; + } + + /* store key information */ + *OutInformation = KeyInfo; + return Status; +} + /* @implemented */ @@ -194,8 +285,8 @@ PVOID Buffer; PKSDATARANGE_AUDIO *WaveFormatOut; PKSDATAFORMAT_WAVEFORMATEX WaveFormatIn; - PULONG GuidBuffer; - static WCHAR Speaker[] = {L"PC-Speaker"}; + PKEY_VALUE_PARTIAL_INFORMATION KeyInfo; + NTSTATUS Status = STATUS_NOT_SUPPORTED; IoStack = IoGetCurrentIrpStackLocation(Irp); Buffer = Irp->UserBuffer; @@ -207,13 +298,13 @@ case KSPROPERTY_PIN_CTYPES: (*(PULONG)Buffer) = DescriptorsCount; Irp->IoStatus.Information = sizeof(ULONG); - Irp->IoStatus.Status = STATUS_SUCCESS; + Status = STATUS_SUCCESS; break; case KSPROPERTY_PIN_DATAFLOW: Pin = (KSP_PIN*)Property; if (Pin->PinId >= DescriptorsCount) { - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + Status = STATUS_INVALID_PARAMETER; Irp->IoStatus.Information = 0; break; } @@ -221,20 +312,20 @@ if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size) { Irp->IoStatus.Information = Size; - Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + Status = STATUS_BUFFER_TOO_SMALL; break; } *((KSPIN_DATAFLOW*)Buffer) = Descriptor[Pin->PinId].DataFlow; Irp->IoStatus.Information = sizeof(KSPIN_DATAFLOW); - Irp->IoStatus.Status = STATUS_SUCCESS; + Status = STATUS_SUCCESS; break; case KSPROPERTY_PIN_DATARANGES: Pin = (KSP_PIN*)Property; if (Pin->PinId >= DescriptorsCount) { - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + Status = STATUS_INVALID_PARAMETER; Irp->IoStatus.Information = 0; break; } @@ -247,7 +338,7 @@ if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size) { Irp->IoStatus.Information = Size; - Irp->IoStatus.Status = STATUS_MORE_ENTRIES; + Status = STATUS_MORE_ENTRIES; break; } @@ -262,14 +353,14 @@ Data = ((PUCHAR)Data + Descriptor[Pin->PinId].DataRanges[Index]->FormatSize); } - Irp->IoStatus.Status = STATUS_SUCCESS; + Status = STATUS_SUCCESS; Irp->IoStatus.Information = Size; break; case KSPROPERTY_PIN_INTERFACES: Pin = (KSP_PIN*)Property; if (Pin->PinId >= DescriptorsCount) { - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + Status = STATUS_INVALID_PARAMETER; Irp->IoStatus.Information = 0; break; } @@ -281,7 +372,7 @@ if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size) { Irp->IoStatus.Information = Size; - Irp->IoStatus.Status = STATUS_MORE_ENTRIES; + Status = STATUS_MORE_ENTRIES; break; } @@ -299,14 +390,14 @@ RtlMoveMemory((PVOID)(Item + 1), &StandardPinInterface, sizeof(KSPIN_INTERFACE)); } - Irp->IoStatus.Status = STATUS_SUCCESS; + Status = STATUS_SUCCESS; Irp->IoStatus.Information = Size; break; case KSPROPERTY_PIN_MEDIUMS: Pin = (KSP_PIN*)Property; if (Pin->PinId >= DescriptorsCount) { - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + Status = STATUS_INVALID_PARAMETER; Irp->IoStatus.Information = 0; break; } @@ -318,7 +409,7 @@ if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size) { Irp->IoStatus.Information = Size; - Irp->IoStatus.Status = STATUS_MORE_ENTRIES; + Status = STATUS_MORE_ENTRIES; break; } @@ -336,7 +427,7 @@ RtlMoveMemory((PVOID)(Item + 1), &StandardPinMedium, sizeof(KSPIN_MEDIUM)); } - Irp->IoStatus.Status = STATUS_SUCCESS; + Status = STATUS_SUCCESS; Irp->IoStatus.Information = Size; break; @@ -344,7 +435,7 @@ Pin = (KSP_PIN*)Property; if (Pin->PinId >= DescriptorsCount) { - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + Status = STATUS_INVALID_PARAMETER; Irp->IoStatus.Information = 0; break; } @@ -353,12 +444,12 @@ if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size) { Irp->IoStatus.Information = Size; - Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + Status = STATUS_BUFFER_TOO_SMALL; break; } *((KSPIN_COMMUNICATION*)Buffer) = Descriptor[Pin->PinId].Communication; - Irp->IoStatus.Status = STATUS_SUCCESS; + Status = STATUS_SUCCESS; Irp->IoStatus.Information = Size; break; @@ -366,7 +457,7 @@ Pin = (KSP_PIN*)Property; if (Pin->PinId >= DescriptorsCount) { - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + Status = STATUS_INVALID_PARAMETER; Irp->IoStatus.Information = 0; break; } @@ -375,7 +466,7 @@ if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size) { Irp->IoStatus.Information = Size; - Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + Status = STATUS_BUFFER_TOO_SMALL; break; } if (Descriptor[Pin->PinId].Category) @@ -383,7 +474,7 @@ RtlMoveMemory(Buffer, Descriptor[Pin->PinId].Category, sizeof(GUID)); } - Irp->IoStatus.Status = STATUS_SUCCESS; + Status = STATUS_SUCCESS; Irp->IoStatus.Information = Size; break; @@ -391,32 +482,45 @@ Pin = (KSP_PIN*)Property; if (Pin->PinId >= DescriptorsCount) { - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; - Irp->IoStatus.Information = 0; - break; - } - - GuidBuffer = Buffer; - Size = sizeof(Speaker); - - if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size) - { - Irp->IoStatus.Information = Size; - Irp->IoStatus.Status = STATUS_MORE_ENTRIES; - break; - } - - RtlMoveMemory(GuidBuffer, Speaker, sizeof(Speaker)); - - //RtlMoveMemory(Buffer, &Descriptor[Pin->PinId].Name, sizeof(GUID)); - Irp->IoStatus.Status = STATUS_SUCCESS; - Irp->IoStatus.Information = Size; + Status = STATUS_INVALID_PARAMETER; + Irp->IoStatus.Information = 0; + break; + } + + if (!Descriptor[Pin->PinId].Category) + { + Irp->IoStatus.Information = 0; + Status = STATUS_SUCCESS; + break; + } + + Status = KspReadMediaCategory((LPGUID)Descriptor[Pin->PinId].Category, &KeyInfo); + if (!NT_SUCCESS(Status)) + { + Irp->IoStatus.Information = 0; + break; + } + + Irp->IoStatus.Information = KeyInfo->DataLength + sizeof(WCHAR); + + + if (KeyInfo->DataLength + sizeof(WCHAR) > IoStack->Parameters.DeviceIoControl.OutputBufferLength) + { + Status = STATUS_MORE_ENTRIES; + ExFreePool(KeyInfo); + break; + } + + RtlMoveMemory(Irp->UserBuffer, &KeyInfo->Data, KeyInfo->DataLength); + ((LPWSTR)Irp->UserBuffer)[KeyInfo->DataLength / sizeof(WCHAR)] = L'\0'; + Irp->IoStatus.Information = KeyInfo->DataLength + sizeof(WCHAR); + ExFreePool(KeyInfo); break; case KSPROPERTY_PIN_PROPOSEDATAFORMAT: Pin = (KSP_PIN*)Property; if (Pin->PinId >= DescriptorsCount) { - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + Status = STATUS_INVALID_PARAMETER; Irp->IoStatus.Information = 0; break; } @@ -424,23 +528,23 @@ if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size) { Irp->IoStatus.Information = Size; - Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + Status = STATUS_BUFFER_TOO_SMALL; break; } if (IoStack->Parameters.DeviceIoControl.OutputBufferLength != sizeof(KSDATAFORMAT_WAVEFORMATEX)) { UNIMPLEMENTED - Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; - Irp->IoStatus.Information = 0; - return STATUS_NOT_IMPLEMENTED; + Status = STATUS_NOT_IMPLEMENTED; + Irp->IoStatus.Information = 0; + break; } WaveFormatIn = (PKSDATAFORMAT_WAVEFORMATEX)Buffer; if (!Descriptor[Pin->PinId].DataRanges || !Descriptor[Pin->PinId].DataRangesCount) { - Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; - Irp->IoStatus.Information = 0; - return STATUS_UNSUCCESSFUL; + Status = STATUS_UNSUCCESSFUL; + Irp->IoStatus.Information = 0; + break; } WaveFormatOut = (PKSDATARANGE_AUDIO*)Descriptor[Pin->PinId].DataRanges; for(Index = 0; Index < Descriptor[Pin->PinId].DataRangesCount; Index++) @@ -468,16 +572,16 @@ return STATUS_SUCCESS; } } - Irp->IoStatus.Status = STATUS_NO_MATCH; + Status = STATUS_NO_MATCH; Irp->IoStatus.Information = 0; - return STATUS_NO_MATCH; + break; default: DPRINT1("Unhandled property request %x\n", Property->Id); - Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; + Status = STATUS_NOT_IMPLEMENTED; Irp->IoStatus.Information = 0; } - return Irp->IoStatus.Status; + return Status; } /*
15 years, 2 months
1
0
0
0
[fireball] 43203: [fastfat_new] - Add an internal routine for opening root DCB (a stub for now). - Add code for checking if this is a relative or absolute open. Start implementing absolute opening part.
by fireball@svn.reactos.org
Author: fireball Date: Mon Sep 28 13:02:34 2009 New Revision: 43203 URL:
http://svn.reactos.org/svn/reactos?rev=43203&view=rev
Log: [fastfat_new] - Add an internal routine for opening root DCB (a stub for now). - Add code for checking if this is a relative or absolute open. Start implementing absolute opening part. Modified: trunk/reactos/drivers/filesystems/fastfat_new/create.c trunk/reactos/drivers/filesystems/fastfat_new/fatstruc.h Modified: trunk/reactos/drivers/filesystems/fastfat_new/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat_new/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat_new/create.c [iso-8859-1] Mon Sep 28 13:02:34 2009 @@ -12,6 +12,24 @@ #include "fastfat.h" /* FUNCTIONS *****************************************************************/ + +IO_STATUS_BLOCK +NTAPI +FatiOpenRootDcb(IN PFAT_IRP_CONTEXT IrpContext, + IN PFILE_OBJECT FileObject, + IN PVCB Vcb, + IN PACCESS_MASK DesiredAccess, + IN USHORT ShareAccess, + IN ULONG CreateDisposition) +{ + IO_STATUS_BLOCK Iosb; + + DPRINT1("Opening root directory\n"); + + Iosb.Status = STATUS_NOT_IMPLEMENTED; + + return Iosb; +} NTSTATUS NTAPI @@ -36,6 +54,7 @@ PVCB Vcb, DecodedVcb; PFCB Fcb; PCCB Ccb; + PFCB ParentDcb; /* IRP data */ PFILE_OBJECT FileObject; @@ -51,7 +70,7 @@ /* Misc */ NTSTATUS Status; - //IO_STATUS_BLOCK Iosb; + IO_STATUS_BLOCK Iosb; PIO_STACK_LOCATION IrpSp; /* Get current IRP stack location */ @@ -184,10 +203,10 @@ // TODO: Make sure EAs aren't supported on FAT32 + /* Check if it's a volume open request */ if (FileName.Length == 0) { - /* It is a volume open request, check related FO to be sure */ - + /* Test related FO to be sure */ if (!RelatedFO || FatDecodeFileObject(RelatedFO, &DecodedVcb, &Fcb, &Ccb) == UserVolumeOpen) { @@ -197,6 +216,58 @@ } } + /* Check if this is a relative open */ + if (RelatedFO) + { + // RelatedFO will be a parent directory + UNIMPLEMENTED; + } + else + { + /* Absolute open */ + if ((FileName.Length == sizeof(WCHAR)) && + (FileName.Buffer[0] == L'\\')) + { + /* Check if it's ok to open it */ + if (NonDirectoryFile) + { + DPRINT1("Trying to open root dir as a file\n"); + + /* Cleanup and return */ + FatReleaseVcb(IrpContext, Vcb); + return STATUS_FILE_IS_A_DIRECTORY; + } + + /* Check delete on close on a root dir */ + if (DeleteOnClose) + { + /* Cleanup and return */ + FatReleaseVcb(IrpContext, Vcb); + return STATUS_CANNOT_DELETE; + } + + /* Call root directory open routine */ + Iosb = FatiOpenRootDcb(IrpContext, + FileObject, + Vcb, + DesiredAccess, + ShareAccess, + CreateDisposition); + + Irp->IoStatus.Information = Iosb.Information; + + /* Cleanup and return */ + FatReleaseVcb(IrpContext, Vcb); + return Iosb.Status; + } + else + { + /* Not a root dir */ + ParentDcb = Vcb->RootDcb; + DPRINT1("ParentDcb %p\n", ParentDcb); + } + } + //return Iosb.Status; return STATUS_SUCCESS; } Modified: trunk/reactos/drivers/filesystems/fastfat_new/fatstruc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat_new/fatstruc.h [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat_new/fatstruc.h [iso-8859-1] Mon Sep 28 13:02:34 2009 @@ -170,8 +170,9 @@ ULONG RootDirentSectors; LONGLONG BeyondLastClusterInFat; FAT_METHODS Methods; - /* Root Directory Fcb: */ - struct _FCB *RootFcb; + + /* Root Directory Control block */ + struct _FCB *RootDcb; ULONG MediaChangeCount; } VCB, *PVCB;
15 years, 2 months
1
0
0
0
[fireball] 43202: [fastfat_new] - Fix wrong comment in FatiCreate, spotted by Ged Murphy. - Add some parameters validation to FatiCreate, and a check for volume open request. - Add node types and a decoding routine. - Implement VCB locking/unlocking.
by fireball@svn.reactos.org
Author: fireball Date: Mon Sep 28 12:43:27 2009 New Revision: 43202 URL:
http://svn.reactos.org/svn/reactos?rev=43202&view=rev
Log: [fastfat_new] - Fix wrong comment in FatiCreate, spotted by Ged Murphy. - Add some parameters validation to FatiCreate, and a check for volume open request. - Add node types and a decoding routine. - Implement VCB locking/unlocking. Modified: trunk/reactos/drivers/filesystems/fastfat_new/create.c trunk/reactos/drivers/filesystems/fastfat_new/fastfat.c trunk/reactos/drivers/filesystems/fastfat_new/fastfat.h trunk/reactos/drivers/filesystems/fastfat_new/fat.c trunk/reactos/drivers/filesystems/fastfat_new/fatstruc.h Modified: trunk/reactos/drivers/filesystems/fastfat_new/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat_new/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat_new/create.c [iso-8859-1] Mon Sep 28 12:43:27 2009 @@ -33,7 +33,9 @@ ULONG CreateDisposition; /* Control blocks */ - PVCB Vcb; + PVCB Vcb, DecodedVcb; + PFCB Fcb; + PCCB Ccb; /* IRP data */ PFILE_OBJECT FileObject; @@ -48,8 +50,8 @@ ULONG EaLength; /* Misc */ - //NTSTATUS Status; - IO_STATUS_BLOCK Iosb; + NTSTATUS Status; + //IO_STATUS_BLOCK Iosb; PIO_STACK_LOCATION IrpSp; /* Get current IRP stack location */ @@ -75,14 +77,14 @@ (IrpSp->FileObject->FileName.Buffer[1] == L'\\') && (IrpSp->FileObject->FileName.Buffer[0] == L'\\')) { - /* Remove two leading slashes */ + /* Remove a leading slash */ IrpSp->FileObject->FileName.Length -= sizeof(WCHAR); - RtlMoveMemory(&IrpSp->FileObject->FileName.Buffer[0], &IrpSp->FileObject->FileName.Buffer[1], IrpSp->FileObject->FileName.Length ); - /* If there are two leading slashes again, exit */ + /* Check again: if there are still two leading slashes, + exit with an error */ if ((IrpSp->FileObject->FileName.Length > sizeof(WCHAR)) && (IrpSp->FileObject->FileName.Buffer[1] == L'\\') && (IrpSp->FileObject->FileName.Buffer[0] == L'\\')) @@ -146,6 +148,55 @@ ((CreateDisposition == FILE_OPEN) || (CreateDisposition == FILE_OPEN_IF))); + /* Validate parameters: directory/nondirectory mismatch and + AllocationSize being more than 4GB */ + if ((DirectoryFile && NonDirectoryFile) || + Irp->Overlay.AllocationSize.HighPart != 0) + { + FatCompleteRequest(IrpContext, Irp, STATUS_INVALID_PARAMETER); + + DPRINT1("FatiCreate: STATUS_INVALID_PARAMETER\n", 0); + return STATUS_INVALID_PARAMETER; + } + + /* Acquire the VCB lock exclusively */ + if (!FatAcquireExclusiveVcb(IrpContext, Vcb)) + { + // TODO: Postpone the IRP for later processing + ASSERT(FALSE); + return STATUS_NOT_IMPLEMENTED; + } + + // TODO: Verify the VCB + + /* If VCB is locked, then no file openings are possible */ + if (Vcb->State & VCB_STATE_FLAG_LOCKED) + { + DPRINT1("This volume is locked\n"); + Status = STATUS_ACCESS_DENIED; + + /* Cleanup and return */ + FatReleaseVcb(IrpContext, Vcb); + return Status; + } + + // TODO: Check if the volume is write protected and disallow DELETE_ON_CLOSE + + // TODO: Make sure EAs aren't supported on FAT32 + + if (FileName.Length == 0) + { + /* It is a volume open request, check related FO to be sure */ + + if (!RelatedFO || + FatDecodeFileObject(RelatedFO, &DecodedVcb, &Fcb, &Ccb) == UserVolumeOpen) + { + /* It is indeed a volume open request */ + DPRINT1("Volume open request, not implemented now!\n"); + UNIMPLEMENTED; + } + } + //return Iosb.Status; return STATUS_SUCCESS; } Modified: trunk/reactos/drivers/filesystems/fastfat_new/fastfat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat_new/fastfat.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat_new/fastfat.c [iso-8859-1] Mon Sep 28 12:43:27 2009 @@ -271,4 +271,99 @@ ExQueueWorkItem(&IrpContext->WorkQueueItem, DelayedWorkQueue); } + +TYPE_OF_OPEN +NTAPI +FatDecodeFileObject(IN PFILE_OBJECT FileObject, + OUT PVCB *Vcb, + OUT PFCB *FcbOrDcb, + OUT PCCB *Ccb) +{ + TYPE_OF_OPEN TypeOfOpen = UnopenedFileObject; + PVOID FsContext = FileObject->FsContext; + PVOID FsContext2 = FileObject->FsContext2; + + /* If FsContext is NULL, then everything is NULL */ + if (!FsContext) + { + *Ccb = NULL; + *FcbOrDcb = NULL; + *Vcb = NULL; + + return TypeOfOpen; + } + + /* CCB is always stored in FsContext2 */ + *Ccb = FsContext2; + + /* Switch according to the NodeType */ + switch (FatNodeType(FsContext)) + { + /* Volume */ + case FAT_NTC_VCB: + *FcbOrDcb = NULL; + *Vcb = FsContext; + + TypeOfOpen = ( *Ccb == NULL ? VirtualVolumeFile : UserVolumeOpen ); + + break; + + /* Root or normal directory*/ + case FAT_NTC_ROOT_DCB: + case FAT_NTC_DCB: + *FcbOrDcb = FsContext; + *Vcb = (*FcbOrDcb)->Vcb; + + TypeOfOpen = (*Ccb == NULL ? DirectoryFile : UserDirectoryOpen); + + DPRINT1("Referencing a directory: %Z\n", &(*FcbOrDcb)->FullFileName); + break; + + /* File */ + case FAT_NTC_FCB: + *FcbOrDcb = FsContext; + *Vcb = (*FcbOrDcb)->Vcb; + + TypeOfOpen = (*Ccb == NULL ? EaFile : UserFileOpen); + + DPRINT1("Referencing a file: %Z\n", &(*FcbOrDcb)->FullFileName); + + break; + + default: + DPRINT1("Unknown node type %x\n", FatNodeType(FsContext)); + ASSERT(FALSE); + } + + return TypeOfOpen; +} + + +BOOLEAN +NTAPI +FatAcquireExclusiveVcb(IN PFAT_IRP_CONTEXT IrpContext, + IN PVCB Vcb) +{ + /* Acquire VCB's resource if possible */ + if (ExAcquireResourceExclusiveLite(&Vcb->Resource, + BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT))) + { + return TRUE; + } + else + { + return FALSE; + } +} + +VOID +NTAPI +FatReleaseVcb(IN PFAT_IRP_CONTEXT IrpContext, + IN PVCB Vcb) +{ + /* Release VCB's resource */ + ExReleaseResourceLite(&Vcb->Resource); +} + + /* EOF */ Modified: trunk/reactos/drivers/filesystems/fastfat_new/fastfat.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat_new/fastfat.h [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat_new/fastfat.h [iso-8859-1] Mon Sep 28 12:43:27 2009 @@ -132,6 +132,20 @@ PIRP Irp OPTIONAL, NTSTATUS Status); +BOOLEAN NTAPI +FatAcquireExclusiveVcb(IN PFAT_IRP_CONTEXT IrpContext, + IN PVCB Vcb); + +VOID NTAPI +FatReleaseVcb(IN PFAT_IRP_CONTEXT IrpContext, + IN PVCB Vcb); + +TYPE_OF_OPEN +NTAPI +FatDecodeFileObject(IN PFILE_OBJECT FileObject, + OUT PVCB *Vcb, + OUT PFCB *FcbOrDcb, + OUT PCCB *Ccb); /* --------------------------------------------------------- lock.c */ Modified: trunk/reactos/drivers/filesystems/fastfat_new/fat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat_new/fat.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat_new/fat.c [iso-8859-1] Mon Sep 28 12:43:27 2009 @@ -489,6 +489,12 @@ Vcb->Header.ValidDataLength.HighPart = MAXLONG; Vcb->Header.ValidDataLength.LowPart = MAXULONG; + /* Set VCB to a good condition */ + Vcb->Condition = VcbGood; + + /* Initialize VCB's resource */ + ExInitializeResourceLite(&Vcb->Resource); + /* Initialize CC */ CcInitializeCacheMap(Vcb->StreamFileObject, (PCC_FILE_SIZES)&Vcb->Header.AllocationSize, Modified: trunk/reactos/drivers/filesystems/fastfat_new/fatstruc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat_new/fatstruc.h [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat_new/fatstruc.h [iso-8859-1] Mon Sep 28 12:43:27 2009 @@ -7,6 +7,18 @@ typedef PVOID PBCB; typedef NTSTATUS (*PFAT_OPERATION_HANDLER) (PFAT_IRP_CONTEXT); + +/* Node type stuff */ +typedef CSHORT FAT_NODE_TYPE; +typedef FAT_NODE_TYPE *PFAT_NODE_TYPE; + +#define FatNodeType(Ptr) (*((PFAT_NODE_TYPE)(Ptr))) + +/* Node type codes */ +#define FAT_NTC_VCB (CSHORT) '00VF' +#define FAT_NTC_FCB (CSHORT) 'CF' +#define FAT_NTC_DCB (CSHORT) 'DF' +#define FAT_NTC_ROOT_DCB (CSHORT) 'RFD' typedef struct _FAT_GLOBAL_DATA { @@ -116,7 +128,14 @@ PFAT_SETFAT_VALUE_RUN_ROUTINE SetValueRun; } FAT_METHODS, *PFAT_METHODS; -#define FAT_NTC_VCB (USHORT) '00VF' +#define VCB_STATE_FLAG_LOCKED 0x01 + +typedef enum _VCB_CONDITION +{ + VcbGood, + VcbNotMounted, + VcbBad +} VCB_CONDITION; /* Volume Control Block */ typedef struct _VCB @@ -129,6 +148,9 @@ PDEVICE_OBJECT TargetDeviceObject; LIST_ENTRY VcbLinks; PVPB Vpb; + ULONG State; + VCB_CONDITION Condition; + ERESOURCE Resource; /* Notifications support */ PNOTIFY_SYNC NotifySync; @@ -196,9 +218,6 @@ UCHAR Type; } FCB_NAME_LINK, *PFCB_NAME_LINK; -#define FAT_NTC_FCB (USHORT) 'CF' -#define FAT_NTC_DCB (USHORT) 'DF' - typedef struct _FCB { FSRTL_ADVANCED_FCB_HEADER Header; @@ -225,6 +244,8 @@ FCB_NAME_LINK FileName[0x2]; /* Buffer for the short name */ WCHAR ShortNameBuffer[0xc]; + /* Full file name */ + UNICODE_STRING FullFileName; /* File basic info */ FILE_BASIC_INFORMATION BasicInfo; union @@ -285,6 +306,16 @@ UCHAR Flags; } CCB, *PCCB; +typedef enum _TYPE_OF_OPEN +{ + UnopenedFileObject, + UserFileOpen, + UserDirectoryOpen, + UserVolumeOpen, + VirtualVolumeFile, + DirectoryFile, + EaFile +} TYPE_OF_OPEN; #define CCB_SEARCH_RETURN_SINGLE_ENTRY 0x01 #define CCB_SEARCH_PATTERN_LEGAL_8DOT3 0x02
15 years, 2 months
1
0
0
0
[janderwald] 43201: - Fix 2 bugs: - The Category member is LPGUID not GUID - Check if there is a category member
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Sep 28 12:38:23 2009 New Revision: 43201 URL:
http://svn.reactos.org/svn/reactos?rev=43201&view=rev
Log: - Fix 2 bugs: - The Category member is LPGUID not GUID - Check if there is a category member Modified: trunk/reactos/drivers/ksfilter/ks/connectivity.c Modified: trunk/reactos/drivers/ksfilter/ks/connectivity.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/connec…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/connectivity.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/connectivity.c [iso-8859-1] Mon Sep 28 12:38:23 2009 @@ -378,8 +378,11 @@ Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; break; } - - RtlMoveMemory(Buffer, &Descriptor[Pin->PinId].Category, sizeof(GUID)); + if (Descriptor[Pin->PinId].Category) + { + RtlMoveMemory(Buffer, Descriptor[Pin->PinId].Category, sizeof(GUID)); + } + Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = Size; break;
15 years, 2 months
1
0
0
0
[janderwald] 43200: - Handle variable sized PCPIN_DESCRIPTORs
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Sep 28 12:30:34 2009 New Revision: 43200 URL:
http://svn.reactos.org/svn/reactos?rev=43200&view=rev
Log: - Handle variable sized PCPIN_DESCRIPTORs Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp [iso-8859-1] Mon Sep 28 12:30:34 2009 @@ -160,6 +160,7 @@ ULONG Index, SubIndex; PKSDATARANGE DataRange; NTSTATUS Status = STATUS_INSUFFICIENT_RESOURCES; + PPCPIN_DESCRIPTOR SrcDescriptor; Descriptor = (PSUBDEVICE_DESCRIPTOR)AllocateItem(NonPagedPool, sizeof(SUBDEVICE_DESCRIPTOR), TAG_PORTCLASS); if (!Descriptor) @@ -234,7 +235,7 @@ if (FilterDescription->PinCount) { - Descriptor->Factory.KsPinDescriptor = (PKSPIN_DESCRIPTOR)AllocateItem(NonPagedPool, FilterDescription->PinSize * FilterDescription->PinCount, TAG_PORTCLASS); + Descriptor->Factory.KsPinDescriptor = (PKSPIN_DESCRIPTOR)AllocateItem(NonPagedPool, sizeof(KSPIN_DESCRIPTOR) * FilterDescription->PinCount, TAG_PORTCLASS); if (!Descriptor->Factory.KsPinDescriptor) goto cleanup; @@ -243,40 +244,44 @@ goto cleanup; Descriptor->Factory.PinDescriptorCount = FilterDescription->PinCount; - Descriptor->Factory.PinDescriptorSize = FilterDescription->PinSize; + Descriptor->Factory.PinDescriptorSize = sizeof(KSPIN_DESCRIPTOR); + + SrcDescriptor = (PPCPIN_DESCRIPTOR)FilterDescription->Pins; + DPRINT("Size %u Expected %u Ex Size %u\n", FilterDescription->PinSize, sizeof(KSPIN_DESCRIPTOR), sizeof(KSPIN_DESCRIPTOR_EX)); // copy pin factories for(Index = 0; Index < FilterDescription->PinCount; Index++) { - RtlMoveMemory(&Descriptor->Factory.KsPinDescriptor[Index], &FilterDescription->Pins[Index].KsPinDescriptor, FilterDescription->PinSize); - - if (FilterDescription->Pins[Index].KsPinDescriptor.DataRangesCount) + RtlMoveMemory(&Descriptor->Factory.KsPinDescriptor[Index], &SrcDescriptor->KsPinDescriptor, sizeof(KSPIN_DESCRIPTOR)); + + if (SrcDescriptor->KsPinDescriptor.DataRangesCount) { - Descriptor->Factory.KsPinDescriptor[Index].DataRanges = (const PKSDATARANGE*)AllocateItem(NonPagedPool, FilterDescription->Pins[Index].KsPinDescriptor.DataRangesCount * sizeof(PKSDATARANGE), TAG_PORTCLASS); + Descriptor->Factory.KsPinDescriptor[Index].DataRanges = (const PKSDATARANGE*)AllocateItem(NonPagedPool, SrcDescriptor->KsPinDescriptor.DataRangesCount * sizeof(PKSDATARANGE), TAG_PORTCLASS); if(!Descriptor->Factory.KsPinDescriptor[Index].DataRanges) goto cleanup; for (SubIndex = 0; SubIndex < FilterDescription->Pins[Index].KsPinDescriptor.DataRangesCount; SubIndex++) { - DataRange = (PKSDATARANGE)AllocateItem(NonPagedPool, FilterDescription->Pins[Index].KsPinDescriptor.DataRanges[SubIndex]->FormatSize, TAG_PORTCLASS); + DataRange = (PKSDATARANGE)AllocateItem(NonPagedPool, SrcDescriptor->KsPinDescriptor.DataRanges[SubIndex]->FormatSize, TAG_PORTCLASS); if (!DataRange) goto cleanup; RtlMoveMemory(DataRange, - FilterDescription->Pins[Index].KsPinDescriptor.DataRanges[SubIndex], - FilterDescription->Pins[Index].KsPinDescriptor.DataRanges[SubIndex]->FormatSize); + SrcDescriptor->KsPinDescriptor.DataRanges[SubIndex], + SrcDescriptor->KsPinDescriptor.DataRanges[SubIndex]->FormatSize); ((PKSDATAFORMAT*)Descriptor->Factory.KsPinDescriptor[Index].DataRanges)[SubIndex] = DataRange; } - Descriptor->Factory.KsPinDescriptor[Index].DataRangesCount = FilterDescription->Pins[Index].KsPinDescriptor.DataRangesCount; + Descriptor->Factory.KsPinDescriptor[Index].DataRangesCount = SrcDescriptor->KsPinDescriptor.DataRangesCount; } Descriptor->Factory.Instances[Index].CurrentPinInstanceCount = 0; Descriptor->Factory.Instances[Index].MaxFilterInstanceCount = FilterDescription->Pins[Index].MaxFilterInstanceCount; Descriptor->Factory.Instances[Index].MaxGlobalInstanceCount = FilterDescription->Pins[Index].MaxGlobalInstanceCount; Descriptor->Factory.Instances[Index].MinFilterInstanceCount = FilterDescription->Pins[Index].MinFilterInstanceCount; + SrcDescriptor = (PPCPIN_DESCRIPTOR)((ULONG_PTR)SrcDescriptor + FilterDescription->PinSize); } } Descriptor->DeviceDescriptor = FilterDescription;
15 years, 2 months
1
0
0
0
[fireball] 43199: [fastfat_new] - Start implementing one of the most massive IFS driver routines - IRP_MJ_CREATE handler. Right now it just does some preliminary work, deciphers all options, prepares all variables, prints out debug stuff.
by fireball@svn.reactos.org
Author: fireball Date: Mon Sep 28 11:49:16 2009 New Revision: 43199 URL:
http://svn.reactos.org/svn/reactos?rev=43199&view=rev
Log: [fastfat_new] - Start implementing one of the most massive IFS driver routines - IRP_MJ_CREATE handler. Right now it just does some preliminary work, deciphers all options, prepares all variables, prints out debug stuff. Modified: trunk/reactos/drivers/filesystems/fastfat_new/create.c Modified: trunk/reactos/drivers/filesystems/fastfat_new/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat_new/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat_new/create.c [iso-8859-1] Mon Sep 28 11:49:16 2009 @@ -15,10 +15,177 @@ NTSTATUS NTAPI +FatiCreate(IN PFAT_IRP_CONTEXT IrpContext, + IN PIRP Irp) +{ + /* Boolean options */ + BOOLEAN CreateDirectory; + BOOLEAN SequentialOnly; + BOOLEAN NoIntermediateBuffering; + BOOLEAN OpenDirectory; + BOOLEAN IsPagingFile; + BOOLEAN OpenTargetDirectory; + BOOLEAN DirectoryFile; + BOOLEAN NonDirectoryFile; + BOOLEAN NoEaKnowledge; + BOOLEAN DeleteOnClose; + BOOLEAN TemporaryFile; + ULONG CreateDisposition; + + /* Control blocks */ + PVCB Vcb; + + /* IRP data */ + PFILE_OBJECT FileObject; + PFILE_OBJECT RelatedFO; + UNICODE_STRING FileName; + ULONG AllocationSize; + PFILE_FULL_EA_INFORMATION EaBuffer; + PACCESS_MASK DesiredAccess; + ULONG Options; + UCHAR FileAttributes; + USHORT ShareAccess; + ULONG EaLength; + + /* Misc */ + //NTSTATUS Status; + IO_STATUS_BLOCK Iosb; + PIO_STACK_LOCATION IrpSp; + + /* Get current IRP stack location */ + IrpSp = IoGetCurrentIrpStackLocation(Irp); + + DPRINT1("FatCommonCreate\n", 0 ); + DPRINT1("Irp = %08lx\n", Irp ); + DPRINT1("\t->Flags = %08lx\n", Irp->Flags ); + DPRINT1("\t->FileObject = %08lx\n", IrpSp->FileObject ); + DPRINT1("\t->RelatedFileObject = %08lx\n", IrpSp->FileObject->RelatedFileObject ); + DPRINT1("\t->FileName = %wZ\n", &IrpSp->FileObject->FileName ); + DPRINT1("\t->AllocationSize.LowPart = %08lx\n", Irp->Overlay.AllocationSize.LowPart ); + DPRINT1("\t->AllocationSize.HighPart = %08lx\n", Irp->Overlay.AllocationSize.HighPart ); + DPRINT1("\t->SystemBuffer = %08lx\n", Irp->AssociatedIrp.SystemBuffer ); + DPRINT1("\t->DesiredAccess = %08lx\n", IrpSp->Parameters.Create.SecurityContext->DesiredAccess ); + DPRINT1("\t->Options = %08lx\n", IrpSp->Parameters.Create.Options ); + DPRINT1("\t->FileAttributes = %04x\n", IrpSp->Parameters.Create.FileAttributes ); + DPRINT1("\t->ShareAccess = %04x\n", IrpSp->Parameters.Create.ShareAccess ); + DPRINT1("\t->EaLength = %08lx\n", IrpSp->Parameters.Create.EaLength ); + + /* Apply a special hack for Win32, idea taken from FASTFAT reference driver from WDK */ + if ((IrpSp->FileObject->FileName.Length > sizeof(WCHAR)) && + (IrpSp->FileObject->FileName.Buffer[1] == L'\\') && + (IrpSp->FileObject->FileName.Buffer[0] == L'\\')) + { + /* Remove two leading slashes */ + IrpSp->FileObject->FileName.Length -= sizeof(WCHAR); + + RtlMoveMemory(&IrpSp->FileObject->FileName.Buffer[0], + &IrpSp->FileObject->FileName.Buffer[1], + IrpSp->FileObject->FileName.Length ); + + /* If there are two leading slashes again, exit */ + if ((IrpSp->FileObject->FileName.Length > sizeof(WCHAR)) && + (IrpSp->FileObject->FileName.Buffer[1] == L'\\') && + (IrpSp->FileObject->FileName.Buffer[0] == L'\\')) + { + FatCompleteRequest( IrpContext, Irp, STATUS_OBJECT_NAME_INVALID ); + + DPRINT1("FatiCreate: STATUS_OBJECT_NAME_INVALID\n"); + return STATUS_OBJECT_NAME_INVALID; + } + } + + /* Make sure we have SecurityContext */ + ASSERT(IrpSp->Parameters.Create.SecurityContext != NULL); + + /* Get necessary data out of IRP */ + FileObject = IrpSp->FileObject; + FileName = FileObject->FileName; + RelatedFO = FileObject->RelatedFileObject; + AllocationSize = Irp->Overlay.AllocationSize.LowPart; + EaBuffer = Irp->AssociatedIrp.SystemBuffer; + DesiredAccess = &IrpSp->Parameters.Create.SecurityContext->DesiredAccess; + Options = IrpSp->Parameters.Create.Options; + FileAttributes = (UCHAR)(IrpSp->Parameters.Create.FileAttributes & ~FILE_ATTRIBUTE_NORMAL); + ShareAccess = IrpSp->Parameters.Create.ShareAccess; + EaLength = IrpSp->Parameters.Create.EaLength; + + /* Set VPB to related object's VPB if it exists */ + if (RelatedFO) + FileObject->Vpb = RelatedFO->Vpb; + + /* Prepare file attributes mask */ + FileAttributes &= (FILE_ATTRIBUTE_READONLY | + FILE_ATTRIBUTE_HIDDEN | + FILE_ATTRIBUTE_SYSTEM | + FILE_ATTRIBUTE_ARCHIVE); + + /* Get the volume control object */ + Vcb = &((PVOLUME_DEVICE_OBJECT)IrpSp->DeviceObject)->Vcb; + + /* Get options */ + DirectoryFile = BooleanFlagOn(Options, FILE_DIRECTORY_FILE); + NonDirectoryFile = BooleanFlagOn(Options, FILE_NON_DIRECTORY_FILE); + SequentialOnly = BooleanFlagOn(Options, FILE_SEQUENTIAL_ONLY); + NoIntermediateBuffering = BooleanFlagOn(Options, FILE_NO_INTERMEDIATE_BUFFERING); + NoEaKnowledge = BooleanFlagOn(Options, FILE_NO_EA_KNOWLEDGE); + DeleteOnClose = BooleanFlagOn(Options, FILE_DELETE_ON_CLOSE); + TemporaryFile = BooleanFlagOn(IrpSp->Parameters.Create.FileAttributes, + FILE_ATTRIBUTE_TEMPORARY ); + IsPagingFile = BooleanFlagOn(IrpSp->Flags, SL_OPEN_PAGING_FILE); + OpenTargetDirectory = BooleanFlagOn(IrpSp->Flags, SL_OPEN_TARGET_DIRECTORY); + + /* Calculate create disposition */ + CreateDisposition = (Options >> 24) & 0x000000ff; + + /* Get Create/Open directory flags based on it */ + CreateDirectory = (BOOLEAN)(DirectoryFile && + ((CreateDisposition == FILE_CREATE) || + (CreateDisposition == FILE_OPEN_IF))); + + OpenDirectory = (BOOLEAN)(DirectoryFile && + ((CreateDisposition == FILE_OPEN) || + (CreateDisposition == FILE_OPEN_IF))); + + //return Iosb.Status; + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI FatCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp) { + PFAT_IRP_CONTEXT IrpContext; + NTSTATUS Status; + //PVOLUME_DEVICE_OBJECT VolumeDO = (PVOLUME_DEVICE_OBJECT)DeviceObject; + DPRINT1("FatCreate()\n"); - return STATUS_NOT_IMPLEMENTED; + + /* If it's called with our Disk FS device object - it's always open */ + // TODO: Add check for CDROM FS device object + if (DeviceObject == FatGlobalData.DiskDeviceObject) + { + /* Complete the request and return success */ + Irp->IoStatus.Status = STATUS_SUCCESS; + Irp->IoStatus.Information = FILE_OPENED; + + IoCompleteRequest(Irp, IO_DISK_INCREMENT); + + return STATUS_SUCCESS; + } + + /* Enter FsRtl critical region */ + FsRtlEnterFileSystem(); + + /* Build an irp context */ + IrpContext = FatBuildIrpContext(Irp, TRUE); + + /* Call internal function */ + Status = FatiCreate(IrpContext, Irp); + + /* Leave FsRtl critical region */ + FsRtlExitFileSystem(); + + return Status; } /* EOF */
15 years, 2 months
1
0
0
0
[hpoussin] 43198: bootvid.dll is in system32, not system32\drivers
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Sep 28 11:36:02 2009 New Revision: 43198 URL:
http://svn.reactos.org/svn/reactos?rev=43198&view=rev
Log: bootvid.dll is in system32, not system32\drivers Modified: trunk/reactos/boot/bootdata/txtsetup.sif Modified: trunk/reactos/boot/bootdata/txtsetup.sif URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/txtsetup.sif…
============================================================================== --- trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] Mon Sep 28 11:36:02 2009 @@ -16,7 +16,7 @@ uniata.sys=,,,,,,x,,,,,,4 buslogic.sys=,,,,,,x,,,,,,4 blue.sys=,,,,,,x,,,,,,4 -bootvid.dll=,,,,,,,,,,,,4 +bootvid.dll=,,,,,,,,,,,,2 c_437.nls=,,,,,,,,,,,,2 c_1252.nls=,,,,,,,,,,,,2 cdfs.sys=,,,,,,x,,,,,,4
15 years, 2 months
1
0
0
0
[hpoussin] 43197: Fix debug message
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Sep 28 11:30:27 2009 New Revision: 43197 URL:
http://svn.reactos.org/svn/reactos?rev=43197&view=rev
Log: Fix debug message Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] Mon Sep 28 11:30:27 2009 @@ -921,7 +921,7 @@ // // Return number of disks // - DPRINTM(DPRINT_HWDETECT, "Retrieving %lu INT13 disks\\0\n"); + DPRINTM(DPRINT_HWDETECT, "Retrieving %lu INT13 disks\\0\n", DiskCount); return DiskCount; };
15 years, 2 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
27
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
Results per page:
10
25
50
100
200