ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2014
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
17 participants
387 discussions
Start a n
N
ew thread
[hbelusca] 65906: [CALC] Use RegCreateKeyEx to be able to create the settings registry key in case it doesn't already exist. Patch by Ricardo Hanke. CORE-8986 #resolve #comment Fixed, thanks!
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Dec 30 12:21:04 2014 New Revision: 65906 URL:
http://svn.reactos.org/svn/reactos?rev=65906&view=rev
Log: [CALC] Use RegCreateKeyEx to be able to create the settings registry key in case it doesn't already exist. Patch by Ricardo Hanke. CORE-8986 #resolve #comment Fixed, thanks! Modified: trunk/reactos/base/applications/calc/winmain.c Modified: trunk/reactos/base/applications/calc/winmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/win…
============================================================================== --- trunk/reactos/base/applications/calc/winmain.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/calc/winmain.c [iso-8859-1] Tue Dec 30 12:21:04 2014 @@ -286,7 +286,7 @@ HKEY hKey; DWORD sepValue; - if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\Calc"), 0, KEY_ALL_ACCESS, &hKey) != ERROR_SUCCESS ) + if (RegCreateKeyEx(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\Calc"), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hKey, NULL) != ERROR_SUCCESS) { return; }
9 years, 11 months
1
0
0
0
[hpoussin] 65905: [FREELDR] Make the disk read buffer size dynamic CORE-8772 CORE-8899 #resolve #comment Should be fixed in r65904. Thanks for reporting.
by hpoussin@svn.reactos.org
Author: hpoussin Date: Tue Dec 30 11:53:09 2014 New Revision: 65905 URL:
http://svn.reactos.org/svn/reactos?rev=65905&view=rev
Log: [FREELDR] Make the disk read buffer size dynamic CORE-8772 CORE-8899 #resolve #comment Should be fixed in r65904. Thanks for reporting. Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c [iso-8859-1] Tue Dec 30 11:53:09 2014 @@ -119,7 +119,7 @@ ULONGLONG SectorOffset; TotalSectors = (N + Context->SectorSize - 1) / Context->SectorSize; - MaxSectors = DISKREADBUFFER_SIZE / Context->SectorSize; + MaxSectors = PcDiskReadBufferSize / Context->SectorSize; SectorOffset = Context->SectorNumber + Context->SectorOffset; ret = 1; Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c [iso-8859-1] Tue Dec 30 11:53:09 2014 @@ -40,6 +40,7 @@ BIOS_MEMORY_MAP PcBiosMemoryMap[MAX_BIOS_DESCRIPTORS]; ULONG PcBiosMapCount; +ULONG PcDiskReadBufferSize; FREELDR_MEMORY_DESCRIPTOR PcMemoryMap[MAX_BIOS_DESCRIPTORS + 1] = { @@ -201,7 +202,7 @@ bit value at address 0x413 inside the BDA, which gives us the usable size in KB */ Size = (*(PUSHORT)(ULONG_PTR)0x413) * 1024; - if (Size < MEMORY_MARGIN) + if (Size < DISKREADBUFFER || Size - DISKREADBUFFER < MIN_DISKREADBUFFER_SIZE) { FrLdrBugCheckWithMessage( MEMORY_INIT_FAILURE, @@ -211,6 +212,12 @@ "If you see this, please report to the ReactOS team!", Size); } + PcDiskReadBufferSize = (Size - DISKREADBUFFER) & ~0xfff; + if (PcDiskReadBufferSize > MAX_DISKREADBUFFER_SIZE) + { + PcDiskReadBufferSize = MAX_DISKREADBUFFER_SIZE; + } + TRACE("PcDiskReadBufferSize=0x%x\n", PcDiskReadBufferSize); /* Get the address of the Extended BIOS Data Area (EBDA). * Int 15h, AH=C1h @@ -229,7 +236,7 @@ { /* Check if this is high enough */ ULONG EbdaBase = (ULONG)Regs.w.es << 4; - if (EbdaBase < MEMORY_MARGIN) + if (EbdaBase < DISKREADBUFFER || EbdaBase - DISKREADBUFFER < MIN_DISKREADBUFFER_SIZE) { FrLdrBugCheckWithMessage( MEMORY_INIT_FAILURE, @@ -238,6 +245,11 @@ "The location of your EBDA is 0x%lx, which is too low!\n\n" "If you see this, please report to the ReactOS team!", EbdaBase); + } + if (((EbdaBase - DISKREADBUFFER) & ~0xfff) < PcDiskReadBufferSize) + { + PcDiskReadBufferSize = (EbdaBase - DISKREADBUFFER) & ~0xfff; + TRACE("After EBDA check, PcDiskReadBufferSize=0x%x\n", PcDiskReadBufferSize); } /* Calculate the (max) size of the EBDA */ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] Tue Dec 30 11:53:09 2014 @@ -198,8 +198,8 @@ while (N > 0) { Length = N; - if (Length > DISKREADBUFFER_SIZE) - Length = DISKREADBUFFER_SIZE; + if (Length > PcDiskReadBufferSize) + Length = PcDiskReadBufferSize; Sectors = (Length + Context->SectorSize - 1) / Context->SectorSize; ret = MachDiskReadLogicalSectors( Context->DriveNumber, @@ -351,11 +351,11 @@ * harddisks. So, we set the buffer to known contents first, then try to * read. If the BIOS reports success but the buffer contents haven't * changed then we fail anyway */ - memset((PVOID) DISKREADBUFFER, 0xcd, DISKREADBUFFER_SIZE); + memset((PVOID) DISKREADBUFFER, 0xcd, PcDiskReadBufferSize); while (MachDiskReadLogicalSectors(0x80 + DiskCount, 0ULL, 1, (PVOID)DISKREADBUFFER)) { Changed = FALSE; - for (i = 0; ! Changed && i < DISKREADBUFFER_SIZE; i++) + for (i = 0; ! Changed && i < PcDiskReadBufferSize; i++) { Changed = ((PUCHAR)DISKREADBUFFER)[i] != 0xcd; } @@ -366,7 +366,7 @@ break; } DiskCount++; - memset((PVOID) DISKREADBUFFER, 0xcd, DISKREADBUFFER_SIZE); + memset((PVOID) DISKREADBUFFER, 0xcd, PcDiskReadBufferSize); } DiskReportError(TRUE); TRACE("BIOS reports %d harddisk%s\n", Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h [iso-8859-1] Tue Dec 30 11:53:09 2014 @@ -63,5 +63,6 @@ extern BIOS_MEMORY_MAP PcBiosMemoryMap[]; extern ULONG PcBiosMapCount; +extern ULONG PcDiskReadBufferSize; /* EOF */ Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h [iso-8859-1] Tue Dec 30 11:53:09 2014 @@ -17,14 +17,14 @@ #define FREELDR_BASE HEX(F800) #define FREELDR_PE_BASE HEX(10000) #define DISKREADBUFFER HEX(8E000) /* Buffer to store data read in from the disk via the BIOS */ -#define MEMORY_MARGIN HEX(9A000) /* Highest usable address */ /* 9F000- 9FFFF is reserved for the EBDA */ #define BIOSCALLBUFSEGMENT (BIOSCALLBUFFER/16) /* Buffer to store temporary data for any Int386() call */ #define BIOSCALLBUFOFFSET HEX(0000) /* Buffer to store temporary data for any Int386() call */ #define BIOSCALLBUFSIZE PAGE_SIZE /* max is sizeof(VESA_SVGA_INFO) = 512 */ #define MAX_FREELDR_PE_SIZE (DISKREADBUFFER - FREELDR_PE_BASE) -#define DISKREADBUFFER_SIZE (MEMORY_MARGIN - DISKREADBUFFER) +#define MIN_DISKREADBUFFER_SIZE HEX(1000) +#define MAX_DISKREADBUFFER_SIZE HEX(20000) /* These addresses specify the realmode "BSS section" layout */ #define BSS_RealModeEntry (BSS_START + 0)
9 years, 11 months
1
0
0
0
[hpoussin] 65904: [RAMDISK] Send the right DeviceObject in IRP_MN_QUERY_DEVICE_RELATIONS
by hpoussin@svn.reactos.org
Author: hpoussin Date: Tue Dec 30 11:53:05 2014 New Revision: 65904 URL:
http://svn.reactos.org/svn/reactos?rev=65904&view=rev
Log: [RAMDISK] Send the right DeviceObject in IRP_MN_QUERY_DEVICE_RELATIONS Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/ramd…
============================================================================== --- trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] Tue Dec 30 11:53:05 2014 @@ -636,7 +636,7 @@ DriveExtension->GuidString = GuidString; DriveExtension->DiskGuid = Input->DiskGuid; DriveExtension->PhysicalDeviceObject = DeviceObject; - DriveExtension->DeviceObject = DeviceObject; + DriveExtension->DeviceObject = RamdiskBusFdo; DriveExtension->AttachedDevice = RamdiskBusFdo; DriveExtension->DiskType = Input->DiskType; DriveExtension->DiskOptions = Input->Options; @@ -1914,7 +1914,7 @@ // // Save the object pointer, and move on // - *DriveDeviceObject++ = DriveExtension->DeviceObject; + *DriveDeviceObject++ = DriveExtension->PhysicalDeviceObject; } if (DriveExtension->State < RamdiskStateBusRemoved) DiskCount++;
9 years, 11 months
1
0
0
0
[hpoussin] 65903: [RAMDISK] Set correct device object in drive extension This allows booting ReactOS livecd using PXE. Welcome ReactOS to the world of computers without harddisk/cdrom.
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Dec 29 23:21:25 2014 New Revision: 65903 URL:
http://svn.reactos.org/svn/reactos?rev=65903&view=rev
Log: [RAMDISK] Set correct device object in drive extension This allows booting ReactOS livecd using PXE. Welcome ReactOS to the world of computers without harddisk/cdrom. Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/ramd…
============================================================================== --- trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] Mon Dec 29 23:21:25 2014 @@ -636,7 +636,7 @@ DriveExtension->GuidString = GuidString; DriveExtension->DiskGuid = Input->DiskGuid; DriveExtension->PhysicalDeviceObject = DeviceObject; - DriveExtension->DeviceObject = RamdiskBusFdo; + DriveExtension->DeviceObject = DeviceObject; DriveExtension->AttachedDevice = RamdiskBusFdo; DriveExtension->DiskType = Input->DiskType; DriveExtension->DiskOptions = Input->Options;
9 years, 11 months
1
0
0
0
[pschweitzer] 65902: [RAMDISK] Implement RamdiskQueryDeviceRelations() when the device is a drive According to Hervé, this allows booting ReactOS livecd using PXE (with one of his patch).
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Dec 29 23:14:42 2014 New Revision: 65902 URL:
http://svn.reactos.org/svn/reactos?rev=65902&view=rev
Log: [RAMDISK] Implement RamdiskQueryDeviceRelations() when the device is a drive According to Hervé, this allows booting ReactOS livecd using PXE (with one of his patch). Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/ramd…
============================================================================== --- trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] Mon Dec 29 23:14:42 2014 @@ -1731,10 +1731,45 @@ DeviceExtension = DeviceObject->DeviceExtension; if (DeviceExtension->Type == RamdiskDrive) { - // - // FIXME: TODO - // - UNIMPLEMENTED_DBGBREAK(); + NTSTATUS Status; + PDEVICE_RELATIONS DeviceRelations; + + // + // We're a child device, only handle target device relations + // + if (Type != TargetDeviceRelation) + { + Status = Irp->IoStatus.Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; + } + + // + // Allocate a buffer big enough to contain only one DO + // + DeviceRelations = ExAllocatePoolWithTag(PagedPool, sizeof(DeviceRelations), 'dmaR'); + if (DeviceRelations != NULL) + { + // + // Reference the DO and add it to the buffer + // + ObReferenceObject(DeviceObject); + DeviceRelations->Objects[0] = DeviceObject; + DeviceRelations->Count = 1; + Status = STATUS_SUCCESS; + } + else + { + Status = STATUS_INSUFFICIENT_RESOURCES; + } + + // + // Return our processing & complete + // + Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations; + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; } //
9 years, 11 months
1
0
0
0
[pschweitzer] 65901: [RAMDISK] Simplify & use IoCopyCurrentIrpStackLocationToNext()
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Dec 29 22:55:21 2014 New Revision: 65901 URL:
http://svn.reactos.org/svn/reactos?rev=65901&view=rev
Log: [RAMDISK] Simplify & use IoCopyCurrentIrpStackLocationToNext() Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/ramd…
============================================================================== --- trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] Mon Dec 29 22:55:21 2014 @@ -2297,7 +2297,7 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - PIO_STACK_LOCATION IoStackLocation, NextIoStack; + PIO_STACK_LOCATION IoStackLocation; PRAMDISK_BUS_EXTENSION DeviceExtension; NTSTATUS Status; UCHAR Minor; @@ -2429,8 +2429,7 @@ // // Prepare next stack to pass it down // - NextIoStack = IoGetNextIrpStackLocation(Irp); - RtlCopyMemory(NextIoStack, IoStackLocation, sizeof(IO_STACK_LOCATION)); + IoCopyCurrentIrpStackLocationToNext(Irp); // // Initialize our notification event & our completion routine
9 years, 11 months
1
0
0
0
[pschweitzer] 65900: [RAMDISK] - Implement RamdiskQueryCapabilities() which is used in case of IRP_MJ_PNP + IRP_MN_QUERY_CAPABILITIES - Implement RamdiskQueryDeviceText() which is used in case of I...
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Dec 29 22:42:11 2014 New Revision: 65900 URL:
http://svn.reactos.org/svn/reactos?rev=65900&view=rev
Log: [RAMDISK] - Implement RamdiskQueryCapabilities() which is used in case of IRP_MJ_PNP + IRP_MN_QUERY_CAPABILITIES - Implement RamdiskQueryDeviceText() which is used in case of IRP_MJ_PNP + IRP_MN_QUERY_DEVICE_TEXT - Implement RamdiskQueryBusInformation() which is used in case of IRP_MJ_PNP + IRP_MN_QUERY_BUS_INFORMATION - Implement RamdiskIoCompletionRoutine() which is the completion routine in case of IRP forwarding - Also implement support for IRP_MJ_PNP + IRP_MN_START_DEVICE - Define the RamdiskDiskInterface GUID This slowly gets RamDisk driver PnP compliant... Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/ramd…
============================================================================== --- trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] Mon Dec 29 22:42:11 2014 @@ -62,6 +62,12 @@ 0x2F8A, 0x410F, 0x80, 0xE4, 0x05, 0xF8, 0x10, 0xE7, 0xA8, 0x8A); + +DEFINE_GUID(RamdiskDiskInterface, + 0x31D909F0, + 0x2CDF, + 0x4A20, + 0x9E, 0xD4, 0x7D, 0x65, 0x47, 0x6C, 0xA7, 0x68); typedef struct _RAMDISK_EXTENSION { @@ -2149,14 +2155,154 @@ NTSTATUS NTAPI +RamdiskQueryCapabilities(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + NTSTATUS Status; + PIO_STACK_LOCATION IoStackLocation; + PDEVICE_CAPABILITIES DeviceCapabilities; + PRAMDISK_DRIVE_EXTENSION DriveExtension; + + IoStackLocation = IoGetCurrentIrpStackLocation(Irp); + DeviceCapabilities = IoStackLocation->Parameters.DeviceCapabilities.Capabilities; + DriveExtension = DeviceObject->DeviceExtension; + + // + // Validate our input buffer + // + if (DeviceCapabilities->Version != 1 || DeviceCapabilities->Size < sizeof(DEVICE_CAPABILITIES)) + { + Status = STATUS_UNSUCCESSFUL; + } + else + { + // + // And set everything we know about our capabilities + // + DeviceCapabilities->Removable = MarkRamdisksAsRemovable; + DeviceCapabilities->UniqueID = TRUE; + DeviceCapabilities->SilentInstall = TRUE; + DeviceCapabilities->RawDeviceOK = TRUE; + DeviceCapabilities->SurpriseRemovalOK = (DriveExtension->DiskType != RAMDISK_REGISTRY_DISK); + DeviceCapabilities->NoDisplayInUI = TRUE; + Status = STATUS_SUCCESS; + } + + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; +} + +NTSTATUS +NTAPI +RamdiskQueryDeviceText(IN PRAMDISK_DRIVE_EXTENSION DriveExtension, + IN PIRP Irp) +{ + NTSTATUS Status; + PIO_STACK_LOCATION IoStackLocation; + DEVICE_TEXT_TYPE DeviceTextType; + PWSTR OutputString = NULL; + + IoStackLocation = IoGetCurrentIrpStackLocation(Irp); + DeviceTextType = IoStackLocation->Parameters.QueryDeviceText.DeviceTextType; + Status = STATUS_SUCCESS; + + // + // Just copy our constants, according to the input + // + switch (DeviceTextType) + { + case DeviceTextDescription: + + OutputString = ExAllocatePoolWithTag(PagedPool, sizeof(L"RamDisk"), 'dmaR'); + if (OutputString == NULL) + { + Status = STATUS_INSUFFICIENT_RESOURCES; + break; + } + + wcsncpy(OutputString, L"RamDisk", sizeof(L"RamDisk") / sizeof(WCHAR)); + + break; + + case DeviceTextLocationInformation: + + OutputString = ExAllocatePoolWithTag(PagedPool, sizeof(L"RamDisk\\0"), 'dmaR'); + if (OutputString == NULL) + { + Status = STATUS_INSUFFICIENT_RESOURCES; + break; + } + + wcsncpy(OutputString, L"RamDisk\\0", sizeof(L"RamDisk\\0") / sizeof(WCHAR)); + + break; + } + + Irp->IoStatus.Status = Status; + Irp->IoStatus.Information = (ULONG_PTR)OutputString; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; +} + +NTSTATUS +NTAPI +RamdiskQueryBusInformation(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PPNP_BUS_INFORMATION PnpBusInfo; + NTSTATUS Status = STATUS_SUCCESS; + + // + // Allocate output memory + // + PnpBusInfo = ExAllocatePoolWithTag(PagedPool, sizeof(PNP_BUS_INFORMATION), 'dmaR'); + if (PnpBusInfo == NULL) + { + Status = STATUS_INSUFFICIENT_RESOURCES; + } + else + { + // + // Copy our bus GUID and set our legacy type + // + RtlCopyMemory(&PnpBusInfo->BusTypeGuid, &GUID_BUS_TYPE_RAMDISK, sizeof(GUID)); + PnpBusInfo->LegacyBusType = PNPBus; + PnpBusInfo->BusNumber = 0; + } + + Irp->IoStatus.Status = Status; + Irp->IoStatus.Information = (ULONG_PTR)PnpBusInfo; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; +} + +NTSTATUS +NTAPI +RamdiskIoCompletionRoutine(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN PVOID Context) + +{ + // + // Just set the event to unlock caller + // + KeSetEvent((PKEVENT)Context, 0, FALSE); + + return STATUS_MORE_PROCESSING_REQUIRED; +} + +NTSTATUS +NTAPI RamdiskPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - PIO_STACK_LOCATION IoStackLocation; + PIO_STACK_LOCATION IoStackLocation, NextIoStack; PRAMDISK_BUS_EXTENSION DeviceExtension; NTSTATUS Status; UCHAR Minor; - + KEVENT Event; + // // Get the device extension and stack location // @@ -2205,8 +2351,113 @@ switch (Minor) { case IRP_MN_START_DEVICE: - - UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor); + + if (DeviceExtension->Type == RamdiskDrive) + { + ULONG ResultLength; + DEVICE_INSTALL_STATE InstallState; + PRAMDISK_DRIVE_EXTENSION DriveExtension = (PRAMDISK_DRIVE_EXTENSION)DeviceExtension; + + // + // If we already have a drive name, free it + // + if (DriveExtension->DriveDeviceName.Buffer) + { + ExFreePool(DriveExtension->DriveDeviceName.Buffer); + } + + // + // Register our device interface + // + if (DriveExtension->DiskType != RAMDISK_REGISTRY_DISK) + { + Status = IoRegisterDeviceInterface(DeviceObject, + &GUID_DEVINTERFACE_VOLUME, + NULL, + &DriveExtension->DriveDeviceName); + } + else + { + Status = IoRegisterDeviceInterface(DeviceObject, + &RamdiskDiskInterface, + NULL, + &DriveExtension->DriveDeviceName); + } + + // + // If we were asked not to assign a drive letter or + // if getting a name failed, just return saying + // we're now started + // + if (DriveExtension->DiskOptions.NoDriveLetter || + DriveExtension->DriveDeviceName.Buffer == NULL) + { + DriveExtension->State = RamdiskStateStarted; + Irp->IoStatus.Status = Status; + break; + } + + // + // Now get our installation state + // + Status = IoGetDeviceProperty(DeviceObject, DevicePropertyInstallState, + sizeof(InstallState), &InstallState, &ResultLength); + // + // If querying the information failed, assume success + // + if (!NT_SUCCESS(Status)) + { + InstallState = InstallStateInstalled; + } + + // + // If we were properly installed, then, enable the interface + // + if (InstallState == InstallStateInstalled) + { + Status = IoSetDeviceInterfaceState(&DriveExtension->DriveDeviceName, TRUE); + } + + // + // We're fine & up + // + DriveExtension->State = RamdiskStateStarted; + Irp->IoStatus.Status = Status; + break; + } + + // + // Prepare next stack to pass it down + // + NextIoStack = IoGetNextIrpStackLocation(Irp); + RtlCopyMemory(NextIoStack, IoStackLocation, sizeof(IO_STACK_LOCATION)); + + // + // Initialize our notification event & our completion routine + // + KeInitializeEvent(&Event, NotificationEvent, FALSE); + IoSetCompletionRoutine(Irp, RamdiskIoCompletionRoutine, &Event, TRUE, TRUE, TRUE); + + // + // Call lower driver + // + Status = IoCallDriver(DeviceExtension->AttachedDevice, Irp); + if (Status == STATUS_PENDING) + { + KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL); + Status = Irp->IoStatus.Status; + } + + // + // If it succeed to start, then, enable ourselve and we're up! + // + if (NT_SUCCESS(Status)) + { + Status = IoSetDeviceInterfaceState(&DeviceExtension->DriveDeviceName, TRUE); + DeviceExtension->State = RamdiskStateStarted; + } + + Irp->IoStatus.Status = Status; break; case IRP_MN_QUERY_STOP_DEVICE: @@ -2286,7 +2537,7 @@ // if (DeviceExtension->Type == RamdiskDrive) { - UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor); + Status = RamdiskQueryBusInformation(DeviceObject, Irp); } break; @@ -2302,7 +2553,7 @@ // if (DeviceExtension->Type == RamdiskDrive) { - UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor); + Status = RamdiskQueryDeviceText((PRAMDISK_DRIVE_EXTENSION)DeviceExtension, Irp); } break; @@ -2325,7 +2576,7 @@ // if (DeviceExtension->Type == RamdiskDrive) { - UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor); + Status = RamdiskQueryCapabilities(DeviceObject, Irp); } break;
9 years, 11 months
1
0
0
0
[ekohl] 65899: [USETUP] Change the partition creation workflow, so that the user is forced to choose a file system type and format a partition after it has been created.
by ekohl@svn.reactos.org
Author: ekohl Date: Mon Dec 29 21:23:30 2014 New Revision: 65899 URL:
http://svn.reactos.org/svn/reactos?rev=65899&view=rev
Log: [USETUP] Change the partition creation workflow, so that the user is forced to choose a file system type and format a partition after it has been created. Modified: trunk/reactos/base/setup/usetup/interface/usetup.c trunk/reactos/base/setup/usetup/partlist.c Modified: trunk/reactos/base/setup/usetup/interface/usetup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
============================================================================== --- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Mon Dec 29 21:23:30 2014 @@ -1618,7 +1618,7 @@ DestinationDriveLetter = (WCHAR)PartitionList->CurrentPartition->DriveLetter; - return SELECT_FILE_SYSTEM_PAGE; + return INSTALL_DIRECTORY_PAGE; } else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'P') /* P */ { @@ -1969,7 +1969,7 @@ return QUIT_PAGE; } - return SELECT_PARTITION_PAGE; + return SELECT_FILE_SYSTEM_PAGE; } } @@ -2279,7 +2279,7 @@ return QUIT_PAGE; } - return SELECT_PARTITION_PAGE; + return SELECT_FILE_SYSTEM_PAGE; } } @@ -2868,7 +2868,11 @@ DestroyFileSystemList(FileSystemList); FileSystemList = NULL; - return INSTALL_DIRECTORY_PAGE; + + if (IsUnattendedSetup) + return INSTALL_DIRECTORY_PAGE; + else + return SELECT_PARTITION_PAGE; } } Modified: trunk/reactos/base/setup/usetup/partlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
============================================================================== --- trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] Mon Dec 29 21:23:30 2014 @@ -2426,6 +2426,8 @@ PartEntry->StartSector.QuadPart = NewPartEntry->StartSector.QuadPart + NewPartEntry->SectorCount.QuadPart; PartEntry->SectorCount.QuadPart -= (PartEntry->StartSector.QuadPart - NewPartEntry->StartSector.QuadPart); + + List->CurrentPartition = NewPartEntry; } UpdateDiskLayout(DiskEntry); @@ -2568,6 +2570,8 @@ DPRINT1("First Sector: %I64u\n", NewPartEntry->StartSector.QuadPart); DPRINT1("Last Sector: %I64u\n", NewPartEntry->StartSector.QuadPart + NewPartEntry->SectorCount.QuadPart - 1); DPRINT1("Total Sectors: %I64u\n", NewPartEntry->SectorCount.QuadPart); + + List->CurrentPartition = NewPartEntry; } AddLogicalDiskSpace(DiskEntry);
9 years, 11 months
1
0
0
0
[pschweitzer] 65898: [RAMDISK] Wait for 1 min max but don't limit the number of acquire, ie: swap inverted args. This fixes ASSERT on use. Spotted by Hervé
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Dec 29 21:22:49 2014 New Revision: 65898 URL:
http://svn.reactos.org/svn/reactos?rev=65898&view=rev
Log: [RAMDISK] Wait for 1 min max but don't limit the number of acquire, ie: swap inverted args. This fixes ASSERT on use. Spotted by Hervé Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/ramd…
============================================================================== --- trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] Mon Dec 29 21:22:49 2014 @@ -623,8 +623,8 @@ ExInitializeFastMutex(&DriveExtension->DiskListLock); IoInitializeRemoveLock(&DriveExtension->RemoveLock, 'dmaR', - 0, - 1); + 1, + 0); DriveExtension->DriveDeviceName = DeviceName; DriveExtension->SymbolicLinkName = SymbolicLinkName; DriveExtension->GuidString = GuidString; @@ -2645,8 +2645,8 @@ ExInitializeFastMutex(&DeviceExtension->DiskListLock); IoInitializeRemoveLock(&DeviceExtension->RemoveLock, 'dmaR', - 0, - 1); + 1, + 0); InitializeListHead(&DeviceExtension->DiskList); DeviceExtension->PhysicalDeviceObject = PhysicalDeviceObject; DeviceExtension->DeviceObject = DeviceObject;
9 years, 11 months
1
0
0
0
[hbelusca] 65897: [RAPPS] Finish Japanese translation, fix by Ai Asano and reported by Marco Maria Emanuele Bartucci. CORE-8983 #resolve #comment Fixed, thanks!
by hbelusca@svn.reactos.org
Author: hbelusca Date: Mon Dec 29 21:12:06 2014 New Revision: 65897 URL:
http://svn.reactos.org/svn/reactos?rev=65897&view=rev
Log: [RAPPS] Finish Japanese translation, fix by Ai Asano and reported by Marco Maria Emanuele Bartucci. CORE-8983 #resolve #comment Fixed, thanks! Modified: trunk/reactos/base/applications/rapps/lang/ja-JP.rc Modified: trunk/reactos/base/applications/rapps/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
============================================================================== --- trunk/reactos/base/applications/rapps/lang/ja-JP.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps/lang/ja-JP.rc [iso-8859-1] Mon Dec 29 21:12:06 2014 @@ -18,7 +18,7 @@ MENUITEM SEPARATOR MENUITEM "æ´æ°(&R)", ID_REFRESH MENUITEM SEPARATOR - MENUITEM "Update Da&tabase", ID_RESETDB + MENUITEM "ã¢ãããã¼ã ãã¼ã¿ãã¼ã¹(&T)", ID_RESETDB END POPUP "ãã«ã" BEGIN @@ -48,7 +48,7 @@ MENUITEM SEPARATOR MENUITEM "æ´æ°(&R)", ID_REFRESH MENUITEM SEPARATOR - MENUITEM "Update Da&tabase", ID_RESETDB + MENUITEM "ã¢ãããã¼ã ãã¼ã¿ãã¼ã¹(&T)", ID_RESETDB END END
9 years, 11 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
39
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Results per page:
10
25
50
100
200