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
2025
April
March
February
January
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
May 2006
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 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
19 participants
377 discussions
Start a n
N
ew thread
[ekohl] 21816: Simplified the access to FCBs and CCBs.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun May 7 11:33:40 2006 New Revision: 21816 URL:
http://svn.reactos.ru/svn/reactos?rev=21816&view=rev
Log: Simplified the access to FCBs and CCBs. Modified: trunk/reactos/drivers/filesystems/ms/create.c trunk/reactos/drivers/filesystems/ms/finfo.c trunk/reactos/drivers/filesystems/ms/fsctrl.c Modified: trunk/reactos/drivers/filesystems/ms/create.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/crea…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/create.c (original) +++ trunk/reactos/drivers/filesystems/ms/create.c Sun May 7 11:33:40 2006 @@ -79,7 +79,6 @@ } Fcb = current; - DPRINT1("Fcb: %p\n", Fcb); KeAcquireSpinLock(&Fcb->CcbListLock, &oldIrql); InsertTailList(&Fcb->CcbListHead, &Ccb->CcbListEntry); Modified: trunk/reactos/drivers/filesystems/ms/finfo.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/finf…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/finfo.c (original) +++ trunk/reactos/drivers/filesystems/ms/finfo.c Sun May 7 11:33:40 2006 @@ -18,17 +18,14 @@ /* FUNCTIONS *****************************************************************/ static NTSTATUS -MsfsQueryMailslotInformation(PMSFS_CCB Ccb, +MsfsQueryMailslotInformation(PMSFS_FCB Fcb, PFILE_MAILSLOT_QUERY_INFORMATION Buffer, PULONG BufferLength) { - PMSFS_FCB Fcb; KIRQL oldIrql; if (*BufferLength < sizeof(FILE_MAILSLOT_QUERY_INFORMATION)) return(STATUS_BUFFER_OVERFLOW); - - Fcb = Ccb->Fcb; Buffer->MaximumMessageSize = Fcb->MaxMessageSize; Buffer->ReadTimeout = Fcb->TimeOut; @@ -53,14 +50,14 @@ static NTSTATUS -MsfsSetMailslotInformation(PMSFS_CCB Ccb, +MsfsSetMailslotInformation(PMSFS_FCB Fcb, PFILE_MAILSLOT_SET_INFORMATION Buffer, PULONG BufferLength) { if (*BufferLength < sizeof(FILE_MAILSLOT_SET_INFORMATION)) return(STATUS_BUFFER_OVERFLOW); - Ccb->Fcb->TimeOut = *Buffer->ReadTimeout; + Fcb->TimeOut = *Buffer->ReadTimeout; return(STATUS_SUCCESS); } @@ -86,13 +83,13 @@ FileInformationClass = IoStack->Parameters.QueryFile.FileInformationClass; DeviceExtension = DeviceObject->DeviceExtension; FileObject = IoStack->FileObject; + Fcb = (PMSFS_FCB)FileObject->FsContext; Ccb = (PMSFS_CCB)FileObject->FsContext2; - Fcb = Ccb->Fcb; DPRINT("Mailslot name: %wZ\n", &Fcb->Name); /* querying information is not permitted on client side */ - if (Ccb->Fcb->ServerCcb != Ccb) + if (Fcb->ServerCcb != Ccb) { Status = STATUS_ACCESS_DENIED; @@ -111,7 +108,7 @@ switch (FileInformationClass) { case FileMailslotQueryInformation: - Status = MsfsQueryMailslotInformation(Ccb, + Status = MsfsQueryMailslotInformation(Fcb, SystemBuffer, &BufferLength); break; @@ -150,13 +147,13 @@ IoStack = IoGetCurrentIrpStackLocation (Irp); FileInformationClass = IoStack->Parameters.QueryFile.FileInformationClass; FileObject = IoStack->FileObject; + Fcb = (PMSFS_FCB)FileObject->FsContext; Ccb = (PMSFS_CCB)FileObject->FsContext2; - Fcb = Ccb->Fcb; DPRINT("Mailslot name: %wZ\n", &Fcb->Name); /* setting information is not permitted on client side */ - if (Ccb->Fcb->ServerCcb != Ccb) + if (Fcb->ServerCcb != Ccb) { Status = STATUS_ACCESS_DENIED; @@ -178,7 +175,7 @@ switch (FileInformationClass) { case FileMailslotSetInformation: - Status = MsfsSetMailslotInformation(Ccb, + Status = MsfsSetMailslotInformation(Fcb, SystemBuffer, &BufferLength); break; Modified: trunk/reactos/drivers/filesystems/ms/fsctrl.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/fsct…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/fsctrl.c (original) +++ trunk/reactos/drivers/filesystems/ms/fsctrl.c Sun May 7 11:33:40 2006 @@ -31,8 +31,8 @@ IoStack = IoGetCurrentIrpStackLocation(Irp); FileObject = IoStack->FileObject; + Fcb = FileObject->FsContext; Ccb = FileObject->FsContext2; - Fcb = Ccb->Fcb; DPRINT1("Mailslot name: %wZ\n", &Fcb->Name);
18 years, 11 months
1
0
0
0
[ekohl] 21815: The MSFS_MAILSLOT struct is actually an FCB (File Control Block). Rename it accordingly and store pointers to it in FileObject->FsContext.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun May 7 00:04:30 2006 New Revision: 21815 URL:
http://svn.reactos.ru/svn/reactos?rev=21815&view=rev
Log: The MSFS_MAILSLOT struct is actually an FCB (File Control Block). Rename it accordingly and store pointers to it in FileObject->FsContext. Modified: trunk/reactos/drivers/filesystems/ms/create.c trunk/reactos/drivers/filesystems/ms/finfo.c trunk/reactos/drivers/filesystems/ms/fsctrl.c trunk/reactos/drivers/filesystems/ms/msfs.c trunk/reactos/drivers/filesystems/ms/msfs.h trunk/reactos/drivers/filesystems/ms/rw.c Modified: trunk/reactos/drivers/filesystems/ms/create.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/crea…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/create.c (original) +++ trunk/reactos/drivers/filesystems/ms/create.c Sun May 7 00:04:30 2006 @@ -24,9 +24,9 @@ PIO_STACK_LOCATION IoStack; PFILE_OBJECT FileObject; PMSFS_DEVICE_EXTENSION DeviceExtension; - PMSFS_MAILSLOT Mailslot; + PMSFS_FCB Fcb; PMSFS_CCB Ccb; - PMSFS_MAILSLOT current = NULL; + PMSFS_FCB current = NULL; PLIST_ENTRY current_entry; KIRQL oldIrql; @@ -49,13 +49,13 @@ return(STATUS_NO_MEMORY); } - KeLockMutex(&DeviceExtension->MailslotListLock); - current_entry = DeviceExtension->MailslotListHead.Flink; - while (current_entry != &DeviceExtension->MailslotListHead) + KeLockMutex(&DeviceExtension->FcbListLock); + current_entry = DeviceExtension->FcbListHead.Flink; + while (current_entry != &DeviceExtension->FcbListHead) { current = CONTAINING_RECORD(current_entry, - MSFS_MAILSLOT, - MailslotListEntry); + MSFS_FCB, + FcbListEntry); if (!RtlCompareUnicodeString(&FileObject->FileName, ¤t->Name, TRUE)) { @@ -65,10 +65,10 @@ current_entry = current_entry->Flink; } - if (current_entry == &DeviceExtension->MailslotListHead) + if (current_entry == &DeviceExtension->FcbListHead) { ExFreePool(Ccb); - KeUnlockMutex(&DeviceExtension->MailslotListLock); + KeUnlockMutex(&DeviceExtension->FcbListLock); Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; Irp->IoStatus.Information = 0; @@ -78,18 +78,20 @@ return(STATUS_UNSUCCESSFUL); } - Mailslot = current; - - KeAcquireSpinLock(&Mailslot->CcbListLock, &oldIrql); - InsertTailList(&Mailslot->CcbListHead, &Ccb->CcbListEntry); - KeReleaseSpinLock(&Mailslot->CcbListLock, oldIrql); - - Mailslot->ReferenceCount++; - - Ccb->Mailslot = Mailslot; - - KeUnlockMutex(&DeviceExtension->MailslotListLock); - + Fcb = current; + DPRINT1("Fcb: %p\n", Fcb); + + KeAcquireSpinLock(&Fcb->CcbListLock, &oldIrql); + InsertTailList(&Fcb->CcbListHead, &Ccb->CcbListEntry); + KeReleaseSpinLock(&Fcb->CcbListLock, oldIrql); + + Fcb->ReferenceCount++; + + Ccb->Fcb = Fcb; + + KeUnlockMutex(&DeviceExtension->FcbListLock); + + FileObject->FsContext = Fcb; FileObject->FsContext2 = Ccb; FileObject->Flags |= FO_MAILSLOT; @@ -109,11 +111,11 @@ PEXTENDED_IO_STACK_LOCATION IoStack; PFILE_OBJECT FileObject; PMSFS_DEVICE_EXTENSION DeviceExtension; - PMSFS_MAILSLOT Mailslot; + PMSFS_FCB Fcb; PMSFS_CCB Ccb; KIRQL oldIrql; PLIST_ENTRY current_entry; - PMSFS_MAILSLOT current; + PMSFS_FCB current; PMAILSLOT_CREATE_PARAMETERS Buffer; DPRINT("MsfsCreateMailslot(DeviceObject %p Irp %p)\n", DeviceObject, Irp); @@ -125,8 +127,8 @@ DPRINT("Mailslot name: %wZ\n", &FileObject->FileName); - Mailslot = ExAllocatePool(NonPagedPool, sizeof(MSFS_MAILSLOT)); - if (Mailslot == NULL) + Fcb = ExAllocatePool(NonPagedPool, sizeof(MSFS_FCB)); + if (Fcb == NULL) { Irp->IoStatus.Status = STATUS_NO_MEMORY; Irp->IoStatus.Information = 0; @@ -136,12 +138,12 @@ return(STATUS_NO_MEMORY); } - Mailslot->Name.Length = FileObject->FileName.Length; - Mailslot->Name.MaximumLength = Mailslot->Name.Length + sizeof(UNICODE_NULL); - Mailslot->Name.Buffer = ExAllocatePool(NonPagedPool, Mailslot->Name.MaximumLength); - if (Mailslot->Name.Buffer == NULL) - { - ExFreePool(Mailslot); + Fcb->Name.Length = FileObject->FileName.Length; + Fcb->Name.MaximumLength = Fcb->Name.Length + sizeof(UNICODE_NULL); + Fcb->Name.Buffer = ExAllocatePool(NonPagedPool, Fcb->Name.MaximumLength); + if (Fcb->Name.Buffer == NULL) + { + ExFreePool(Fcb); Irp->IoStatus.Status = STATUS_NO_MEMORY; Irp->IoStatus.Information = 0; @@ -151,12 +153,13 @@ return(STATUS_NO_MEMORY); } - RtlCopyUnicodeString(&Mailslot->Name, &FileObject->FileName); + RtlCopyUnicodeString(&Fcb->Name, &FileObject->FileName); Ccb = ExAllocatePool(NonPagedPool, sizeof(MSFS_CCB)); if (Ccb == NULL) { - ExFreePool(Mailslot); + ExFreePool(Fcb->Name.Buffer); + ExFreePool(Fcb); Irp->IoStatus.Status = STATUS_NO_MEMORY; Irp->IoStatus.Information = 0; @@ -166,29 +169,29 @@ return(STATUS_NO_MEMORY); } - Mailslot->ReferenceCount = 0; - InitializeListHead(&Mailslot->CcbListHead); - KeInitializeSpinLock(&Mailslot->CcbListLock); - - Mailslot->MaxMessageSize = Buffer->MaximumMessageSize; - Mailslot->MessageCount = 0; - Mailslot->TimeOut = Buffer->ReadTimeout; - KeInitializeEvent(&Mailslot->MessageEvent, + Fcb->ReferenceCount = 0; + InitializeListHead(&Fcb->CcbListHead); + KeInitializeSpinLock(&Fcb->CcbListLock); + + Fcb->MaxMessageSize = Buffer->MaximumMessageSize; + Fcb->MessageCount = 0; + Fcb->TimeOut = Buffer->ReadTimeout; + KeInitializeEvent(&Fcb->MessageEvent, NotificationEvent, FALSE); - InitializeListHead(&Mailslot->MessageListHead); - KeInitializeSpinLock(&Mailslot->MessageListLock); - - KeLockMutex(&DeviceExtension->MailslotListLock); - current_entry = DeviceExtension->MailslotListHead.Flink; - while (current_entry != &DeviceExtension->MailslotListHead) + InitializeListHead(&Fcb->MessageListHead); + KeInitializeSpinLock(&Fcb->MessageListLock); + + KeLockMutex(&DeviceExtension->FcbListLock); + current_entry = DeviceExtension->FcbListHead.Flink; + while (current_entry != &DeviceExtension->FcbListHead) { current = CONTAINING_RECORD(current_entry, - MSFS_MAILSLOT, - MailslotListEntry); - - if (!RtlCompareUnicodeString(&Mailslot->Name, ¤t->Name, TRUE)) + MSFS_FCB, + FcbListEntry); + + if (!RtlCompareUnicodeString(&Fcb->Name, ¤t->Name, TRUE)) { break; } @@ -196,29 +199,30 @@ current_entry = current_entry->Flink; } - if (current_entry != &DeviceExtension->MailslotListHead) - { - RtlFreeUnicodeString(&Mailslot->Name); - ExFreePool(Mailslot); - - Mailslot = current; + if (current_entry != &DeviceExtension->FcbListHead) + { + ExFreePool(Fcb->Name.Buffer); + ExFreePool(Fcb); + + Fcb = current; } else { - InsertTailList(&DeviceExtension->MailslotListHead, - &Mailslot->MailslotListEntry); - } - - KeAcquireSpinLock(&Mailslot->CcbListLock, &oldIrql); - InsertTailList(&Mailslot->CcbListHead, &Ccb->CcbListEntry); - KeReleaseSpinLock(&Mailslot->CcbListLock, oldIrql); - - Mailslot->ReferenceCount++; - Mailslot->ServerCcb = Ccb; - Ccb->Mailslot = Mailslot; - - KeUnlockMutex(&DeviceExtension->MailslotListLock); - + InsertTailList(&DeviceExtension->FcbListHead, + &Fcb->FcbListEntry); + } + + KeAcquireSpinLock(&Fcb->CcbListLock, &oldIrql); + InsertTailList(&Fcb->CcbListHead, &Ccb->CcbListEntry); + KeReleaseSpinLock(&Fcb->CcbListLock, oldIrql); + + Fcb->ReferenceCount++; + Fcb->ServerCcb = Ccb; + Ccb->Fcb = Fcb; + + KeUnlockMutex(&DeviceExtension->FcbListLock); + + FileObject->FsContext = Fcb; FileObject->FsContext2 = Ccb; FileObject->Flags |= FO_MAILSLOT; @@ -238,7 +242,7 @@ PIO_STACK_LOCATION IoStack; PFILE_OBJECT FileObject; PMSFS_DEVICE_EXTENSION DeviceExtension; - PMSFS_MAILSLOT Mailslot; + PMSFS_FCB Fcb; PMSFS_CCB Ccb; PMSFS_MESSAGE Message; KIRQL oldIrql; @@ -249,11 +253,11 @@ DeviceExtension = DeviceObject->DeviceExtension; FileObject = IoStack->FileObject; - KeLockMutex(&DeviceExtension->MailslotListLock); - - if (DeviceExtension->MailslotListHead.Flink == &DeviceExtension->MailslotListHead) - { - KeUnlockMutex(&DeviceExtension->MailslotListLock); + KeLockMutex(&DeviceExtension->FcbListLock); + + if (DeviceExtension->FcbListHead.Flink == &DeviceExtension->FcbListHead) + { + KeUnlockMutex(&DeviceExtension->FcbListLock); Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = 0; @@ -263,46 +267,46 @@ return(STATUS_SUCCESS); } + Fcb = FileObject->FsContext; Ccb = FileObject->FsContext2; - Mailslot = Ccb->Mailslot; - - DPRINT("Mailslot name: %wZ\n", &Mailslot->Name); - - Mailslot->ReferenceCount--; - if (Mailslot->ServerCcb == Ccb) + + DPRINT("Mailslot name: %wZ\n", &Fcb->Name); + + Fcb->ReferenceCount--; + if (Fcb->ServerCcb == Ccb) { /* delete all messages from message-list */ - KeAcquireSpinLock(&Mailslot->MessageListLock, &oldIrql); - - while (Mailslot->MessageListHead.Flink != &Mailslot->MessageListHead) + KeAcquireSpinLock(&Fcb->MessageListLock, &oldIrql); + + while (Fcb->MessageListHead.Flink != &Fcb->MessageListHead) { - Message = CONTAINING_RECORD(Mailslot->MessageListHead.Flink, + Message = CONTAINING_RECORD(Fcb->MessageListHead.Flink, MSFS_MESSAGE, MessageListEntry); - RemoveEntryList(Mailslot->MessageListHead.Flink); + RemoveEntryList(Fcb->MessageListHead.Flink); ExFreePool(Message); } - Mailslot->MessageCount = 0; - - KeReleaseSpinLock(&Mailslot->MessageListLock, oldIrql); - Mailslot->ServerCcb = NULL; - } - - KeAcquireSpinLock(&Mailslot->CcbListLock, &oldIrql); + Fcb->MessageCount = 0; + + KeReleaseSpinLock(&Fcb->MessageListLock, oldIrql); + Fcb->ServerCcb = NULL; + } + + KeAcquireSpinLock(&Fcb->CcbListLock, &oldIrql); RemoveEntryList(&Ccb->CcbListEntry); - KeReleaseSpinLock(&Mailslot->CcbListLock, oldIrql); + KeReleaseSpinLock(&Fcb->CcbListLock, oldIrql); ExFreePool(Ccb); FileObject->FsContext2 = NULL; - if (Mailslot->ReferenceCount == 0) + if (Fcb->ReferenceCount == 0) { DPRINT1("ReferenceCount == 0: Deleting mailslot data\n"); - RtlFreeUnicodeString(&Mailslot->Name); - RemoveEntryList(&Mailslot->MailslotListEntry); - ExFreePool(Mailslot); - } - - KeUnlockMutex(&DeviceExtension->MailslotListLock); + RemoveEntryList(&Fcb->FcbListEntry); + ExFreePool(Fcb->Name.Buffer); + ExFreePool(Fcb); + } + + KeUnlockMutex(&DeviceExtension->FcbListLock); Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = 0; Modified: trunk/reactos/drivers/filesystems/ms/finfo.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/finf…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/finfo.c (original) +++ trunk/reactos/drivers/filesystems/ms/finfo.c Sun May 7 00:04:30 2006 @@ -22,20 +22,20 @@ PFILE_MAILSLOT_QUERY_INFORMATION Buffer, PULONG BufferLength) { - PMSFS_MAILSLOT Mailslot; + PMSFS_FCB Fcb; KIRQL oldIrql; if (*BufferLength < sizeof(FILE_MAILSLOT_QUERY_INFORMATION)) return(STATUS_BUFFER_OVERFLOW); - Mailslot = Ccb->Mailslot; + Fcb = Ccb->Fcb; - Buffer->MaximumMessageSize = Mailslot->MaxMessageSize; - Buffer->ReadTimeout = Mailslot->TimeOut; + Buffer->MaximumMessageSize = Fcb->MaxMessageSize; + Buffer->ReadTimeout = Fcb->TimeOut; - KeAcquireSpinLock(&Mailslot->MessageListLock, &oldIrql); - Buffer->MessagesAvailable = Mailslot->MessageCount; - if (Mailslot->MessageCount == 0) + KeAcquireSpinLock(&Fcb->MessageListLock, &oldIrql); + Buffer->MessagesAvailable = Fcb->MessageCount; + if (Fcb->MessageCount == 0) { Buffer->NextMessageSize = MAILSLOT_NO_MESSAGE; } @@ -44,7 +44,7 @@ /* FIXME: read size of first message (head) */ Buffer->NextMessageSize = 0; } - KeReleaseSpinLock(&Mailslot->MessageListLock, oldIrql); + KeReleaseSpinLock(&Fcb->MessageListLock, oldIrql); *BufferLength -= sizeof(FILE_MAILSLOT_QUERY_INFORMATION); @@ -60,7 +60,7 @@ if (*BufferLength < sizeof(FILE_MAILSLOT_SET_INFORMATION)) return(STATUS_BUFFER_OVERFLOW); - Ccb->Mailslot->TimeOut = *Buffer->ReadTimeout; + Ccb->Fcb->TimeOut = *Buffer->ReadTimeout; return(STATUS_SUCCESS); } @@ -74,8 +74,8 @@ FILE_INFORMATION_CLASS FileInformationClass; PFILE_OBJECT FileObject; PMSFS_DEVICE_EXTENSION DeviceExtension; + PMSFS_FCB Fcb; PMSFS_CCB Ccb; - PMSFS_MAILSLOT Mailslot; PVOID SystemBuffer; ULONG BufferLength; NTSTATUS Status; @@ -87,12 +87,12 @@ DeviceExtension = DeviceObject->DeviceExtension; FileObject = IoStack->FileObject; Ccb = (PMSFS_CCB)FileObject->FsContext2; - Mailslot = Ccb->Mailslot; + Fcb = Ccb->Fcb; - DPRINT("Mailslot name: %wZ\n", &Mailslot->Name); + DPRINT("Mailslot name: %wZ\n", &Fcb->Name); /* querying information is not permitted on client side */ - if (Ccb->Mailslot->ServerCcb != Ccb) + if (Ccb->Fcb->ServerCcb != Ccb) { Status = STATUS_ACCESS_DENIED; @@ -139,8 +139,8 @@ PIO_STACK_LOCATION IoStack; FILE_INFORMATION_CLASS FileInformationClass; PFILE_OBJECT FileObject; + PMSFS_FCB Fcb; PMSFS_CCB Ccb; - PMSFS_MAILSLOT Mailslot; PVOID SystemBuffer; ULONG BufferLength; NTSTATUS Status; @@ -151,12 +151,12 @@ FileInformationClass = IoStack->Parameters.QueryFile.FileInformationClass; FileObject = IoStack->FileObject; Ccb = (PMSFS_CCB)FileObject->FsContext2; - Mailslot = Ccb->Mailslot; + Fcb = Ccb->Fcb; - DPRINT("Mailslot name: %wZ\n", &Mailslot->Name); + DPRINT("Mailslot name: %wZ\n", &Fcb->Name); /* setting information is not permitted on client side */ - if (Ccb->Mailslot->ServerCcb != Ccb) + if (Ccb->Fcb->ServerCcb != Ccb) { Status = STATUS_ACCESS_DENIED; Modified: trunk/reactos/drivers/filesystems/ms/fsctrl.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/fsct…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/fsctrl.c (original) +++ trunk/reactos/drivers/filesystems/ms/fsctrl.c Sun May 7 00:04:30 2006 @@ -23,7 +23,7 @@ { PIO_STACK_LOCATION IoStack; PFILE_OBJECT FileObject; - PMSFS_MAILSLOT Mailslot; + PMSFS_FCB Fcb; PMSFS_CCB Ccb; NTSTATUS Status; @@ -32,9 +32,9 @@ IoStack = IoGetCurrentIrpStackLocation(Irp); FileObject = IoStack->FileObject; Ccb = FileObject->FsContext2; - Mailslot = Ccb->Mailslot; + Fcb = Ccb->Fcb; - DPRINT1("Mailslot name: %wZ\n", &Mailslot->Name); + DPRINT1("Mailslot name: %wZ\n", &Fcb->Name); switch (IoStack->Parameters.FileSystemControl.FsControlCode) { Modified: trunk/reactos/drivers/filesystems/ms/msfs.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/msfs…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/msfs.c (original) +++ trunk/reactos/drivers/filesystems/ms/msfs.c Sun May 7 00:04:30 2006 @@ -71,8 +71,8 @@ /* initialize device extension */ DeviceExtension = DeviceObject->DeviceExtension; - InitializeListHead(&DeviceExtension->MailslotListHead); - KeInitializeMutex(&DeviceExtension->MailslotListLock, + InitializeListHead(&DeviceExtension->FcbListHead); + KeInitializeMutex(&DeviceExtension->FcbListLock, 0); return(STATUS_SUCCESS); Modified: trunk/reactos/drivers/filesystems/ms/msfs.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/msfs…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/msfs.h (original) +++ trunk/reactos/drivers/filesystems/ms/msfs.h Sun May 7 00:04:30 2006 @@ -22,14 +22,14 @@ typedef struct _MSFS_DEVICE_EXTENSION { - LIST_ENTRY MailslotListHead; - KMUTEX MailslotListLock; + LIST_ENTRY FcbListHead; + KMUTEX FcbListLock; } MSFS_DEVICE_EXTENSION, *PMSFS_DEVICE_EXTENSION; -typedef struct _MSFS_MAILSLOT +typedef struct _MSFS_FCB { UNICODE_STRING Name; - LIST_ENTRY MailslotListEntry; + LIST_ENTRY FcbListEntry; KSPIN_LOCK CcbListLock; LIST_ENTRY CcbListHead; struct _MSFS_CCB *ServerCcb; @@ -40,12 +40,12 @@ ULONG MessageCount; KSPIN_LOCK MessageListLock; LIST_ENTRY MessageListHead; -} MSFS_MAILSLOT, *PMSFS_MAILSLOT; +} MSFS_FCB, *PMSFS_FCB; typedef struct _MSFS_CCB { LIST_ENTRY CcbListEntry; - PMSFS_MAILSLOT Mailslot; + PMSFS_FCB Fcb; } MSFS_CCB, *PMSFS_CCB; typedef struct _MSFS_MESSAGE Modified: trunk/reactos/drivers/filesystems/ms/rw.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/rw.c…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/rw.c (original) +++ trunk/reactos/drivers/filesystems/ms/rw.c Sun May 7 00:04:30 2006 @@ -23,7 +23,7 @@ { PIO_STACK_LOCATION IoStack; PFILE_OBJECT FileObject; - PMSFS_MAILSLOT Mailslot; + PMSFS_FCB Fcb; PMSFS_CCB Ccb; PMSFS_MESSAGE Message; KIRQL oldIrql; @@ -36,13 +36,13 @@ IoStack = IoGetCurrentIrpStackLocation (Irp); FileObject = IoStack->FileObject; + Fcb = (PMSFS_FCB)FileObject->FsContext; Ccb = (PMSFS_CCB)FileObject->FsContext2; - Mailslot = Ccb->Mailslot; - DPRINT("MailslotName: %wZ\n", &Mailslot->Name); + DPRINT("MailslotName: %wZ\n", &Fcb->Name); /* reading is not permitted on client side */ - if (Ccb->Mailslot->ServerCcb != Ccb) + if (Fcb->ServerCcb != Ccb) { Irp->IoStatus.Status = STATUS_ACCESS_DENIED; Irp->IoStatus.Information = 0; @@ -58,29 +58,29 @@ else Buffer = Irp->UserBuffer; - Status = KeWaitForSingleObject(&Mailslot->MessageEvent, + Status = KeWaitForSingleObject(&Fcb->MessageEvent, UserRequest, KernelMode, FALSE, NULL); /* FIXME: handle timeout */ - if ((NT_SUCCESS(Status)) && (Mailslot->MessageCount > 0)) + if ((NT_SUCCESS(Status)) && (Fcb->MessageCount > 0)) { /* copy current message into buffer */ - Message = CONTAINING_RECORD(Mailslot->MessageListHead.Flink, + Message = CONTAINING_RECORD(Fcb->MessageListHead.Flink, MSFS_MESSAGE, MessageListEntry); memcpy(Buffer, &Message->Buffer, min(Message->Size,Length)); LengthRead = Message->Size; - KeAcquireSpinLock(&Mailslot->MessageListLock, &oldIrql); - RemoveHeadList(&Mailslot->MessageListHead); - KeReleaseSpinLock(&Mailslot->MessageListLock, oldIrql); + KeAcquireSpinLock(&Fcb->MessageListLock, &oldIrql); + RemoveHeadList(&Fcb->MessageListHead); + KeReleaseSpinLock(&Fcb->MessageListLock, oldIrql); ExFreePool(Message); - Mailslot->MessageCount--; - if (Mailslot->MessageCount == 0) + Fcb->MessageCount--; + if (Fcb->MessageCount == 0) { - KeClearEvent(&Mailslot->MessageEvent); + KeClearEvent(&Fcb->MessageEvent); } } @@ -99,7 +99,7 @@ { PIO_STACK_LOCATION IoStack; PFILE_OBJECT FileObject; - PMSFS_MAILSLOT Mailslot; + PMSFS_FCB Fcb; PMSFS_CCB Ccb; PMSFS_MESSAGE Message; KIRQL oldIrql; @@ -110,13 +110,13 @@ IoStack = IoGetCurrentIrpStackLocation (Irp); FileObject = IoStack->FileObject; + Fcb = (PMSFS_FCB)FileObject->FsContext; Ccb = (PMSFS_CCB)FileObject->FsContext2; - Mailslot = Ccb->Mailslot; - DPRINT("MailslotName: %wZ\n", &Mailslot->Name); + DPRINT("MailslotName: %wZ\n", &Fcb->Name); /* writing is not permitted on server side */ - if (Ccb->Mailslot->ServerCcb == Ccb) + if (Fcb->ServerCcb == Ccb) { Irp->IoStatus.Status = STATUS_ACCESS_DENIED; Irp->IoStatus.Information = 0; @@ -150,14 +150,14 @@ Message->Size = Length; memcpy(&Message->Buffer, Buffer, Length); - KeAcquireSpinLock(&Mailslot->MessageListLock, &oldIrql); - InsertTailList(&Mailslot->MessageListHead, &Message->MessageListEntry); - KeReleaseSpinLock(&Mailslot->MessageListLock, oldIrql); + KeAcquireSpinLock(&Fcb->MessageListLock, &oldIrql); + InsertTailList(&Fcb->MessageListHead, &Message->MessageListEntry); + KeReleaseSpinLock(&Fcb->MessageListLock, oldIrql); - Mailslot->MessageCount++; - if (Mailslot->MessageCount == 1) + Fcb->MessageCount++; + if (Fcb->MessageCount == 1) { - KeSetEvent(&Mailslot->MessageEvent, + KeSetEvent(&Fcb->MessageEvent, 0, FALSE); }
18 years, 11 months
1
0
0
0
[ekohl] 21814: Set direct io flag of the device object.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat May 6 19:39:42 2006 New Revision: 21814 URL:
http://svn.reactos.ru/svn/reactos?rev=21814&view=rev
Log: Set direct io flag of the device object. Modified: trunk/reactos/drivers/filesystems/ms/msfs.c Modified: trunk/reactos/drivers/filesystems/ms/msfs.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/msfs…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/msfs.c (original) +++ trunk/reactos/drivers/filesystems/ms/msfs.c Sat May 6 19:39:42 2006 @@ -66,6 +66,9 @@ return(Status); } + /* initialize the device object */ + DeviceObject->Flags = DO_DIRECT_IO; + /* initialize device extension */ DeviceExtension = DeviceObject->DeviceExtension; InitializeListHead(&DeviceExtension->MailslotListHead);
18 years, 11 months
1
0
0
0
[ekohl] 21813: The MSFS_FCB struct is actually a CCB (Context Control Block) instead of an FCB (File Control Block). Rename it accordingly and store pointers to it in FileObject->FsContext2 instead of FileObject->FsContext.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat May 6 19:37:40 2006 New Revision: 21813 URL:
http://svn.reactos.ru/svn/reactos?rev=21813&view=rev
Log: The MSFS_FCB struct is actually a CCB (Context Control Block) instead of an FCB (File Control Block). Rename it accordingly and store pointers to it in FileObject->FsContext2 instead of FileObject->FsContext. Modified: trunk/reactos/drivers/filesystems/ms/create.c trunk/reactos/drivers/filesystems/ms/finfo.c trunk/reactos/drivers/filesystems/ms/fsctrl.c trunk/reactos/drivers/filesystems/ms/msfs.h trunk/reactos/drivers/filesystems/ms/rw.c Modified: trunk/reactos/drivers/filesystems/ms/create.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/crea…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/create.c (original) +++ trunk/reactos/drivers/filesystems/ms/create.c Sat May 6 19:37:40 2006 @@ -25,7 +25,7 @@ PFILE_OBJECT FileObject; PMSFS_DEVICE_EXTENSION DeviceExtension; PMSFS_MAILSLOT Mailslot; - PMSFS_FCB Fcb; + PMSFS_CCB Ccb; PMSFS_MAILSLOT current = NULL; PLIST_ENTRY current_entry; KIRQL oldIrql; @@ -38,8 +38,8 @@ DPRINT("Mailslot name: %wZ\n", &FileObject->FileName); - Fcb = ExAllocatePool(NonPagedPool, sizeof(MSFS_FCB)); - if (Fcb == NULL) + Ccb = ExAllocatePool(NonPagedPool, sizeof(MSFS_CCB)); + if (Ccb == NULL) { Irp->IoStatus.Status = STATUS_NO_MEMORY; Irp->IoStatus.Information = 0; @@ -67,7 +67,7 @@ if (current_entry == &DeviceExtension->MailslotListHead) { - ExFreePool(Fcb); + ExFreePool(Ccb); KeUnlockMutex(&DeviceExtension->MailslotListLock); Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; @@ -80,17 +80,17 @@ Mailslot = current; - KeAcquireSpinLock(&Mailslot->FcbListLock, &oldIrql); - InsertTailList(&Mailslot->FcbListHead, &Fcb->FcbListEntry); - KeReleaseSpinLock(&Mailslot->FcbListLock, oldIrql); + KeAcquireSpinLock(&Mailslot->CcbListLock, &oldIrql); + InsertTailList(&Mailslot->CcbListHead, &Ccb->CcbListEntry); + KeReleaseSpinLock(&Mailslot->CcbListLock, oldIrql); Mailslot->ReferenceCount++; - Fcb->Mailslot = Mailslot; + Ccb->Mailslot = Mailslot; KeUnlockMutex(&DeviceExtension->MailslotListLock); - FileObject->FsContext = Fcb; + FileObject->FsContext2 = Ccb; FileObject->Flags |= FO_MAILSLOT; Irp->IoStatus.Status = STATUS_SUCCESS; @@ -110,7 +110,7 @@ PFILE_OBJECT FileObject; PMSFS_DEVICE_EXTENSION DeviceExtension; PMSFS_MAILSLOT Mailslot; - PMSFS_FCB Fcb; + PMSFS_CCB Ccb; KIRQL oldIrql; PLIST_ENTRY current_entry; PMSFS_MAILSLOT current; @@ -153,8 +153,8 @@ RtlCopyUnicodeString(&Mailslot->Name, &FileObject->FileName); - Fcb = ExAllocatePool(NonPagedPool, sizeof(MSFS_FCB)); - if (Fcb == NULL) + Ccb = ExAllocatePool(NonPagedPool, sizeof(MSFS_CCB)); + if (Ccb == NULL) { ExFreePool(Mailslot); @@ -167,8 +167,8 @@ } Mailslot->ReferenceCount = 0; - InitializeListHead(&Mailslot->FcbListHead); - KeInitializeSpinLock(&Mailslot->FcbListLock); + InitializeListHead(&Mailslot->CcbListHead); + KeInitializeSpinLock(&Mailslot->CcbListLock); Mailslot->MaxMessageSize = Buffer->MaximumMessageSize; Mailslot->MessageCount = 0; @@ -209,17 +209,17 @@ &Mailslot->MailslotListEntry); } - KeAcquireSpinLock(&Mailslot->FcbListLock, &oldIrql); - InsertTailList(&Mailslot->FcbListHead, &Fcb->FcbListEntry); - KeReleaseSpinLock(&Mailslot->FcbListLock, oldIrql); + KeAcquireSpinLock(&Mailslot->CcbListLock, &oldIrql); + InsertTailList(&Mailslot->CcbListHead, &Ccb->CcbListEntry); + KeReleaseSpinLock(&Mailslot->CcbListLock, oldIrql); Mailslot->ReferenceCount++; - Mailslot->ServerFcb = Fcb; - Fcb->Mailslot = Mailslot; + Mailslot->ServerCcb = Ccb; + Ccb->Mailslot = Mailslot; KeUnlockMutex(&DeviceExtension->MailslotListLock); - FileObject->FsContext = Fcb; + FileObject->FsContext2 = Ccb; FileObject->Flags |= FO_MAILSLOT; Irp->IoStatus.Status = STATUS_SUCCESS; @@ -239,7 +239,7 @@ PFILE_OBJECT FileObject; PMSFS_DEVICE_EXTENSION DeviceExtension; PMSFS_MAILSLOT Mailslot; - PMSFS_FCB Fcb; + PMSFS_CCB Ccb; PMSFS_MESSAGE Message; KIRQL oldIrql; @@ -263,13 +263,13 @@ return(STATUS_SUCCESS); } - Fcb = FileObject->FsContext; - Mailslot = Fcb->Mailslot; + Ccb = FileObject->FsContext2; + Mailslot = Ccb->Mailslot; DPRINT("Mailslot name: %wZ\n", &Mailslot->Name); Mailslot->ReferenceCount--; - if (Mailslot->ServerFcb == Fcb) + if (Mailslot->ServerCcb == Ccb) { /* delete all messages from message-list */ KeAcquireSpinLock(&Mailslot->MessageListLock, &oldIrql); @@ -285,14 +285,14 @@ Mailslot->MessageCount = 0; KeReleaseSpinLock(&Mailslot->MessageListLock, oldIrql); - Mailslot->ServerFcb = NULL; - } - - KeAcquireSpinLock(&Mailslot->FcbListLock, &oldIrql); - RemoveEntryList(&Fcb->FcbListEntry); - KeReleaseSpinLock(&Mailslot->FcbListLock, oldIrql); - ExFreePool(Fcb); - FileObject->FsContext = NULL; + Mailslot->ServerCcb = NULL; + } + + KeAcquireSpinLock(&Mailslot->CcbListLock, &oldIrql); + RemoveEntryList(&Ccb->CcbListEntry); + KeReleaseSpinLock(&Mailslot->CcbListLock, oldIrql); + ExFreePool(Ccb); + FileObject->FsContext2 = NULL; if (Mailslot->ReferenceCount == 0) { Modified: trunk/reactos/drivers/filesystems/ms/finfo.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/finf…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/finfo.c (original) +++ trunk/reactos/drivers/filesystems/ms/finfo.c Sat May 6 19:37:40 2006 @@ -18,7 +18,7 @@ /* FUNCTIONS *****************************************************************/ static NTSTATUS -MsfsQueryMailslotInformation(PMSFS_FCB Fcb, +MsfsQueryMailslotInformation(PMSFS_CCB Ccb, PFILE_MAILSLOT_QUERY_INFORMATION Buffer, PULONG BufferLength) { @@ -28,7 +28,7 @@ if (*BufferLength < sizeof(FILE_MAILSLOT_QUERY_INFORMATION)) return(STATUS_BUFFER_OVERFLOW); - Mailslot = Fcb->Mailslot; + Mailslot = Ccb->Mailslot; Buffer->MaximumMessageSize = Mailslot->MaxMessageSize; Buffer->ReadTimeout = Mailslot->TimeOut; @@ -37,7 +37,7 @@ Buffer->MessagesAvailable = Mailslot->MessageCount; if (Mailslot->MessageCount == 0) { - Buffer->NextMessageSize = 0; + Buffer->NextMessageSize = MAILSLOT_NO_MESSAGE; } else { @@ -53,14 +53,14 @@ static NTSTATUS -MsfsSetMailslotInformation(PMSFS_FCB Fcb, +MsfsSetMailslotInformation(PMSFS_CCB Ccb, PFILE_MAILSLOT_SET_INFORMATION Buffer, PULONG BufferLength) { if (*BufferLength < sizeof(FILE_MAILSLOT_SET_INFORMATION)) return(STATUS_BUFFER_OVERFLOW); - Fcb->Mailslot->TimeOut = *Buffer->ReadTimeout; + Ccb->Mailslot->TimeOut = *Buffer->ReadTimeout; return(STATUS_SUCCESS); } @@ -74,7 +74,7 @@ FILE_INFORMATION_CLASS FileInformationClass; PFILE_OBJECT FileObject; PMSFS_DEVICE_EXTENSION DeviceExtension; - PMSFS_FCB Fcb; + PMSFS_CCB Ccb; PMSFS_MAILSLOT Mailslot; PVOID SystemBuffer; ULONG BufferLength; @@ -86,13 +86,13 @@ FileInformationClass = IoStack->Parameters.QueryFile.FileInformationClass; DeviceExtension = DeviceObject->DeviceExtension; FileObject = IoStack->FileObject; - Fcb = (PMSFS_FCB)FileObject->FsContext; - Mailslot = Fcb->Mailslot; + Ccb = (PMSFS_CCB)FileObject->FsContext2; + Mailslot = Ccb->Mailslot; DPRINT("Mailslot name: %wZ\n", &Mailslot->Name); /* querying information is not permitted on client side */ - if (Fcb->Mailslot->ServerFcb != Fcb) + if (Ccb->Mailslot->ServerCcb != Ccb) { Status = STATUS_ACCESS_DENIED; @@ -111,7 +111,7 @@ switch (FileInformationClass) { case FileMailslotQueryInformation: - Status = MsfsQueryMailslotInformation(Fcb, + Status = MsfsQueryMailslotInformation(Ccb, SystemBuffer, &BufferLength); break; @@ -139,7 +139,7 @@ PIO_STACK_LOCATION IoStack; FILE_INFORMATION_CLASS FileInformationClass; PFILE_OBJECT FileObject; - PMSFS_FCB Fcb; + PMSFS_CCB Ccb; PMSFS_MAILSLOT Mailslot; PVOID SystemBuffer; ULONG BufferLength; @@ -150,13 +150,13 @@ IoStack = IoGetCurrentIrpStackLocation (Irp); FileInformationClass = IoStack->Parameters.QueryFile.FileInformationClass; FileObject = IoStack->FileObject; - Fcb = (PMSFS_FCB)FileObject->FsContext; - Mailslot = Fcb->Mailslot; + Ccb = (PMSFS_CCB)FileObject->FsContext2; + Mailslot = Ccb->Mailslot; DPRINT("Mailslot name: %wZ\n", &Mailslot->Name); /* setting information is not permitted on client side */ - if (Fcb->Mailslot->ServerFcb != Fcb) + if (Ccb->Mailslot->ServerCcb != Ccb) { Status = STATUS_ACCESS_DENIED; @@ -178,7 +178,7 @@ switch (FileInformationClass) { case FileMailslotSetInformation: - Status = MsfsSetMailslotInformation(Fcb, + Status = MsfsSetMailslotInformation(Ccb, SystemBuffer, &BufferLength); break; Modified: trunk/reactos/drivers/filesystems/ms/fsctrl.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/fsct…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/fsctrl.c (original) +++ trunk/reactos/drivers/filesystems/ms/fsctrl.c Sat May 6 19:37:40 2006 @@ -24,15 +24,15 @@ PIO_STACK_LOCATION IoStack; PFILE_OBJECT FileObject; PMSFS_MAILSLOT Mailslot; - PMSFS_FCB Fcb; + PMSFS_CCB Ccb; NTSTATUS Status; DPRINT1("MsfsFileSystemControl(DeviceObject %p Irp %p)\n", DeviceObject, Irp); IoStack = IoGetCurrentIrpStackLocation(Irp); FileObject = IoStack->FileObject; - Fcb = FileObject->FsContext; - Mailslot = Fcb->Mailslot; + Ccb = FileObject->FsContext2; + Mailslot = Ccb->Mailslot; DPRINT1("Mailslot name: %wZ\n", &Mailslot->Name); Modified: trunk/reactos/drivers/filesystems/ms/msfs.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/msfs…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/msfs.h (original) +++ trunk/reactos/drivers/filesystems/ms/msfs.h Sat May 6 19:37:40 2006 @@ -4,7 +4,7 @@ #include <ntifs.h> #include <ndk/ntndk.h> -/* +/* * FIXME: GCC doesn't have a working option for defaulting to a calling * convention. It will always default to cdecl. The MS DDK was designed * for compilers which support this option, and thus some of their headers @@ -30,9 +30,9 @@ { UNICODE_STRING Name; LIST_ENTRY MailslotListEntry; - KSPIN_LOCK FcbListLock; - LIST_ENTRY FcbListHead; - struct _MSFS_FCB *ServerFcb; + KSPIN_LOCK CcbListLock; + LIST_ENTRY CcbListHead; + struct _MSFS_CCB *ServerCcb; ULONG ReferenceCount; LARGE_INTEGER TimeOut; KEVENT MessageEvent; @@ -42,11 +42,11 @@ LIST_ENTRY MessageListHead; } MSFS_MAILSLOT, *PMSFS_MAILSLOT; -typedef struct _MSFS_FCB +typedef struct _MSFS_CCB { - LIST_ENTRY FcbListEntry; + LIST_ENTRY CcbListEntry; PMSFS_MAILSLOT Mailslot; -} MSFS_FCB, *PMSFS_FCB; +} MSFS_CCB, *PMSFS_CCB; typedef struct _MSFS_MESSAGE { Modified: trunk/reactos/drivers/filesystems/ms/rw.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/filesystems/ms/rw.c…
============================================================================== --- trunk/reactos/drivers/filesystems/ms/rw.c (original) +++ trunk/reactos/drivers/filesystems/ms/rw.c Sat May 6 19:37:40 2006 @@ -24,7 +24,7 @@ PIO_STACK_LOCATION IoStack; PFILE_OBJECT FileObject; PMSFS_MAILSLOT Mailslot; - PMSFS_FCB Fcb; + PMSFS_CCB Ccb; PMSFS_MESSAGE Message; KIRQL oldIrql; ULONG Length; @@ -36,13 +36,13 @@ IoStack = IoGetCurrentIrpStackLocation (Irp); FileObject = IoStack->FileObject; - Fcb = (PMSFS_FCB)FileObject->FsContext; - Mailslot = Fcb->Mailslot; + Ccb = (PMSFS_CCB)FileObject->FsContext2; + Mailslot = Ccb->Mailslot; DPRINT("MailslotName: %wZ\n", &Mailslot->Name); /* reading is not permitted on client side */ - if (Fcb->Mailslot->ServerFcb != Fcb) + if (Ccb->Mailslot->ServerCcb != Ccb) { Irp->IoStatus.Status = STATUS_ACCESS_DENIED; Irp->IoStatus.Information = 0; @@ -100,7 +100,7 @@ PIO_STACK_LOCATION IoStack; PFILE_OBJECT FileObject; PMSFS_MAILSLOT Mailslot; - PMSFS_FCB Fcb; + PMSFS_CCB Ccb; PMSFS_MESSAGE Message; KIRQL oldIrql; ULONG Length; @@ -110,13 +110,13 @@ IoStack = IoGetCurrentIrpStackLocation (Irp); FileObject = IoStack->FileObject; - Fcb = (PMSFS_FCB)FileObject->FsContext; - Mailslot = Fcb->Mailslot; + Ccb = (PMSFS_CCB)FileObject->FsContext2; + Mailslot = Ccb->Mailslot; DPRINT("MailslotName: %wZ\n", &Mailslot->Name); /* writing is not permitted on server side */ - if (Fcb->Mailslot->ServerFcb == Fcb) + if (Ccb->Mailslot->ServerCcb == Ccb) { Irp->IoStatus.Status = STATUS_ACCESS_DENIED; Irp->IoStatus.Information = 0;
18 years, 11 months
1
0
0
0
[hpoussin] 21812: Code cleanup: - Move IRP_MJ_CREATE, IRP_MJ_CLOSE and IRP_MJ_CLEANUP to fdo.c and pdo.c - Implement IRP_MJ_PNP / IRP_MN_QUERY_BUS_INFORMATION for PDOs - IRP_MJ_POWER now returns STATUS_NOT_SUPPORTED instead of STATUS_SUCCESS - Replace STDCALL by NTAPI - Delete useless white space => USB keyboard and mice are working, even if they require one reboot after the installation of the USB controller
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sat May 6 18:36:52 2006 New Revision: 21812 URL:
http://svn.reactos.ru/svn/reactos?rev=21812&view=rev
Log: Code cleanup: - Move IRP_MJ_CREATE, IRP_MJ_CLOSE and IRP_MJ_CLEANUP to fdo.c and pdo.c - Implement IRP_MJ_PNP / IRP_MN_QUERY_BUS_INFORMATION for PDOs - IRP_MJ_POWER now returns STATUS_NOT_SUPPORTED instead of STATUS_SUCCESS - Replace STDCALL by NTAPI - Delete useless white space => USB keyboard and mice are working, even if they require one reboot after the installation of the USB controller Removed: trunk/reactos/drivers/usb/miniport/common/cleanup.c trunk/reactos/drivers/usb/miniport/common/close.c trunk/reactos/drivers/usb/miniport/common/create.c Modified: trunk/reactos/drivers/usb/miniport/common/common.rbuild trunk/reactos/drivers/usb/miniport/common/fdo.c trunk/reactos/drivers/usb/miniport/common/main.c trunk/reactos/drivers/usb/miniport/common/misc.c trunk/reactos/drivers/usb/miniport/common/pdo.c trunk/reactos/drivers/usb/miniport/common/usbcommon.h Removed: trunk/reactos/drivers/usb/miniport/common/cleanup.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/usb/miniport/common…
============================================================================== --- trunk/reactos/drivers/usb/miniport/common/cleanup.c (original) +++ trunk/reactos/drivers/usb/miniport/common/cleanup.c (removed) @@ -1,26 +1,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS USB miniport driver (Cromwell type) - * FILE: drivers/usb/miniport/common/cleanup.c - * PURPOSE: IRP_MJ_CLEANUP operations - * - * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org) - */ - -#define NDEBUG -#include <debug.h> - -#include "usbcommon.h" - -NTSTATUS STDCALL -UsbMpCleanup( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - DPRINT("USBMP: IRP_MJ_CLEANUP\n"); - - Irp->IoStatus.Information = 0; - Irp->IoStatus.Status = STATUS_SUCCESS; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_SUCCESS; -} Removed: trunk/reactos/drivers/usb/miniport/common/close.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/usb/miniport/common…
============================================================================== --- trunk/reactos/drivers/usb/miniport/common/close.c (original) +++ trunk/reactos/drivers/usb/miniport/common/close.c (removed) @@ -1,30 +1,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS USB miniport driver (Cromwell type) - * FILE: drivers/usb/miniport/common/close.c - * PURPOSE: IRP_MJ_CLOSE operations - * - * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org) - */ - -#define NDEBUG -#include <debug.h> - -#include "usbcommon.h" - -NTSTATUS STDCALL -UsbMpClose( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - PUSBMP_DEVICE_EXTENSION pDeviceExtension; - - DPRINT("USBMP: IRP_MJ_CLOSE\n"); - pDeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; - InterlockedDecrement((PLONG)&pDeviceExtension->DeviceOpened); - - Irp->IoStatus.Information = 0; - Irp->IoStatus.Status = STATUS_SUCCESS; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_SUCCESS; -} Modified: trunk/reactos/drivers/usb/miniport/common/common.rbuild URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/usb/miniport/common…
============================================================================== --- trunk/reactos/drivers/usb/miniport/common/common.rbuild (original) +++ trunk/reactos/drivers/usb/miniport/common/common.rbuild Sat May 6 18:36:52 2006 @@ -2,9 +2,6 @@ <define name="__USE_W32API" /> <include>../linux</include> <include base="usbport">.</include> - <file>cleanup.c</file> - <file>close.c</file> - <file>create.c</file> <file>fdo.c</file> <file>main.c</file> <file>misc.c</file> Removed: trunk/reactos/drivers/usb/miniport/common/create.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/usb/miniport/common…
============================================================================== --- trunk/reactos/drivers/usb/miniport/common/create.c (original) +++ trunk/reactos/drivers/usb/miniport/common/create.c (removed) @@ -1,43 +1,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS USB miniport driver (Cromwell type) - * FILE: drivers/usb/miniport/common/create.c - * PURPOSE: IRP_MJ_CREATE operations - * - * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org) - */ - -#define NDEBUG -#include <debug.h> - -#include "usbcommon.h" - -NTSTATUS STDCALL -UsbMpCreate( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - PIO_STACK_LOCATION Stack; - PUSBMP_DEVICE_EXTENSION DeviceExtension; - NTSTATUS Status; - - DPRINT("USBMP: IRP_MJ_CREATE\n"); - Stack = IoGetCurrentIrpStackLocation(Irp); - DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; - - if (Stack->Parameters.Create.Options & FILE_DIRECTORY_FILE) - { - CHECKPOINT; - Status = STATUS_NOT_A_DIRECTORY; - goto ByeBye; - } - - InterlockedIncrement((PLONG)&DeviceExtension->DeviceOpened); - Status = STATUS_SUCCESS; - -ByeBye: - Irp->IoStatus.Status = Status; - Irp->IoStatus.Information = 0; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return Status; -} Modified: trunk/reactos/drivers/usb/miniport/common/fdo.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/usb/miniport/common…
============================================================================== --- trunk/reactos/drivers/usb/miniport/common/fdo.c (original) +++ trunk/reactos/drivers/usb/miniport/common/fdo.c Sat May 6 18:36:52 2006 @@ -1,11 +1,10 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS USB miniport driver (Cromwell type) - * FILE: drivers/usb/miniport/common/fdo.c - * PURPOSE: IRP_MJ_PNP/IRP_MJ_DEVICE_CONTROL operations for FDOs - * - * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org), - * James Tabor (jimtabor(a)adsl-64-217-116-74.dsl.hstntx.swbell.net) + * PROJECT: ReactOS USB miniport driver (Cromwell type) + * LICENSE: GPL - See COPYING in the top level directory + * FILE: drivers/usb/miniport/common/fdo.c + * PURPOSE: Operations on FDOs + * PROGRAMMERS: Copyright 2005-2006 Hervé Poussineau (hpoussin(a)reactos.org) + * Copyright James Tabor (jimtabor(a)adsl-64-217-116-74.dsl.hstntx.swbell.net) */ #define NDEBUG @@ -48,7 +47,67 @@ } } -NTSTATUS STDCALL +NTSTATUS +UsbMpFdoCreate( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PIO_STACK_LOCATION Stack; + PUSBMP_DEVICE_EXTENSION DeviceExtension; + NTSTATUS Status; + + DPRINT("IRP_MJ_CREATE\n"); + Stack = IoGetCurrentIrpStackLocation(Irp); + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + + if (Stack->Parameters.Create.Options & FILE_DIRECTORY_FILE) + { + CHECKPOINT; + Status = STATUS_NOT_A_DIRECTORY; + goto ByeBye; + } + + InterlockedIncrement((PLONG)&DeviceExtension->DeviceOpened); + Status = STATUS_SUCCESS; + +ByeBye: + Irp->IoStatus.Status = Status; + Irp->IoStatus.Information = 0; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; +} + +NTSTATUS +UsbMpFdoClose( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PUSBMP_DEVICE_EXTENSION pDeviceExtension; + + DPRINT("IRP_MJ_CLOSE\n"); + pDeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + InterlockedDecrement((PLONG)&pDeviceExtension->DeviceOpened); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + +NTSTATUS +UsbMpFdoCleanup( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("IRP_MJ_CLEANUP\n"); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + +static NTSTATUS UsbMpFdoStartDevice( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) @@ -136,9 +195,9 @@ } } } - + /* Print assigned resources */ - DPRINT("USBMP: Interrupt Vector 0x%lx, %S base 0x%lx, Length 0x%lx\n", + DPRINT("Interrupt Vector 0x%lx, %S base 0x%lx, Length 0x%lx\n", DeviceExtension->InterruptVector, ((struct hc_driver *)pci_ids->driver_data)->flags & HCD_MEMORY ? L"Memory" : L"I/O", DeviceExtension->BaseAddress, @@ -155,11 +214,11 @@ if (!NT_SUCCESS(Status)) { - DPRINT1("USBMP: IoGetDeviceProperty DevicePropertyBusNumber failed\n"); + DPRINT1("IoGetDeviceProperty DevicePropertyBusNumber failed\n"); DeviceExtension->SystemIoBusNumber = 0; } - DPRINT("USBMP: Busnumber %d\n", DeviceExtension->SystemIoBusNumber); + DPRINT("Busnumber %d\n", DeviceExtension->SystemIoBusNumber); /* Init wrapper with this object */ return InitLinuxWrapper(DeviceObject); @@ -173,9 +232,9 @@ PUSBMP_DEVICE_EXTENSION DeviceExtension; PDEVICE_RELATIONS DeviceRelations; NTSTATUS Status = STATUS_SUCCESS; - + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; - + /* Handling this IRP is easy, as we only * have one child: the root hub */ @@ -184,18 +243,18 @@ sizeof(DEVICE_RELATIONS)); if (!DeviceRelations) return STATUS_INSUFFICIENT_RESOURCES; - + /* Fill returned structure */ DeviceRelations->Count = 1; ObReferenceObject(DeviceExtension->RootHubPdo); DeviceRelations->Objects[0] = DeviceExtension->RootHubPdo; - + *pDeviceRelations = DeviceRelations; return Status; } -NTSTATUS STDCALL -UsbMpPnpFdo( +NTSTATUS +UsbMpFdoPnp( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { @@ -203,7 +262,7 @@ NTSTATUS Status; ULONG MinorFunction; ULONG_PTR Information = 0; - + IrpSp = IoGetCurrentIrpStackLocation(Irp); MinorFunction = IrpSp->MinorFunction; @@ -255,18 +314,18 @@ case BusRelations: { PDEVICE_RELATIONS DeviceRelations = NULL; - DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n"); + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n"); Status = UsbMpFdoQueryBusRelations(DeviceObject, &DeviceRelations); Information = (ULONG_PTR)DeviceRelations; break; } case RemovalRelations: { - DPRINT1("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / RemovalRelations\n"); + DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / RemovalRelations\n"); return ForwardIrpAndForget(DeviceObject, Irp); } default: - DPRINT1("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n", + DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n", IrpSp->Parameters.QueryDeviceRelations.Type); return ForwardIrpAndForget(DeviceObject, Irp); } @@ -275,7 +334,7 @@ default: { - DPRINT1("USBMP: IRP_MJ_PNP / unknown minor function 0x%lx\n", MinorFunction); + DPRINT1("IRP_MJ_PNP / unknown minor function 0x%lx\n", MinorFunction); return ForwardIrpAndForget(DeviceObject, Irp); } } @@ -286,7 +345,7 @@ } NTSTATUS -UsbMpDeviceControlFdo( +UsbMpFdoDeviceControl( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { @@ -298,7 +357,7 @@ PVOID BufferIn, BufferOut; NTSTATUS Status; - DPRINT("USBMP: UsbDeviceControlFdo() called\n"); + DPRINT("UsbDeviceControlFdo() called\n"); Stack = IoGetCurrentIrpStackLocation(Irp); LengthIn = Stack->Parameters.DeviceIoControl.InputBufferLength; @@ -311,7 +370,7 @@ { case IOCTL_GET_HCD_DRIVERKEY_NAME: { - DPRINT("USBMP: IOCTL_GET_HCD_DRIVERKEY_NAME\n"); + DPRINT("IOCTL_GET_HCD_DRIVERKEY_NAME\n"); if (LengthOut < sizeof(USB_HCD_DRIVERKEY_NAME)) Status = STATUS_BUFFER_TOO_SMALL; else if (BufferOut == NULL) @@ -338,7 +397,7 @@ } case IOCTL_USB_GET_ROOT_HUB_NAME: { - DPRINT("USBMP: IOCTL_USB_GET_ROOT_HUB_NAME\n"); + DPRINT("IOCTL_USB_GET_ROOT_HUB_NAME\n"); if (LengthOut < sizeof(USB_ROOT_HUB_NAME)) Status = STATUS_BUFFER_TOO_SMALL; else if (BufferOut == NULL) @@ -360,7 +419,7 @@ RootHubInterfaceName->Buffer, RootHubInterfaceName->Length); StringDescriptor->RootHubName[RootHubInterfaceName->Length / sizeof(WCHAR)] = UNICODE_NULL; - DPRINT("USBMP: IOCTL_USB_GET_ROOT_HUB_NAME returns '%S'\n", StringDescriptor->RootHubName); + DPRINT("IOCTL_USB_GET_ROOT_HUB_NAME returns '%S'\n", StringDescriptor->RootHubName); Information = StringDescriptor->ActualLength; } else @@ -373,7 +432,7 @@ default: { /* Pass Irp to lower driver */ - DPRINT1("USBMP: Unknown IOCTL code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); + DPRINT1("Unknown IOCTL code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); IoSkipCurrentIrpStackLocation(Irp); return IoCallDriver(DeviceExtension->NextDeviceObject, Irp); } @@ -384,218 +443,3 @@ IoCompleteRequest(Irp, IO_NO_INCREMENT); return Status; } - -NTSTATUS -UsbMpInternalDeviceControlFdo( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - NTSTATUS Status = STATUS_INVALID_DEVICE_REQUEST; - - DPRINT("USBMP: UsbMpDeviceInternalControlFdo(DO %p, code 0x%lx) called\n", - DeviceObject, - IoGetCurrentIrpStackLocation(Irp)->Parameters.DeviceIoControl.IoControlCode); - - if (DeviceObject == KeyboardFdo) - { - // it's keyboard's IOCTL - PIO_STACK_LOCATION Stk; - - Irp->IoStatus.Information = 0; - Stk = IoGetCurrentIrpStackLocation(Irp); - - switch (Stk->Parameters.DeviceIoControl.IoControlCode) - { - case IOCTL_INTERNAL_KEYBOARD_CONNECT: - DPRINT("USBMP: IOCTL_INTERNAL_KEYBOARD_CONNECT\n"); - if (Stk->Parameters.DeviceIoControl.InputBufferLength < sizeof(CONNECT_DATA)) { - DPRINT1("USBMP: Keyboard IOCTL_INTERNAL_KEYBOARD_CONNECT " - "invalid buffer size\n"); - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; - goto intcontfailure; - } - - RtlCopyMemory(&KbdClassInformation, - Stk->Parameters.DeviceIoControl.Type3InputBuffer, - sizeof(CONNECT_DATA)); - - Irp->IoStatus.Status = STATUS_SUCCESS; - break; - - case IOCTL_INTERNAL_I8042_KEYBOARD_WRITE_BUFFER: - DPRINT("USBMP: IOCTL_INTERNAL_I8042_KEYBOARD_WRITE_BUFFER\n"); - if (Stk->Parameters.DeviceIoControl.InputBufferLength < 1) { - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; - goto intcontfailure; - } -/* if (!DevExt->KeyboardInterruptObject) { - Irp->IoStatus.Status = STATUS_DEVICE_NOT_READY; - goto intcontfailure; - }*/ - - Irp->IoStatus.Status = STATUS_SUCCESS; - break; - case IOCTL_KEYBOARD_QUERY_ATTRIBUTES: - DPRINT("USBMP: IOCTL_KEYBOARD_QUERY_ATTRIBUTES\n"); - if (Stk->Parameters.DeviceIoControl.OutputBufferLength < - sizeof(KEYBOARD_ATTRIBUTES)) { - DPRINT("USBMP: Keyboard IOCTL_KEYBOARD_QUERY_ATTRIBUTES " - "invalid buffer size\n"); - Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; - goto intcontfailure; - } - /*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, - &DevExt->KeyboardAttributes, - sizeof(KEYBOARD_ATTRIBUTES));*/ - - Irp->IoStatus.Status = STATUS_SUCCESS; - break; - case IOCTL_KEYBOARD_QUERY_INDICATORS: - DPRINT("USBMP: IOCTL_KEYBOARD_QUERY_INDICATORS\n"); - if (Stk->Parameters.DeviceIoControl.OutputBufferLength < - sizeof(KEYBOARD_INDICATOR_PARAMETERS)) { - DPRINT("USBMP: Keyboard IOCTL_KEYBOARD_QUERY_INDICATORS " - "invalid buffer size\n"); - Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; - goto intcontfailure; - } - /*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, - &DevExt->KeyboardIndicators, - sizeof(KEYBOARD_INDICATOR_PARAMETERS));*/ - - Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; - break; - case IOCTL_KEYBOARD_QUERY_TYPEMATIC: - DPRINT("USBMP: IOCTL_KEYBOARD_QUERY_TYPEMATIC\n"); - if (Stk->Parameters.DeviceIoControl.OutputBufferLength < - sizeof(KEYBOARD_TYPEMATIC_PARAMETERS)) { - DPRINT("USBMP: Keyboard IOCTL_KEYBOARD_QUERY_TYPEMATIC " - "invalid buffer size\n"); - Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; - goto intcontfailure; - } - /*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, - &DevExt->KeyboardTypematic, - sizeof(KEYBOARD_TYPEMATIC_PARAMETERS));*/ - - Irp->IoStatus.Status = STATUS_SUCCESS; - break; - case IOCTL_KEYBOARD_SET_INDICATORS: - DPRINT("USBMP: IOCTL_KEYBOARD_SET_INDICATORS\n"); - if (Stk->Parameters.DeviceIoControl.InputBufferLength < - sizeof(KEYBOARD_INDICATOR_PARAMETERS)) { - DPRINT("USBMP: Keyboard IOCTL_KEYBOARD_SET_INDICTATORS " - "invalid buffer size\n"); - Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; - goto intcontfailure; - } - - /*RtlCopyMemory(&DevExt->KeyboardIndicators, - Irp->AssociatedIrp.SystemBuffer, - sizeof(KEYBOARD_INDICATOR_PARAMETERS));*/ - - //DPRINT("%x\n", DevExt->KeyboardIndicators.LedFlags); - - Irp->IoStatus.Status = STATUS_SUCCESS; - break; - case IOCTL_KEYBOARD_SET_TYPEMATIC: - DPRINT("USBMP: IOCTL_KEYBOARD_SET_TYPEMATIC\n"); - if (Stk->Parameters.DeviceIoControl.InputBufferLength < - sizeof(KEYBOARD_TYPEMATIC_PARAMETERS)) { - DPRINT("USBMP: Keyboard IOCTL_KEYBOARD_SET_TYPEMATIC " - "invalid buffer size\n"); - Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; - goto intcontfailure; - } - - /*RtlCopyMemory(&DevExt->KeyboardTypematic, - Irp->AssociatedIrp.SystemBuffer, - sizeof(KEYBOARD_TYPEMATIC_PARAMETERS));*/ - - Irp->IoStatus.Status = STATUS_SUCCESS; - break; - case IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION: - /* We should check the UnitID, but it's kind of pointless as - * all keyboards are supposed to have the same one - */ -#if 0 - DPRINT("USBMP: IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION\n"); - if (Stk->Parameters.DeviceIoControl.OutputBufferLength < - sizeof(LOCAL_KEYBOARD_INDICATOR_TRANSLATION)) { - DPRINT("USBMP: IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION: " - "invalid buffer size (expected)\n"); - /* It's to query the buffer size */ - Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; - goto intcontfailure; - } - Irp->IoStatus.Information = - sizeof(LOCAL_KEYBOARD_INDICATOR_TRANSLATION); -#endif - /*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, - &IndicatorTranslation, - sizeof(LOCAL_KEYBOARD_INDICATOR_TRANSLATION));*/ - - Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; - break; - case IOCTL_INTERNAL_I8042_HOOK_KEYBOARD: - /* Nothing to do here */ - Irp->IoStatus.Status = STATUS_SUCCESS; - break; - default: - Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST; - break; - } - - intcontfailure: - Status = Irp->IoStatus.Status; - } - else if (DeviceObject == MouseFdo) - { - // it's mouse's IOCTL - PIO_STACK_LOCATION Stk; - - Irp->IoStatus.Information = 0; - Stk = IoGetCurrentIrpStackLocation(Irp); - - switch (Stk->Parameters.DeviceIoControl.IoControlCode) - { - case IOCTL_INTERNAL_MOUSE_CONNECT: - DPRINT("USBMP: IOCTL_INTERNAL_MOUSE_CONNECT\n"); - if (Stk->Parameters.DeviceIoControl.InputBufferLength < sizeof(CONNECT_DATA)) { - DPRINT1("USBMP: IOCTL_INTERNAL_MOUSE_CONNECT " - "invalid buffer size\n"); - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; - goto intcontfailure2; - } - - RtlCopyMemory(&MouseClassInformation, - Stk->Parameters.DeviceIoControl.Type3InputBuffer, - sizeof(CONNECT_DATA)); - - Irp->IoStatus.Status = STATUS_SUCCESS; - break; - - default: - Irp->IoStatus.Status = STATUS_SUCCESS;//STATUS_INVALID_DEVICE_REQUEST; - break; - } - intcontfailure2: - Status = Irp->IoStatus.Status; - } - else - { - DPRINT("USBMP: We got IOCTL for UsbCore\n"); - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_SUCCESS; - } - - - if (Status == STATUS_INVALID_DEVICE_REQUEST) { - DPRINT1("USBMP: Invalid internal device request!\n"); - } - - if (Status != STATUS_PENDING) - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - return Status; -} Modified: trunk/reactos/drivers/usb/miniport/common/main.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/usb/miniport/common…
============================================================================== --- trunk/reactos/drivers/usb/miniport/common/main.c (original) +++ trunk/reactos/drivers/usb/miniport/common/main.c Sat May 6 18:36:52 2006 @@ -1,11 +1,11 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS USB miniport driver (Cromwell type) - * FILE: drivers/usb/miniport/common/main.c - * PURPOSE: Driver entry - * - * PROGRAMMERS: Aleksey Bragin (aleksey(a)reactos.com) - * Hervé Poussineau (hpoussin(a)reactos.org), + * PROJECT: ReactOS USB miniport driver (Cromwell type) + * LICENSE: GPL - See COPYING in the top level directory + * FILE: drivers/usb/miniport/common/main.c + * PURPOSE: Driver entry + * PROGRAMMERS: Copyright Aleksey Bragin (aleksey(a)reactos.org) + * Copyright 2005-2006 Hervé Poussineau (hpoussin(a)reactos.org) + * Copyright James Tabor (jimtabor(a)adsl-64-217-116-74.dsl.hstntx.swbell.net) * * Some parts of code are inspired (or even just copied) from * ReactOS Videoport driver (drivers/video/videoprt) @@ -33,7 +33,7 @@ PUSBMP_DEVICE_EXTENSION DeviceExtension; NTSTATUS Status; - DPRINT("USBMP: CreateRootHubPdo()\n"); + DPRINT("CreateRootHubPdo()\n"); Status = IoCreateDevice( DriverObject, @@ -45,7 +45,7 @@ &Pdo); if (!NT_SUCCESS(Status)) { - DPRINT("USBMP: IoCreateDevice() call failed with status 0x%08x\n", Status); + DPRINT("IoCreateDevice() call failed with status 0x%08x\n", Status); return Status; } @@ -125,7 +125,7 @@ Status = AddRegistryEntry(L"KeyboardPort", &DeviceName, L"REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Services\\usbport"); if (!NT_SUCCESS(Status)) { - DPRINT1("USBMP: AddRegistryEntry() for usb keyboard driver failed with status 0x%08lx\n", Status); + DPRINT1("AddRegistryEntry() for usb keyboard driver failed with status 0x%08lx\n", Status); return Status; } @@ -139,15 +139,15 @@ if (!NT_SUCCESS(Status)) { - DPRINT1("USBMP: IoCreateDevice() for usb keyboard driver failed with status 0x%08lx\n", Status); + DPRINT1("IoCreateDevice() for usb keyboard driver failed with status 0x%08lx\n", Status); return Status; } DeviceExtension = (PUSBMP_DEVICE_EXTENSION)Fdo->DeviceExtension; RtlZeroMemory(DeviceExtension, sizeof(USBMP_DEVICE_EXTENSION)); - DeviceExtension->IsFDO = TRUE; + DeviceExtension->IsFDO = FALSE; KeyboardFdo = Fdo; Fdo->Flags &= ~DO_DEVICE_INITIALIZING; - DPRINT("USBMP: Created keyboard Fdo: %p\n", Fdo); + DPRINT("Created keyboard Fdo: %p\n", Fdo); return STATUS_SUCCESS; } @@ -165,7 +165,7 @@ Status = AddRegistryEntry(L"PointerPort", &DeviceName, L"REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Services\\usbport"); if (!NT_SUCCESS(Status)) { - DPRINT1("USBMP: AddRegistryEntry() for usb mouse driver failed with status 0x%08lx\n", Status); + DPRINT1("AddRegistryEntry() for usb mouse driver failed with status 0x%08lx\n", Status); return Status; } @@ -179,20 +179,20 @@ if (!NT_SUCCESS(Status)) { - DPRINT1("USBMP: IoCreateDevice() for usb mouse driver failed with status 0x%08lx\n", Status); + DPRINT1("IoCreateDevice() for usb mouse driver failed with status 0x%08lx\n", Status); return Status; } DeviceExtension = (PUSBMP_DEVICE_EXTENSION)Fdo->DeviceExtension; RtlZeroMemory(DeviceExtension, sizeof(USBMP_DEVICE_EXTENSION)); - DeviceExtension->IsFDO = TRUE; + DeviceExtension->IsFDO = FALSE; MouseFdo = Fdo; Fdo->Flags &= ~DO_DEVICE_INITIALIZING; - DPRINT("USBMP: Created mouse Fdo: %p\n", Fdo); + DPRINT("Created mouse Fdo: %p\n", Fdo); return STATUS_SUCCESS; } -NTSTATUS STDCALL +NTSTATUS NTAPI AddDevice( IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT pdo) @@ -220,7 +220,7 @@ if (!NT_SUCCESS(Status)) { - DPRINT1("USBMP: Allocating DriverObjectExtension failed.\n"); + DPRINT1("Allocating DriverObjectExtension failed.\n"); goto cleanup; } } @@ -259,7 +259,7 @@ if (!NT_SUCCESS(Status)) { - DPRINT1("USBMP: IoCreateDevice call failed with status 0x%08lx\n", Status); + DPRINT1("IoCreateDevice call failed with status 0x%08lx\n", Status); goto cleanup; } @@ -271,7 +271,7 @@ Status = CreateRootHubPdo(DriverObject, fdo, &DeviceExtension->RootHubPdo); if (!NT_SUCCESS(Status)) { - DPRINT1("USBMP: CreateRootHubPdo() failed with status 0x%08lx\n", Status); + DPRINT1("CreateRootHubPdo() failed with status 0x%08lx\n", Status); goto cleanup; } @@ -283,7 +283,7 @@ &DeviceExtension->HcdInterfaceName); if (!NT_SUCCESS(Status)) { - DPRINT1("USBMP: IoRegisterDeviceInterface() failed with status 0x%08lx\n", Status); + DPRINT1("IoRegisterDeviceInterface() failed with status 0x%08lx\n", Status); goto cleanup; } @@ -305,7 +305,7 @@ Status = IoCreateSymbolicLink(&LinkDeviceName, &DeviceName); if (!NT_SUCCESS(Status)) { - DPRINT1("USBMP: IoCreateSymbolicLink() call failed with status 0x%08x\n", Status); + DPRINT1("IoCreateSymbolicLink() call failed with status 0x%08x\n", Status); goto cleanup; } @@ -319,7 +319,7 @@ return Status; } -NTSTATUS STDCALL +NTSTATUS NTAPI IrpStub( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) @@ -328,7 +328,7 @@ if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) { - DPRINT1("USBMP: FDO stub for major function 0x%lx\n", + DPRINT1("FDO stub for major function 0x%lx\n", IoGetCurrentIrpStackLocation(Irp)->MajorFunction); ASSERT(FALSE); return ForwardIrpAndForget(DeviceObject, Irp); @@ -338,7 +338,7 @@ /* We can't forward request to the lower driver, because * we are a Pdo, so we don't have lower driver... */ - DPRINT1("USBMP: PDO stub for major function 0x%lx\n", + DPRINT1("PDO stub for major function 0x%lx\n", IoGetCurrentIrpStackLocation(Irp)->MajorFunction); ASSERT(FALSE); } @@ -348,74 +348,74 @@ return Status; } -static NTSTATUS STDCALL +static NTSTATUS NTAPI DispatchCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) - return UsbMpCreate(DeviceObject, Irp); - else + return UsbMpFdoCreate(DeviceObject, Irp); + else + return UsbMpPdoCreate(DeviceObject, Irp); +} + +static NTSTATUS NTAPI +DispatchClose(PDEVICE_OBJECT DeviceObject, PIRP Irp) +{ + if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) + return UsbMpFdoClose(DeviceObject, Irp); + else + return UsbMpPdoClose(DeviceObject, Irp); +} + +static NTSTATUS NTAPI +DispatchCleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp) +{ + if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) + return UsbMpFdoCleanup(DeviceObject, Irp); + else + return UsbMpPdoCleanup(DeviceObject, Irp); +} + +static NTSTATUS NTAPI +DispatchDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) +{ + if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) + return UsbMpFdoDeviceControl(DeviceObject, Irp); + else + return UsbMpPdoDeviceControl(DeviceObject, Irp); +} + +static NTSTATUS NTAPI +DispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) +{ + if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) return IrpStub(DeviceObject, Irp); -} - -static NTSTATUS STDCALL -DispatchClose(PDEVICE_OBJECT DeviceObject, PIRP Irp) -{ - if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) - return UsbMpClose(DeviceObject, Irp); - else - return IrpStub(DeviceObject, Irp); -} - -static NTSTATUS STDCALL -DispatchCleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp) -{ - if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) - return UsbMpCleanup(DeviceObject, Irp); - else - return IrpStub(DeviceObject, Irp); -} - -static NTSTATUS STDCALL -DispatchDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) -{ - if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) - return UsbMpDeviceControlFdo(DeviceObject, Irp); - else - return UsbMpDeviceControlPdo(DeviceObject, Irp); -} - -static NTSTATUS STDCALL -DispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) -{ - if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) - return UsbMpInternalDeviceControlFdo(DeviceObject, Irp); - else - return IrpStub(DeviceObject, Irp); -} - -static NTSTATUS STDCALL + else + return UsbMpPdoInternalDeviceControl(DeviceObject, Irp); +} + +static NTSTATUS NTAPI DispatchPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if (((PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) - return UsbMpPnpFdo(DeviceObject, Irp); - else - return UsbMpPnpPdo(DeviceObject, Irp); -} - -static NTSTATUS STDCALL + return UsbMpFdoPnp(DeviceObject, Irp); + else + return UsbMpPdoPnp(DeviceObject, Irp); +} + +static NTSTATUS NTAPI DispatchPower(PDEVICE_OBJECT fido, PIRP Irp) { - DPRINT1("USBMP: IRP_MJ_POWER unimplemented\n"); + DPRINT1("IRP_MJ_POWER unimplemented\n"); Irp->IoStatus.Information = 0; - Irp->IoStatus.Status = STATUS_SUCCESS; + Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_SUCCESS; + return STATUS_NOT_SUPPORTED; } /* * Standard DriverEntry method. */ -NTSTATUS STDCALL +NTSTATUS NTAPI DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath) { USBPORT_INTERFACE UsbPortInterface; Modified: trunk/reactos/drivers/usb/miniport/common/misc.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/usb/miniport/common…
============================================================================== --- trunk/reactos/drivers/usb/miniport/common/misc.c (original) +++ trunk/reactos/drivers/usb/miniport/common/misc.c Sat May 6 18:36:52 2006 @@ -1,10 +1,9 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS USB miniport driver (Cromwell type) - * FILE: drivers/usb/miniport/common/misc.c - * PURPOSE: Misceallenous operations - * - * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org), + * PROJECT: ReactOS USB miniport driver (Cromwell type) + * LICENSE: GPL - See COPYING in the top level directory + * FILE: drivers/usb/miniport/common/misc.c + * PURPOSE: Misceallenous operations + * PROGRAMMERS: Copyright 2005 Hervé Poussineau (hpoussin(a)reactos.org) */ #define NDEBUG @@ -13,7 +12,7 @@ #include "usbcommon.h" #include <stdarg.h> -NTSTATUS STDCALL +NTSTATUS NTAPI ForwardIrpAndWaitCompletion( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, @@ -38,7 +37,7 @@ KeInitializeEvent(&Event, NotificationEvent, FALSE); IoCopyCurrentIrpStackLocationToNext(Irp); - DPRINT("USBMP: Calling lower device %p [%wZ]\n", LowerDevice, &LowerDevice->DriverObject->DriverName); + DPRINT("Calling lower device %p [%wZ]\n", LowerDevice, &LowerDevice->DriverObject->DriverName); IoSetCompletionRoutine(Irp, ForwardIrpAndWaitCompletion, &Event, TRUE, TRUE, TRUE); Status = IoCallDriver(LowerDevice, Irp); @@ -52,7 +51,7 @@ return Status; } -NTSTATUS STDCALL +NTSTATUS ForwardIrpAndForget( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) Modified: trunk/reactos/drivers/usb/miniport/common/pdo.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/usb/miniport/common…
============================================================================== --- trunk/reactos/drivers/usb/miniport/common/pdo.c (original) +++ trunk/reactos/drivers/usb/miniport/common/pdo.c Sat May 6 18:36:52 2006 @@ -1,43 +1,85 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS USB miniport driver (Cromwell type) - * FILE: drivers/usb/miniport/common/pdo.c - * PURPOSE: IRP_MJ_PNP/IRP_MJ_DEVICE_CONTROL operations for PDOs - * - * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org), - * James Tabor (jimtabor(a)adsl-64-217-116-74.dsl.hstntx.swbell.net) + * PROJECT: ReactOS USB miniport driver (Cromwell type) + * LICENSE: GPL - See COPYING in the top level directory + * FILE: drivers/usb/miniport/common/pdo.c + * PURPOSE: Operations on PDOs + * PROGRAMMERS: Copyright 2005-2006 Hervé Poussineau (hpoussin(a)reactos.org) + * Copyright James Tabor (jimtabor(a)adsl-64-217-116-74.dsl.hstntx.swbell.net) */ #define NDEBUG #include <debug.h> #include "usbcommon.h" +#include <wdmguid.h> extern struct usb_driver hub_driver; #define IO_METHOD_FROM_CTL_CODE(ctlCode) (ctlCode&0x00000003) NTSTATUS -UsbMpDeviceControlPdo( +UsbMpPdoCreate( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("IRP_MJ_CREATE\n"); + + /* Nothing to do */ + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + +NTSTATUS +UsbMpPdoClose( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("IRP_MJ_CLOSE\n"); + + /* Nothing to do */ + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + +NTSTATUS +UsbMpPdoCleanup( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("IRP_MJ_CLEANUP\n"); + + /* Nothing to do */ + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + +NTSTATUS +UsbMpPdoDeviceControl( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { PIO_STACK_LOCATION Stack; ULONG_PTR Information = 0; NTSTATUS Status; - - DPRINT("USBMP: UsbMpDeviceControlPdo() called\n"); - + + DPRINT("UsbMpDeviceControlPdo() called\n"); + Stack = IoGetCurrentIrpStackLocation(Irp); Status = Irp->IoStatus.Status; - + switch (Stack->Parameters.DeviceIoControl.IoControlCode) { case IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE: { PUSBMP_DEVICE_EXTENSION DeviceExtension; - - DPRINT("USBMP: IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE\n"); + + DPRINT("IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE\n"); if (Irp->AssociatedIrp.SystemBuffer == NULL || Stack->Parameters.DeviceIoControl.OutputBufferLength != sizeof(PVOID)) { @@ -48,7 +90,7 @@ PVOID* pRootHubPointer; DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceExtension->FunctionalDeviceObject->DeviceExtension; - + pRootHubPointer = (PVOID*)Irp->AssociatedIrp.SystemBuffer; *pRootHubPointer = ((struct usb_hcd*)DeviceExtension->pdev->data)->self.root_hub; Information = sizeof(PVOID); @@ -58,12 +100,12 @@ } default: { - DPRINT1("USBMP: Unknown IOCTL code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); + DPRINT1("Unknown IOCTL code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); Information = Irp->IoStatus.Information; Status = Irp->IoStatus.Status; } } - + Irp->IoStatus.Information = Information; Irp->IoStatus.Status = Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -71,7 +113,7 @@ } static NTSTATUS -UsbMpPdoQueryId( +QueryId( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, OUT ULONG_PTR* Information) @@ -93,7 +135,7 @@ { case BusQueryDeviceID: { - DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryDeviceID\n"); + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryDeviceID\n"); if (roothub->speed == USB_SPEED_LOW || roothub->speed == USB_SPEED_FULL) RtlInitUnicodeString(&SourceString, L"USB\\ROOT_HUB"); /* USB 1.1 */ else @@ -109,7 +151,7 @@ ULONG ret; PDEVICE_OBJECT Pdo; - DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n"); + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n"); Pdo = DeviceExtension->PhysicalDeviceObject; Status = IoGetDeviceProperty( @@ -120,7 +162,7 @@ &ret); if (!NT_SUCCESS(Status)) { - DPRINT("USBMP: IoGetDeviceProperty() failed with status 0x%08lx\n", Status); + DPRINT("IoGetDeviceProperty() failed with status 0x%08lx\n", Status); break; } @@ -132,7 +174,7 @@ &ret); if (!NT_SUCCESS(Status)) { - DPRINT("USBMP: IoGetDeviceProperty() failed with status 0x%08lx\n", Status); + DPRINT("IoGetDeviceProperty() failed with status 0x%08lx\n", Status); break; } @@ -144,7 +186,7 @@ PCI_COMMON_HDR_LENGTH); if (ret != PCI_COMMON_HDR_LENGTH) { - DPRINT("USBMP: HalGetBusDataByOffset() failed (ret = %ld)\n", ret); + DPRINT("HalGetBusDataByOffset() failed (ret = %ld)\n", ret); Status = STATUS_IO_DEVICE_ERROR; break; } @@ -163,18 +205,18 @@ break; } case BusQueryCompatibleIDs: - DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryCompatibleIDs\n"); + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryCompatibleIDs\n"); /* No compatible ID */ *Information = 0; return STATUS_NOT_SUPPORTED; case BusQueryInstanceID: { - DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryInstanceID\n"); + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryInstanceID\n"); *Information = 0; return Status; } default: - DPRINT1("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / unknown query id type 0x%lx\n", IdType); + DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_ID / unknown query id type 0x%lx\n", IdType); return STATUS_NOT_SUPPORTED; } @@ -190,14 +232,33 @@ } static NTSTATUS -UsbMpPnpStartDevice( +QueryBusInformation( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + OUT ULONG_PTR* Information) +{ + PPNP_BUS_INFORMATION BusInformation; + + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_BUS_INFORMATION\n"); + + BusInformation = ExAllocatePool(PagedPool, sizeof(PNP_BUS_INFORMATION)); + if (!BusInformation) + return STATUS_INSUFFICIENT_RESOURCES; + BusInformation->BusTypeGuid = GUID_BUS_TYPE_USB; + BusInformation->LegacyBusType = PNPBus; + BusInformation->BusNumber = 0; /* FIXME */ + return STATUS_SUCCESS; +} + +static NTSTATUS +StartDevice( IN PDEVICE_OBJECT DeviceObject) { PUSBMP_DEVICE_EXTENSION DeviceExtension; NTSTATUS Status; - + DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; - + /* Register device interface for root hub */ Status = IoRegisterDeviceInterface( DeviceObject, @@ -206,15 +267,15 @@ &DeviceExtension->HcdInterfaceName); if (!NT_SUCCESS(Status)) { - DPRINT("USBMP: IoRegisterDeviceInterface() failed with status 0x%08lx\n", Status); + DPRINT("IoRegisterDeviceInterface() failed with status 0x%08lx\n", Status); return Status; } - + return Status; } -NTSTATUS STDCALL -UsbMpPnpPdo( +NTSTATUS +UsbMpPdoPnp( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { @@ -222,7 +283,7 @@ PIO_STACK_LOCATION Stack; ULONG_PTR Information = 0; NTSTATUS Status; - + Stack = IoGetCurrentIrpStackLocation(Irp); MinorFunction = Stack->MinorFunction; @@ -230,15 +291,15 @@ { case IRP_MN_START_DEVICE: /* 0x00 */ { - DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_START_DEVICE\n"); - Status = UsbMpPnpStartDevice(DeviceObject); + DPRINT("IRP_MJ_PNP / IRP_MN_START_DEVICE\n"); + Status = StartDevice(DeviceObject); break; } case IRP_MN_QUERY_CAPABILITIES: /* 0x09 */ { PDEVICE_CAPABILITIES DeviceCapabilities; ULONG i; - DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_CAPABILITIES\n"); + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_CAPABILITIES\n"); DeviceCapabilities = (PDEVICE_CAPABILITIES)Stack->Parameters.DeviceCapabilities.Capabilities; /* FIXME: capabilities can change with connected device */ @@ -264,7 +325,7 @@ } case IRP_MN_QUERY_RESOURCES: /* 0x0a */ { - DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_RESOURCES\n"); + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCES\n"); /* Root buses don't need resources, except the ones of * the usb controller. This PDO is the root bus PDO, so * report no resource by not changing Information and @@ -276,7 +337,7 @@ } case IRP_MN_QUERY_RESOURCE_REQUIREMENTS: /* 0x0b */ { - DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n"); + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n"); /* Root buses don't need resources, except the ones of * the usb controller. This PDO is the root bus PDO, so * report no resource by not changing Information and @@ -294,9 +355,9 @@ { UNICODE_STRING SourceString = RTL_CONSTANT_STRING(L"Root USB hub"); UNICODE_STRING Description; - - DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / DeviceTextDescription\n"); - + + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / DeviceTextDescription\n"); + Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, &SourceString, &Description); if (NT_SUCCESS(Status)) Information = (ULONG_PTR)Description.Buffer; @@ -313,8 +374,9 @@ } default: { - DPRINT1("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / unknown type 0x%lx\n", + DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / unknown type 0x%lx\n", Stack->Parameters.QueryDeviceText.DeviceTextType); + ASSERT(FALSE); Status = STATUS_NOT_SUPPORTED; } } @@ -322,7 +384,12 @@ } case IRP_MN_QUERY_ID: /* 0x13 */ { - Status = UsbMpPdoQueryId(DeviceObject, Irp, &Information); + Status = QueryId(DeviceObject, Irp, &Information); + break; + } + case IRP_MN_QUERY_BUS_INFORMATION: /* 0x15 */ + { + Status = QueryBusInformation(DeviceObject, Irp, &Information); break; } default: @@ -330,9 +397,10 @@ /* We can't forward request to the lower driver, because * we are a Pdo, so we don't have lower driver... */ - DPRINT1("USBMP: IRP_MJ_PNP / unknown minor function 0x%lx\n", MinorFunction); + DPRINT1("IRP_MJ_PNP / unknown minor function 0x%lx\n", MinorFunction); Information = Irp->IoStatus.Information; Status = Irp->IoStatus.Status; + ASSERT(FALSE); } } @@ -342,3 +410,217 @@ return Status; } +NTSTATUS +UsbMpPdoInternalDeviceControl( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + NTSTATUS Status = STATUS_INVALID_DEVICE_REQUEST; + + DPRINT("UsbMpDeviceInternalControlPdo(DO %p, code 0x%lx) called\n", + DeviceObject, + IoGetCurrentIrpStackLocation(Irp)->Parameters.DeviceIoControl.IoControlCode); + + if (DeviceObject == KeyboardFdo) + { + // it's keyboard's IOCTL + PIO_STACK_LOCATION Stk; + + Irp->IoStatus.Information = 0; + Stk = IoGetCurrentIrpStackLocation(Irp); + + switch (Stk->Parameters.DeviceIoControl.IoControlCode) + { + case IOCTL_INTERNAL_KEYBOARD_CONNECT: + DPRINT("IOCTL_INTERNAL_KEYBOARD_CONNECT\n"); + if (Stk->Parameters.DeviceIoControl.InputBufferLength < sizeof(CONNECT_DATA)) { + DPRINT1("Keyboard IOCTL_INTERNAL_KEYBOARD_CONNECT " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + goto intcontfailure; + } + + RtlCopyMemory(&KbdClassInformation, + Stk->Parameters.DeviceIoControl.Type3InputBuffer, + sizeof(CONNECT_DATA)); + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + + case IOCTL_INTERNAL_I8042_KEYBOARD_WRITE_BUFFER: + DPRINT("IOCTL_INTERNAL_I8042_KEYBOARD_WRITE_BUFFER\n"); + if (Stk->Parameters.DeviceIoControl.InputBufferLength < 1) { + Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + goto intcontfailure; + } +/* if (!DevExt->KeyboardInterruptObject) { + Irp->IoStatus.Status = STATUS_DEVICE_NOT_READY; + goto intcontfailure; + }*/ + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + case IOCTL_KEYBOARD_QUERY_ATTRIBUTES: + DPRINT("IOCTL_KEYBOARD_QUERY_ATTRIBUTES\n"); + if (Stk->Parameters.DeviceIoControl.OutputBufferLength < + sizeof(KEYBOARD_ATTRIBUTES)) { + DPRINT("Keyboard IOCTL_KEYBOARD_QUERY_ATTRIBUTES: " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + goto intcontfailure; + } + /*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, + &DevExt->KeyboardAttributes, + sizeof(KEYBOARD_ATTRIBUTES));*/ + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + case IOCTL_KEYBOARD_QUERY_INDICATORS: + DPRINT("IOCTL_KEYBOARD_QUERY_INDICATORS\n"); + if (Stk->Parameters.DeviceIoControl.OutputBufferLength < + sizeof(KEYBOARD_INDICATOR_PARAMETERS)) { + DPRINT("Keyboard IOCTL_KEYBOARD_QUERY_INDICATORS: " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + goto intcontfailure; + } + /*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, + &DevExt->KeyboardIndicators, + sizeof(KEYBOARD_INDICATOR_PARAMETERS));*/ + + Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; + break; + case IOCTL_KEYBOARD_QUERY_TYPEMATIC: + DPRINT("IOCTL_KEYBOARD_QUERY_TYPEMATIC\n"); + if (Stk->Parameters.DeviceIoControl.OutputBufferLength < + sizeof(KEYBOARD_TYPEMATIC_PARAMETERS)) { + DPRINT("Keyboard IOCTL_KEYBOARD_QUERY_TYPEMATIC: " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + goto intcontfailure; + } + /*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, + &DevExt->KeyboardTypematic, + sizeof(KEYBOARD_TYPEMATIC_PARAMETERS));*/ + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + case IOCTL_KEYBOARD_SET_INDICATORS: + DPRINT("IOCTL_KEYBOARD_SET_INDICATORS\n"); + if (Stk->Parameters.DeviceIoControl.InputBufferLength < + sizeof(KEYBOARD_INDICATOR_PARAMETERS)) { + DPRINT("Keyboard IOCTL_KEYBOARD_SET_INDICTATORS: " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + goto intcontfailure; + } + + /*RtlCopyMemory(&DevExt->KeyboardIndicators, + Irp->AssociatedIrp.SystemBuffer, + sizeof(KEYBOARD_INDICATOR_PARAMETERS));*/ + + //DPRINT("%x\n", DevExt->KeyboardIndicators.LedFlags); + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + case IOCTL_KEYBOARD_SET_TYPEMATIC: + DPRINT("IOCTL_KEYBOARD_SET_TYPEMATIC\n"); + if (Stk->Parameters.DeviceIoControl.InputBufferLength < + sizeof(KEYBOARD_TYPEMATIC_PARAMETERS)) { + DPRINT("Keyboard IOCTL_KEYBOARD_SET_TYPEMATIC " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + goto intcontfailure; + } + + /*RtlCopyMemory(&DevExt->KeyboardTypematic, + Irp->AssociatedIrp.SystemBuffer, + sizeof(KEYBOARD_TYPEMATIC_PARAMETERS));*/ + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + case IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION: + /* We should check the UnitID, but it's kind of pointless as + * all keyboards are supposed to have the same one + */ +#if 0 + DPRINT("IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION\n"); + if (Stk->Parameters.DeviceIoControl.OutputBufferLength < + sizeof(LOCAL_KEYBOARD_INDICATOR_TRANSLATION)) { + DPRINT("IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION: " + "invalid buffer size (expected)\n"); + /* It's to query the buffer size */ + Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + goto intcontfailure; + } + Irp->IoStatus.Information = + sizeof(LOCAL_KEYBOARD_INDICATOR_TRANSLATION); +#endif + /*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, + &IndicatorTranslation, + sizeof(LOCAL_KEYBOARD_INDICATOR_TRANSLATION));*/ + + Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; + break; + case IOCTL_INTERNAL_I8042_HOOK_KEYBOARD: + /* Nothing to do here */ + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + default: + Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST; + break; + } + + intcontfailure: + Status = Irp->IoStatus.Status; + } + else if (DeviceObject == MouseFdo) + { + // it's mouse's IOCTL + PIO_STACK_LOCATION Stk; + + Irp->IoStatus.Information = 0; + Stk = IoGetCurrentIrpStackLocation(Irp); + + switch (Stk->Parameters.DeviceIoControl.IoControlCode) + { + case IOCTL_INTERNAL_MOUSE_CONNECT: + DPRINT("IOCTL_INTERNAL_MOUSE_CONNECT\n"); + if (Stk->Parameters.DeviceIoControl.InputBufferLength < sizeof(CONNECT_DATA)) { + DPRINT1("IOCTL_INTERNAL_MOUSE_CONNECT: " + "invalid buffer size\n"); + Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + goto intcontfailure2; + } + + RtlCopyMemory(&MouseClassInformation, + Stk->Parameters.DeviceIoControl.Type3InputBuffer, + sizeof(CONNECT_DATA)); + + Irp->IoStatus.Status = STATUS_SUCCESS; + break; + + default: + Irp->IoStatus.Status = STATUS_SUCCESS;//STATUS_INVALID_DEVICE_REQUEST; + break; + } + intcontfailure2: + Status = Irp->IoStatus.Status; + } + else + { + DPRINT("We got IOCTL for UsbCore\n"); + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; + } + + + if (Status == STATUS_INVALID_DEVICE_REQUEST) { + DPRINT1("Invalid internal device request!\n"); + } + + if (Status != STATUS_PENDING) + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return Status; +} Modified: trunk/reactos/drivers/usb/miniport/common/usbcommon.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/usb/miniport/common…
============================================================================== --- trunk/reactos/drivers/usb/miniport/common/usbcommon.h (original) +++ trunk/reactos/drivers/usb/miniport/common/usbcommon.h Sat May 6 18:36:52 2006 @@ -20,37 +20,29 @@ extern PDEVICE_OBJECT KeyboardFdo; extern PDEVICE_OBJECT MouseFdo; -/* cleanup.c */ -NTSTATUS STDCALL -UsbMpCleanup( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp); - -/* close.c */ -NTSTATUS STDCALL -UsbMpClose( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp); - -/* create.c */ -NTSTATUS STDCALL -UsbMpCreate( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp); - /* fdo.c */ -NTSTATUS STDCALL -UsbMpPnpFdo( +NTSTATUS +UsbMpFdoCreate( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); NTSTATUS -UsbMpDeviceControlFdo( +UsbMpFdoClose( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); NTSTATUS -UsbMpInternalDeviceControlFdo( +UsbMpFdoCleanup( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +UsbMpFdoPnp( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +UsbMpFdoDeviceControl( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); @@ -60,7 +52,7 @@ IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); -NTSTATUS STDCALL +NTSTATUS ForwardIrpAndForget( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); @@ -77,18 +69,41 @@ ... /* list of PCSZ */); /* pdo.c */ -NTSTATUS STDCALL -UsbMpPnpPdo( +NTSTATUS +UsbMpPdoCreate( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); NTSTATUS -UsbMpDeviceControlPdo( +UsbMpPdoClose( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); -/* Needed by this object library */ -VOID STDCALL +NTSTATUS +UsbMpPdoCleanup( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +UsbMpPdoPnp( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +UsbMpPdoDeviceControl( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +UsbMpPdoInternalDeviceControl( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +/* + * Needed by this object library, but not + * present in any file of this library + */ +VOID NTAPI DriverUnload(PDRIVER_OBJECT DriverObject); NTSTATUS
18 years, 11 months
1
0
0
0
[janderwald] 21811: * enable advanced mouse options in apply thnx Christoph_Vw
by janderwald@svn.reactos.org
Author: janderwald Date: Sat May 6 15:26:27 2006 New Revision: 21811 URL:
http://svn.reactos.ru/svn/reactos?rev=21811&view=rev
Log: * enable advanced mouse options in apply thnx Christoph_Vw Modified: trunk/reactos/dll/cpl/main/mouse.c Modified: trunk/reactos/dll/cpl/main/mouse.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/main/mouse.c?rev=21…
============================================================================== --- trunk/reactos/dll/cpl/main/mouse.c (original) +++ trunk/reactos/dll/cpl/main/mouse.c Sat May 6 15:26:27 2006 @@ -34,6 +34,8 @@ // add missing icons // Options- pointer precision +#define WINVER 0x0501 + #include <windows.h> #include <winuser.h> #include <devguid.h> @@ -132,7 +134,6 @@ /* wheel scroll lines */ SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &g_WheelScrollLines, 0); -#if (WINVER >= 0x0500) //FIXME //pointer precision // SPI_GETMOUSE? @@ -153,8 +154,6 @@ /* show pointer with Ctrl-Key */ SystemParametersInfo(SPI_GETMOUSESONAR, 0, &g_ShowPointer, 0); -#endif - return TRUE; } @@ -677,7 +676,6 @@ { EnumerateCursorSchemes(hwndDlg); RefreshCursorList(hwndDlg); -#if (WINVER >= 0x0500) /* drop shadow */ SystemParametersInfo(SPI_GETDROPSHADOW, 0, &g_DropShadow, 0); if (g_DropShadow) @@ -685,7 +683,6 @@ hDlgCtrl = GetDlgItem(hwndDlg, IDC_CHECK_DROP_SHADOW); SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0); } -#endif if ((INT)wParam == IDC_LISTVIEW_CURSOR) return TRUE; else @@ -1033,7 +1030,6 @@ SystemParametersInfo(SPI_SETMOUSETRAILS, lResult, 0, SPIF_SENDCHANGE); -#if (WINVER >= 0x0500) //FIXME //pointer precision //SPI_SETMOUSE? @@ -1049,8 +1045,6 @@ /* show pointer with Ctrl-Key */ SystemParametersInfo(SPI_SETMOUSESONAR, 0, (PVOID)g_ShowPointer, SPIF_SENDCHANGE); -#endif - SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR); return TRUE; }
18 years, 11 months
1
0
0
0
[janderwald] 21810: * ident code * enable apply button when slider pos change
by janderwald@svn.reactos.org
Author: janderwald Date: Sat May 6 15:10:27 2006 New Revision: 21810 URL:
http://svn.reactos.ru/svn/reactos?rev=21810&view=rev
Log: * ident code * enable apply button when slider pos change Modified: trunk/reactos/dll/cpl/main/mouse.c Modified: trunk/reactos/dll/cpl/main/mouse.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/main/mouse.c?rev=21…
============================================================================== --- trunk/reactos/dll/cpl/main/mouse.c (original) +++ trunk/reactos/dll/cpl/main/mouse.c Sat May 6 15:10:27 2006 @@ -311,21 +311,26 @@ } case WM_DRAWITEM: { - LPDRAWITEMSTRUCT drawItem; - drawItem = (LPDRAWITEMSTRUCT)lParam; - if(drawItem->CtlID == IDC_IMAGE_SWAP_MOUSE) - { - //FIXME - //show mouse with left/right button highlighted - // depending on val g_SwapMouseButtons - return TRUE; - } - else if (drawItem->CtlID == IDC_IMAGE_DOUBLE_CLICK_SPEED) - { - //FIXME - //measure click speed && draw item - } - break; + LPDRAWITEMSTRUCT drawItem; + drawItem = (LPDRAWITEMSTRUCT)lParam; + if(drawItem->CtlID == IDC_IMAGE_SWAP_MOUSE) + { + //FIXME + //show mouse with left/right button highlighted + // depending on val g_SwapMouseButtons + return TRUE; + } + else if (drawItem->CtlID == IDC_IMAGE_DOUBLE_CLICK_SPEED) + { + //FIXME + //measure click speed && draw item + } + break; + } + case WM_HSCROLL: + { + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + break; } } return FALSE; @@ -1049,9 +1054,13 @@ SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR); return TRUE; } - - } - + break; + } + case WM_HSCROLL: + { + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + break; + } } return FALSE; }
18 years, 11 months
1
0
0
0
[cwittich] 21809: -lock the year edit control
by cwittich@svn.reactos.org
Author: cwittich Date: Sat May 6 01:55:27 2006 New Revision: 21809 URL:
http://svn.reactos.ru/svn/reactos?rev=21809&view=rev
Log: -lock the year edit control Modified: trunk/reactos/dll/cpl/timedate/Cz.rc trunk/reactos/dll/cpl/timedate/De.rc trunk/reactos/dll/cpl/timedate/Dk.rc trunk/reactos/dll/cpl/timedate/En.rc trunk/reactos/dll/cpl/timedate/Es.rc trunk/reactos/dll/cpl/timedate/Fr.rc trunk/reactos/dll/cpl/timedate/Gr.rc trunk/reactos/dll/cpl/timedate/Hu.rc trunk/reactos/dll/cpl/timedate/Ja.rc trunk/reactos/dll/cpl/timedate/Nl.rc trunk/reactos/dll/cpl/timedate/Pl.rc trunk/reactos/dll/cpl/timedate/Ru.rc trunk/reactos/dll/cpl/timedate/Sv.rc trunk/reactos/dll/cpl/timedate/timedate.c Modified: trunk/reactos/dll/cpl/timedate/Cz.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Cz.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/Cz.rc (original) +++ trunk/reactos/dll/cpl/timedate/Cz.rc Sat May 6 01:55:27 2006 @@ -7,7 +7,7 @@ BEGIN GROUPBOX "&Datum", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/De.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/De.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/De.rc (original) +++ trunk/reactos/dll/cpl/timedate/De.rc Sat May 6 01:55:27 2006 @@ -8,7 +8,7 @@ BEGIN GROUPBOX "&Datum", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/Dk.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Dk.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/Dk.rc (original) +++ trunk/reactos/dll/cpl/timedate/Dk.rc Sat May 6 01:55:27 2006 @@ -7,7 +7,7 @@ BEGIN GROUPBOX "&Dato", -1, 4, 2, 126, 133 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/En.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/En.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/En.rc (original) +++ trunk/reactos/dll/cpl/timedate/En.rc Sat May 6 01:55:27 2006 @@ -7,7 +7,7 @@ BEGIN GROUPBOX "&Date", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/Es.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Es.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/Es.rc (original) +++ trunk/reactos/dll/cpl/timedate/Es.rc Sat May 6 01:55:27 2006 @@ -7,7 +7,7 @@ BEGIN GROUPBOX "&Dia", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/Fr.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Fr.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/Fr.rc (original) +++ trunk/reactos/dll/cpl/timedate/Fr.rc Sat May 6 01:55:27 2006 @@ -7,7 +7,7 @@ BEGIN GROUPBOX "&Date", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/Gr.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Gr.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/Gr.rc (original) +++ trunk/reactos/dll/cpl/timedate/Gr.rc Sat May 6 01:55:27 2006 @@ -7,7 +7,7 @@ BEGIN GROUPBOX "&Çìåñïìçíßá", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/Hu.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Hu.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/Hu.rc (original) +++ trunk/reactos/dll/cpl/timedate/Hu.rc Sat May 6 01:55:27 2006 @@ -8,7 +8,7 @@ BEGIN GROUPBOX "&Dátum", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/Ja.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Ja.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/Ja.rc (original) +++ trunk/reactos/dll/cpl/timedate/Ja.rc Sat May 6 01:55:27 2006 @@ -7,7 +7,7 @@ BEGIN GROUPBOX "út(&D)", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/Nl.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Nl.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/Nl.rc (original) +++ trunk/reactos/dll/cpl/timedate/Nl.rc Sat May 6 01:55:27 2006 @@ -7,7 +7,7 @@ BEGIN GROUPBOX "Da&tum", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/Pl.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Pl.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/Pl.rc (original) +++ trunk/reactos/dll/cpl/timedate/Pl.rc Sat May 6 01:55:27 2006 @@ -9,7 +9,7 @@ BEGIN GROUPBOX "&Data", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/Ru.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Ru.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/Ru.rc (original) +++ trunk/reactos/dll/cpl/timedate/Ru.rc Sat May 6 01:55:27 2006 @@ -7,7 +7,7 @@ BEGIN GROUPBOX "&Äàòà", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/Sv.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Sv.rc?rev=…
============================================================================== --- trunk/reactos/dll/cpl/timedate/Sv.rc (original) +++ trunk/reactos/dll/cpl/timedate/Sv.rc Sat May 6 01:55:27 2006 @@ -12,7 +12,7 @@ BEGIN GROUPBOX "&Datum", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 Modified: trunk/reactos/dll/cpl/timedate/timedate.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.c…
============================================================================== --- trunk/reactos/dll/cpl/timedate/timedate.c (original) +++ trunk/reactos/dll/cpl/timedate/timedate.c Sat May 6 01:55:27 2006 @@ -345,7 +345,12 @@ } break; } - + case WM_CTLCOLORSTATIC: + { + if ((HWND) lParam == GetDlgItem(hwndDlg, IDC_YEARTEXT)) + return (int) GetSysColorBrush(COLOR_WINDOW); + break; + } case WM_NOTIFY: { LPNMHDR lpnm = (LPNMHDR)lParam;
18 years, 11 months
1
0
0
0
[fireball] 21808: - SVN maintenance (set eol-style to native)
by fireball@svn.reactos.org
Author: fireball Date: Fri May 5 22:13:26 2006 New Revision: 21808 URL:
http://svn.reactos.ru/svn/reactos?rev=21808&view=rev
Log: - SVN maintenance (set eol-style to native) Modified: trunk/reactos/include/ndk/cmfuncs.h (contents, props changed) trunk/reactos/include/ndk/cmtypes.h (contents, props changed) trunk/reactos/include/ndk/dbgkfuncs.h (contents, props changed) trunk/reactos/include/ndk/exfuncs.h (contents, props changed) trunk/reactos/include/ndk/fixmes.txt (contents, props changed) trunk/reactos/include/ndk/ifssupp.h (contents, props changed) trunk/reactos/include/ndk/lpcfuncs.h (contents, props changed) trunk/reactos/include/ndk/pofuncs.h (contents, props changed) trunk/reactos/include/ndk/readme.txt (contents, props changed) [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/include/ndk/cmfuncs.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ndk/cmfuncs.h?rev=2…
Modified: trunk/reactos/include/ndk/cmtypes.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ndk/cmtypes.h?rev=2…
Modified: trunk/reactos/include/ndk/dbgkfuncs.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ndk/dbgkfuncs.h?rev…
Modified: trunk/reactos/include/ndk/exfuncs.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ndk/exfuncs.h?rev=2…
Modified: trunk/reactos/include/ndk/fixmes.txt URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ndk/fixmes.txt?rev=…
Modified: trunk/reactos/include/ndk/ifssupp.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ndk/ifssupp.h?rev=2…
Modified: trunk/reactos/include/ndk/lpcfuncs.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ndk/lpcfuncs.h?rev=…
Modified: trunk/reactos/include/ndk/pofuncs.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ndk/pofuncs.h?rev=2…
Modified: trunk/reactos/include/ndk/readme.txt URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ndk/readme.txt?rev=…
18 years, 11 months
1
0
0
0
[fireball] 21807: Move OBJ_NAME_PATH_SEPARATOR to ndk/obtypes.h (inspired by w3seek). Should make applying NDK patch easier.
by fireball@svn.reactos.org
Author: fireball Date: Fri May 5 21:46:05 2006 New Revision: 21807 URL:
http://svn.reactos.ru/svn/reactos?rev=21807&view=rev
Log: Move OBJ_NAME_PATH_SEPARATOR to ndk/obtypes.h (inspired by w3seek). Should make applying NDK patch easier. Modified: trunk/reactos/dll/win32/ws2help/ws2help.h trunk/reactos/dll/win32/wshirda/wshirda.h trunk/reactos/drivers/network/wshtcpip/wshtcpip.h trunk/reactos/include/ndk/obtypes.h Modified: trunk/reactos/dll/win32/ws2help/ws2help.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/ws2help/ws2help.h…
============================================================================== --- trunk/reactos/dll/win32/ws2help/ws2help.h (original) +++ trunk/reactos/dll/win32/ws2help/ws2help.h Fri May 5 21:46:05 2006 @@ -16,9 +16,6 @@ #define EXPORT STDCALL -#define OBJ_NAME_PATH_SEPARATOR ((WCHAR)L'\\') - - #endif /* __WS2HELP_H */ /* EOF */ Modified: trunk/reactos/dll/win32/wshirda/wshirda.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/wshirda/wshirda.h…
============================================================================== --- trunk/reactos/dll/win32/wshirda/wshirda.h (original) +++ trunk/reactos/dll/win32/wshirda/wshirda.h Fri May 5 21:46:05 2006 @@ -16,9 +16,6 @@ #define EXPORT STDCALL -#define OBJ_NAME_PATH_SEPARATOR ((WCHAR)L'\\') - - #endif /* __WSHIRDA_H */ /* EOF */ Modified: trunk/reactos/drivers/network/wshtcpip/wshtcpip.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/network/wshtcpip/ws…
============================================================================== --- trunk/reactos/drivers/network/wshtcpip/wshtcpip.h (original) +++ trunk/reactos/drivers/network/wshtcpip/wshtcpip.h Fri May 5 21:46:05 2006 @@ -12,8 +12,6 @@ #include <rtlfuncs.h> #define EXPORT STDCALL - -#define OBJ_NAME_PATH_SEPARATOR ((WCHAR)L'\\') #define DD_TCP_DEVICE_NAME L"\\Device\\Tcp" #define DD_UDP_DEVICE_NAME L"\\Device\\Udp" Modified: trunk/reactos/include/ndk/obtypes.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ndk/obtypes.h?rev=2…
============================================================================== --- trunk/reactos/include/ndk/obtypes.h (original) +++ trunk/reactos/include/ndk/obtypes.h Fri May 5 21:46:05 2006 @@ -56,6 +56,11 @@ #define DIRECTORY_CREATE_OBJECT 0x0004 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008 #define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF) + +// +// Slash separator used in the OB Namespace (and Registry) +// +#define OBJ_NAME_PATH_SEPARATOR L'\\' #else
18 years, 11 months
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
37
38
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
Results per page:
10
25
50
100
200