ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2009
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
270 discussions
Start a n
N
ew thread
[cgutman] 43076: - Partial rewrite of CHEW - Remove some unneeded work item usage - Remove an unused member of DISCONNECT_TYPE
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 19 02:58:36 2009 New Revision: 43076 URL:
http://svn.reactos.org/svn/reactos?rev=43076&view=rev
Log: - Partial rewrite of CHEW - Remove some unneeded work item usage - Remove an unused member of DISCONNECT_TYPE Modified: trunk/reactos/drivers/network/tcpip/datalink/lan.c trunk/reactos/drivers/network/tcpip/include/dispatch.h trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c trunk/reactos/include/reactos/chew/chew.h trunk/reactos/lib/drivers/chew/workqueue.c trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c Modified: trunk/reactos/drivers/network/tcpip/datalink/lan.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/data…
============================================================================== --- trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Sat Sep 19 02:58:36 2009 @@ -254,6 +254,8 @@ Adapter = WorkItem->Adapter; BytesTransferred = WorkItem->BytesTransferred; + exFreePool(WorkItem); + IPInitializePacket(&IPPacket, 0); IPPacket.NdisPacket = Packet; @@ -303,18 +305,19 @@ PNDIS_PACKET Packet, NDIS_STATUS Status, UINT BytesTransferred) { - LAN_WQ_ITEM WQItem; + PLAN_WQ_ITEM WQItem = exAllocatePool(NonPagedPool, sizeof(LAN_WQ_ITEM)); PLAN_ADAPTER Adapter = (PLAN_ADAPTER)BindingContext; TI_DbgPrint(DEBUG_DATALINK,("called\n")); - WQItem.Packet = Packet; - WQItem.Adapter = Adapter; - WQItem.BytesTransferred = BytesTransferred; - - if( !ChewCreate - ( NULL, sizeof(LAN_WQ_ITEM), LanReceiveWorker, &WQItem ) ) - ASSERT(0); + if (!WQItem) return; + + WQItem->Packet = Packet; + WQItem->Adapter = Adapter; + WQItem->BytesTransferred = BytesTransferred; + + if (!ChewCreate( LanReceiveWorker, WQItem )) + exFreePool(WQItem); } VOID NTAPI ProtocolTransferDataComplete( Modified: trunk/reactos/drivers/network/tcpip/include/dispatch.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
============================================================================== --- trunk/reactos/drivers/network/tcpip/include/dispatch.h [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/include/dispatch.h [iso-8859-1] Sat Sep 19 02:58:36 2009 @@ -11,7 +11,6 @@ UINT Type; PVOID Context; PIRP Irp; - PFILE_OBJECT FileObject; } DISCONNECT_TYPE, *PDISCONNECT_TYPE; NTSTATUS DispTdiAccept( Modified: trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
============================================================================== --- trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] Sat Sep 19 02:58:36 2009 @@ -118,6 +118,8 @@ TI_DbgPrint(DEBUG_IRP, ("PostCancel: DoDisconnect done\n")); DispDataRequestComplete(DisType->Irp, STATUS_CANCELLED, 0); + + exFreePool(DisType); } VOID NTAPI DispCancelRequest( @@ -134,9 +136,7 @@ PTRANSPORT_CONTEXT TranContext; PFILE_OBJECT FileObject; UCHAR MinorFunction; - DISCONNECT_TYPE DisType; - PVOID WorkItem; - /*NTSTATUS Status = STATUS_SUCCESS;*/ + PDISCONNECT_TYPE DisType; TI_DbgPrint(DEBUG_IRP, ("Called.\n")); @@ -159,19 +159,21 @@ switch(MinorFunction) { case TDI_SEND: case TDI_RECEIVE: - DisType.Type = TDI_DISCONNECT_RELEASE | - ((MinorFunction == TDI_RECEIVE) ? TDI_DISCONNECT_ABORT : 0); - DisType.Context = TranContext->Handle.ConnectionContext; - DisType.Irp = Irp; - DisType.FileObject = FileObject; - - TCPRemoveIRP( TranContext->Handle.ConnectionContext, Irp ); + DisType = exAllocatePool(NonPagedPool, sizeof(DISCONNECT_TYPE)); + if (DisType) + { + DisType->Type = TDI_DISCONNECT_RELEASE | + ((MinorFunction == TDI_RECEIVE) ? TDI_DISCONNECT_ABORT : 0); + DisType->Context = TranContext->Handle.ConnectionContext; + DisType->Irp = Irp; + + TCPRemoveIRP( TranContext->Handle.ConnectionContext, Irp ); + + if (!ChewCreate(DispDoDisconnect, DisType)) + exFreePool(DisType); + } IoReleaseCancelSpinLock(Irp->CancelIrql); - - if( !ChewCreate( &WorkItem, sizeof(DISCONNECT_TYPE), - DispDoDisconnect, &DisType ) ) - ASSERT(0); return; case TDI_SEND_DATAGRAM: Modified: trunk/reactos/include/reactos/chew/chew.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/chew/chew.…
============================================================================== --- trunk/reactos/include/reactos/chew/chew.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/chew/chew.h [iso-8859-1] Sat Sep 19 02:58:36 2009 @@ -16,25 +16,13 @@ */ VOID ChewInit( PDEVICE_OBJECT DeviceObject ); /** - * Shutdown CHEW, including removing remaining work items. + * Shutdown CHEW, waits for remaining work items. */ VOID ChewShutdown(); /** - * Create a work item, or perform the work, based on IRQL. - * At passive level, Worker is called directly on UserSpace. - * At greater than passive level, a work item is created with Bytes - * context area and data copied from UserSpace. - * If a work item is created, Item contains the address and the function - * returns true. - * If the work is performed immediately, Item contains NULL and the - * function returns true. - * Else, the function returns false and Item is undefined. + * Creates and queues a work item. */ BOOLEAN ChewCreate -( PVOID *Item, SIZE_T Bytes, VOID (*Worker)(PVOID), PVOID UserSpace ); -/** - * Remove a work item, given the pointer returned to Item in ChewCreate. - */ -VOID ChewRemove( PVOID Item ); +( VOID (*Worker)(PVOID), PVOID WorkerContext ); #endif/*_REACTOS_CHEW_H*/ Modified: trunk/reactos/lib/drivers/chew/workqueue.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/chew/workqueue…
============================================================================== --- trunk/reactos/lib/drivers/chew/workqueue.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/chew/workqueue.c [iso-8859-1] Sat Sep 19 02:58:36 2009 @@ -11,97 +11,72 @@ #define NDEBUG -#define FOURCC(w,x,y,z) (((w) << 24) | ((x) << 16) | ((y) << 8) | (z)) +#define FOURCC(w,x,y,z) (((w) << 24) | ((x) << 16) | ((y) << 8) | (z)) +#define CHEW_TAG FOURCC('C','H','E','W') PDEVICE_OBJECT WorkQueueDevice; LIST_ENTRY WorkQueue; -KSPIN_LOCK WorkQueueLock; +KSPIN_LOCK WorkQueueLock; +KEVENT WorkQueueClear; typedef struct _WORK_ITEM { LIST_ENTRY Entry; PIO_WORKITEM WorkItem; - VOID (*Worker)( PVOID Data ); - CHAR UserSpace[1]; + VOID (*Worker)( PVOID WorkerContext ); + PVOID WorkerContext; } WORK_ITEM, *PWORK_ITEM; VOID ChewInit( PDEVICE_OBJECT DeviceObject ) { WorkQueueDevice = DeviceObject; InitializeListHead( &WorkQueue ); - KeInitializeSpinLock( &WorkQueueLock ); + KeInitializeSpinLock( &WorkQueueLock ); + KeInitializeEvent(&WorkQueueClear, NotificationEvent, TRUE); } VOID ChewShutdown() { - KIRQL OldIrql; - PLIST_ENTRY Entry; - PWORK_ITEM WorkItem; - - KeAcquireSpinLock( &WorkQueueLock, &OldIrql ); - - while( !IsListEmpty( &WorkQueue ) ) { - Entry = RemoveHeadList( &WorkQueue ); - WorkItem = CONTAINING_RECORD( Entry, WORK_ITEM, Entry ); - IoFreeWorkItem( WorkItem->WorkItem ); - ExFreePool( WorkItem ); - } - - KeReleaseSpinLock( &WorkQueueLock, OldIrql ); + KeWaitForSingleObject(&WorkQueueClear, Executive, KernelMode, FALSE, NULL); } VOID NTAPI ChewWorkItem( PDEVICE_OBJECT DeviceObject, PVOID ChewItem ) { - PWORK_ITEM WorkItem = ChewItem; + PWORK_ITEM WorkItem = ChewItem; + KIRQL OldIrql; - RemoveEntryList( &WorkItem->Entry ); + WorkItem->Worker( WorkItem->WorkerContext ); - if( WorkItem->Worker ) - WorkItem->Worker( WorkItem->UserSpace ); - - IoFreeWorkItem( WorkItem->WorkItem ); - ExFreePool( WorkItem ); + IoFreeWorkItem( WorkItem->WorkItem ); + + KeAcquireSpinLock(&WorkQueueLock, &OldIrql); + RemoveEntryList(&WorkItem->Entry); + + if (IsListEmpty(&WorkQueue)) + KeSetEvent(&WorkQueueClear, 0, FALSE); + KeReleaseSpinLock(&WorkQueueLock, OldIrql); + + ExFreePoolWithTag(WorkItem, CHEW_TAG); } BOOLEAN ChewCreate -( PVOID *ItemPtr, SIZE_T Bytes, VOID (*Worker)( PVOID ), PVOID UserSpace ) { - PWORK_ITEM Item; - - if( KeGetCurrentIrql() == PASSIVE_LEVEL ) { - if( ItemPtr ) - *ItemPtr = NULL; - Worker(UserSpace); +( VOID (*Worker)( PVOID ), PVOID WorkerContext ) { + PWORK_ITEM Item; + Item = ExAllocatePoolWithTag + ( NonPagedPool, + sizeof( WORK_ITEM ), + CHEW_TAG ); + + if( Item ) { + Item->WorkItem = IoAllocateWorkItem( WorkQueueDevice ); + if( !Item->WorkItem ) { + ExFreePool( Item ); + return FALSE; + } + Item->Worker = Worker; + Item->WorkerContext = WorkerContext; + ExInterlockedInsertTailList( &WorkQueue, &Item->Entry, &WorkQueueLock ); + KeResetEvent(&WorkQueueClear); + IoQueueWorkItem( Item->WorkItem, ChewWorkItem, DelayedWorkQueue, Item ); + return TRUE; } else { - Item = ExAllocatePoolWithTag - ( NonPagedPool, - sizeof( WORK_ITEM ) + Bytes - 1, - FOURCC('C','H','E','W') ); - - if( Item ) { - Item->WorkItem = IoAllocateWorkItem( WorkQueueDevice ); - if( !Item->WorkItem ) { - ExFreePool( Item ); - return FALSE; - } - Item->Worker = Worker; - if( Bytes && UserSpace ) - RtlCopyMemory( Item->UserSpace, UserSpace, Bytes ); - - ExInterlockedInsertTailList - ( &WorkQueue, &Item->Entry, &WorkQueueLock ); - IoQueueWorkItem - ( Item->WorkItem, ChewWorkItem, DelayedWorkQueue, Item ); - - if( ItemPtr ) - *ItemPtr = Item; - - return TRUE; - } else { - return FALSE; - } + return FALSE; } } - -VOID ChewRemove( PVOID Item ) { - PWORK_ITEM WorkItem = Item; - RemoveEntryList( &WorkItem->Entry ); - IoFreeWorkItem( WorkItem->WorkItem ); - ExFreePool( WorkItem ); -} Modified: trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
============================================================================== --- trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] Sat Sep 19 02:58:36 2009 @@ -41,39 +41,41 @@ while ((Entry = ExInterlockedRemoveHeadList( &Connection->ReceiveRequest, &Connection->Lock )) != NULL) { - DISCONNECT_TYPE DisType; - PIO_STACK_LOCATION IrpSp; Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry ); Complete = Bucket->Request.RequestNotifyObject; - IrpSp = IoGetCurrentIrpStackLocation((PIRP)Bucket->Request.RequestContext); /* We have to notify oskittcp of the abortion */ - DisType.Type = TDI_DISCONNECT_RELEASE | TDI_DISCONNECT_ABORT; - DisType.Context = Connection; - DisType.Irp = (PIRP)Bucket->Request.RequestContext; - DisType.FileObject = IrpSp->FileObject; - - ChewCreate(NULL, sizeof(DISCONNECT_TYPE), - DispDoDisconnect, &DisType); + TCPDisconnect + ( Connection, + TDI_DISCONNECT_RELEASE | TDI_DISCONNECT_ABORT, + NULL, + NULL, + Bucket->Request.RequestNotifyObject, + (PIRP)Bucket->Request.RequestContext ); + + Complete( Bucket->Request.RequestContext, STATUS_CANCELLED, 0 ); + + exFreePool(Bucket); } while ((Entry = ExInterlockedRemoveHeadList( &Connection->SendRequest, &Connection->Lock )) != NULL) { - DISCONNECT_TYPE DisType; - PIO_STACK_LOCATION IrpSp; Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry ); Complete = Bucket->Request.RequestNotifyObject; - IrpSp = IoGetCurrentIrpStackLocation((PIRP)Bucket->Request.RequestContext); /* We have to notify oskittcp of the abortion */ - DisType.Type = TDI_DISCONNECT_RELEASE; - DisType.Context = Connection; - DisType.Irp = (PIRP)Bucket->Request.RequestContext; - DisType.FileObject = IrpSp->FileObject; - - ChewCreate(NULL, sizeof(DISCONNECT_TYPE), - DispDoDisconnect, &DisType); + TCPDisconnect + ( Connection, + TDI_DISCONNECT_RELEASE, + NULL, + NULL, + Bucket->Request.RequestNotifyObject, + (PIRP)Bucket->Request.RequestContext ); + + Complete( Bucket->Request.RequestContext, STATUS_CANCELLED, 0 ); + + exFreePool(Bucket); } while ((Entry = ExInterlockedRemoveHeadList( &Connection->ListenRequest,
15 years, 3 months
1
0
0
0
[fireball] 43075: - Fix a couple of bugs in the uniata ATA code spotted by bearwindows. ICH8/ICH9/ICH10 should be supported now.
by fireball@svn.reactos.org
Author: fireball Date: Sat Sep 19 00:25:34 2009 New Revision: 43075 URL:
http://svn.reactos.org/svn/reactos?rev=43075&view=rev
Log: - Fix a couple of bugs in the uniata ATA code spotted by bearwindows. ICH8/ICH9/ICH10 should be supported now. Modified: trunk/reactos/drivers/storage/ide/uniata/id_probe.cpp Modified: trunk/reactos/drivers/storage/ide/uniata/id_probe.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/id_probe.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/id_probe.cpp [iso-8859-1] Sat Sep 19 00:25:34 2009 @@ -1040,6 +1040,13 @@ ConfigInfo->AlignmentMask = 0x00000003; + MasterDev = IsMasterDev(&pciData); + + if(MasterDev) { + KdPrint2((PRINT_PREFIX "MasterDev (1)\n")); + deviceExtension->NumberChannels = 1; + } + found = UniataChipDetect(HwDeviceExtension, &pciData, i, ConfigInfo, &simplexOnly); KdPrint2((PRINT_PREFIX "ForceSimplex = %d\n", simplexOnly)); KdPrint2((PRINT_PREFIX "HwFlags = %x\n (0)", deviceExtension->HwFlags)); @@ -1089,14 +1096,6 @@ /* CMD 649, ROSB SWK33, ICH4 */ KdPrint2((PRINT_PREFIX "UniataFindBusMasterController: UNIATA_NO_DPC (0)\n")); deviceExtension->UseDpc = FALSE; - } - - MasterDev = IsMasterDev(&pciData); - - if(MasterDev) { - KdPrint2((PRINT_PREFIX "MasterDev (1)\n")); - deviceExtension->MasterDev = TRUE; - deviceExtension->NumberChannels = 1; } if(MasterDev) { @@ -1242,7 +1241,7 @@ deviceExtension->UseDpc = FALSE; } - if(simplexOnly || !MasterDev /*|| (WinVer_Id() > WinVer_NT)*/) { + if(simplexOnly && MasterDev /*|| (WinVer_Id() > WinVer_NT)*/) { if(deviceExtension->NumberChannels < 2) { KdPrint2((PRINT_PREFIX "set NumberChannels = 2\n")); deviceExtension->NumberChannels = 2;
15 years, 3 months
1
0
0
0
[sginsberg] 43074: - Use msvc intrinsics in HAL instead of Ke386*
by sginsberg@svn.reactos.org
Author: sginsberg Date: Fri Sep 18 22:56:49 2009 New Revision: 43074 URL:
http://svn.reactos.org/svn/reactos?rev=43074&view=rev
Log: - Use msvc intrinsics in HAL instead of Ke386* Modified: trunk/reactos/hal/halx86/generic/bios.c trunk/reactos/hal/halx86/generic/timer.c trunk/reactos/hal/halx86/mp/apic.c trunk/reactos/hal/halx86/mp/mpsirql.c Modified: trunk/reactos/hal/halx86/generic/bios.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/bios.c?…
============================================================================== --- trunk/reactos/hal/halx86/generic/bios.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/bios.c [iso-8859-1] Fri Sep 18 22:56:49 2009 @@ -213,10 +213,10 @@ NTAPI HalpBiosDisplayReset(VOID) { - ULONG Flags = 0; + ULONG Flags; /* Disable interrupts */ - Ke386SaveFlags(Flags); + Flags = __readeflags(); _disable(); /* Map memory available to the V8086 real-mode code */ @@ -241,7 +241,7 @@ HalpUnmapRealModeMemory(); /* Restore interrupts if they were previously enabled */ - Ke386RestoreFlags(Flags); + __writeeflags(Flags); return TRUE; } Modified: trunk/reactos/hal/halx86/generic/timer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/timer.c…
============================================================================== --- trunk/reactos/hal/halx86/generic/timer.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/timer.c [iso-8859-1] Fri Sep 18 22:56:49 2009 @@ -48,7 +48,7 @@ PKPRCB Prcb = KeGetCurrentPrcb(); ULONG Increment; USHORT RollOver; - ULONG Flags = 0; + ULONG Flags; /* Check the CPU Type */ if (Prcb->CpuType <= 4) @@ -67,7 +67,7 @@ KeSetTimeIncrement(Increment, HalpRolloverTable[0].HighPart); /* Disable interrupts */ - Ke386SaveFlags(Flags); + Flags = __readeflags(); _disable(); /* Set the rollover */ @@ -76,7 +76,7 @@ __outbyte(TIMER_DATA_PORT0, RollOver >> 8); /* Restore interrupts if they were previously enabled */ - Ke386RestoreFlags(Flags); + __writeeflags(Flags); /* Save rollover and return */ HalpCurrentRollOver = RollOver; @@ -92,10 +92,10 @@ HalCalibratePerformanceCounter(IN volatile PLONG Count, IN ULONGLONG NewCount) { - ULONG Flags = 0; + ULONG Flags; /* Disable interrupts */ - Ke386SaveFlags(Flags); + Flags = __readeflags(); _disable(); /* Do a decrement for this CPU */ @@ -105,7 +105,7 @@ while (*Count); /* Restore interrupts if they were previously enabled */ - Ke386RestoreFlags(Flags); + __writeeflags(Flags); } /* Modified: trunk/reactos/hal/halx86/mp/apic.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/mp/apic.c?rev=4…
============================================================================== --- trunk/reactos/hal/halx86/mp/apic.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/mp/apic.c [iso-8859-1] Fri Sep 18 22:56:49 2009 @@ -351,7 +351,8 @@ BOOLEAN VerifyLocalAPIC(VOID) { SIZE_T reg0, reg1; - ULONG l = 0, h = 0; + LARGE_INTEGER MsrValue; + /* The version register is read-only in a real APIC */ reg0 = APICRead(APIC_VER); DPRINT1("Getting VERSION: %x\n", reg0); @@ -398,14 +399,14 @@ return FALSE; } - Ke386Rdmsr(0x1b /*MSR_IA32_APICBASE*/, l, h); - - if (!(l & /*MSR_IA32_APICBASE_ENABLE*/(1<<11))) + MsrValue.QuadPart = __readmsr(0x1B /*MSR_IA32_APICBASE*/); + + if (!(MsrValue.LowPart & /*MSR_IA32_APICBASE_ENABLE*/(1<<11))) { DPRINT1("Local APIC disabled by BIOS -- reenabling.\n"); - l &= ~/*MSR_IA32_APICBASE_BASE*/(1<<11); - l |= /*MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE*/(1<<11)|0xfee00000; - Ke386Wrmsr(0x1b/*MSR_IA32_APICBASE*/, l, h); + MsrValue.LowPart &= ~/*MSR_IA32_APICBASE_BASE*/(1<<11); + MsrValue.LowPart |= /*MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE*/(1<<11)|0xfee00000; + __writemsr(0x1B /*MSR_IA32_APICBASE*/, MsrValue.HighPart); } @@ -416,10 +417,10 @@ #ifdef CONFIG_SMP VOID APICSendIPI(ULONG Target, ULONG Mode) { - ULONG tmp, i, flags = 0; + ULONG tmp, i, flags; /* save flags and disable interrupts */ - Ke386SaveFlags(flags); + flags = __readeflags(); _disable(); /* Wait up to 100ms for the APIC to become ready */ @@ -475,7 +476,7 @@ { DPRINT1("CPU(%d) Current IPI was not delivered after 100ms.\n", ThisCPU()); } - Ke386RestoreFlags(flags); + __writeeflags(flags); } #endif Modified: trunk/reactos/hal/halx86/mp/mpsirql.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/mp/mpsirql.c?re…
============================================================================== --- trunk/reactos/hal/halx86/mp/mpsirql.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/mp/mpsirql.c [iso-8859-1] Fri Sep 18 22:56:49 2009 @@ -28,9 +28,9 @@ */ { KIRQL irql; - ULONG Flags = 0; - - Ke386SaveFlags(Flags); + ULONG Flags; + + Flags = __readeflags(); _disable(); irql = __readfsbyte(FIELD_OFFSET(KPCR, Irql)); @@ -53,13 +53,13 @@ * PURPOSE: Sets the current irq level without taking any action */ { - ULONG Flags = 0; + ULONG Flags; if (NewIrql > HIGH_LEVEL) { DPRINT1 ("NewIrql %x\n", NewIrql); ASSERT(FALSE); } - Ke386SaveFlags(Flags); + Flags = __readeflags(); _disable(); __writefsbyte(FIELD_OFFSET(KPCR, Irql), NewIrql); if (Flags & EFLAGS_INTERRUPT_MASK) @@ -71,7 +71,7 @@ VOID HalpLowerIrql(KIRQL NewIrql, BOOLEAN FromHalEndSystemInterrupt) { - ULONG Flags = 0; + ULONG Flags; UCHAR DpcRequested; if (NewIrql >= DISPATCH_LEVEL) { @@ -79,7 +79,7 @@ APICWrite(APIC_TPR, IRQL2TPR (NewIrql) & APIC_TPR_PRI); return; } - Ke386SaveFlags(Flags); + Flags = __readeflags(); if (KeGetCurrentIrql() > APC_LEVEL) { KeSetCurrentIrql (DISPATCH_LEVEL); @@ -188,9 +188,9 @@ KfRaiseIrql (KIRQL NewIrql) { KIRQL OldIrql; - ULONG Flags = 0; + ULONG Flags; - Ke386SaveFlags(Flags); + Flags = __readeflags(); _disable(); OldIrql = KeGetCurrentIrql (); @@ -295,7 +295,7 @@ ULONG Vector, PKIRQL OldIrql) { - ULONG Flags = 0; + ULONG Flags; DPRINT("Vector (0x%X) Irql (0x%X)\n", Vector, Irql); if (KeGetCurrentIrql () >= Irql) @@ -304,7 +304,7 @@ ASSERT(FALSE); } - Ke386SaveFlags(Flags); + Flags = __readeflags(); if (Flags & EFLAGS_INTERRUPT_MASK) { DPRINT1("HalBeginSystemInterrupt was called with interrupt's enabled\n"); @@ -324,8 +324,8 @@ * FUNCTION: Finish a system interrupt and restore the specified irq level. */ { - ULONG Flags = 0; - Ke386SaveFlags(Flags); + ULONG Flags; + Flags = __readeflags(); if (Flags & EFLAGS_INTERRUPT_MASK) {
15 years, 3 months
1
0
0
0
[sginsberg] 43073: - _mingw.h: Don't define __attribute__ to nothing -- this is only good for creating bugs. - sect_attribs.h: Define _CRTALLOC for msvc. Enable #pragma section and add missing .tls and .tls$ZZZ. - mingw runtime: Only use __attribute__((weak)) for gcc. - freeldr: Use #pragma pack instead of __attribute__((packed)). - kernel32: Only alias __cxa_pure_virtual to _purecall for gcc.
by sginsberg@svn.reactos.org
Author: sginsberg Date: Fri Sep 18 17:22:28 2009 New Revision: 43073 URL:
http://svn.reactos.org/svn/reactos?rev=43073&view=rev
Log: - _mingw.h: Don't define __attribute__ to nothing -- this is only good for creating bugs. - sect_attribs.h: Define _CRTALLOC for msvc. Enable #pragma section and add missing .tls and .tls$ZZZ. - mingw runtime: Only use __attribute__((weak)) for gcc. - freeldr: Use #pragma pack instead of __attribute__((packed)). - kernel32: Only alias __cxa_pure_virtual to _purecall for gcc. Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c trunk/reactos/dll/win32/kernel32/misc/icustubs.cpp trunk/reactos/include/crt/_mingw.h trunk/reactos/include/reactos/mingw-w64/sect_attribs.h trunk/reactos/lib/3rdparty/mingw/crtexe.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c [iso-8859-1] Fri Sep 18 17:22:28 2009 @@ -23,6 +23,8 @@ #define NDEBUG #include <debug.h> +#include <pshpack1.h> + typedef struct _ROUTING_SLOT { UCHAR BusNumber; @@ -37,7 +39,7 @@ USHORT BitmapD; UCHAR SlotNumber; UCHAR Reserved; -} __attribute__((packed)) ROUTING_SLOT, *PROUTING_SLOT; +} ROUTING_SLOT, *PROUTING_SLOT; typedef struct _PCI_IRQ_ROUTING_TABLE { @@ -52,7 +54,9 @@ UCHAR Reserved[11]; UCHAR Checksum; ROUTING_SLOT Slot[1]; -} __attribute__((packed)) PCI_IRQ_ROUTING_TABLE, *PPCI_IRQ_ROUTING_TABLE; +} PCI_IRQ_ROUTING_TABLE, *PPCI_IRQ_ROUTING_TABLE; + +#include <poppack.h> typedef struct _PCI_REGISTRY_INFO { Modified: trunk/reactos/dll/win32/kernel32/misc/icustubs.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/ic…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/icustubs.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/icustubs.cpp [iso-8859-1] Fri Sep 18 17:22:28 2009 @@ -65,7 +65,9 @@ return 0; } +#if defined(__GNUC__) __attribute__((alias("_purecall"))) void __cxa_pure_virtual(void); +#endif void _assert() { Modified: trunk/reactos/include/crt/_mingw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/_mingw.h?rev=4…
============================================================================== --- trunk/reactos/include/crt/_mingw.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/_mingw.h [iso-8859-1] Fri Sep 18 17:22:28 2009 @@ -29,8 +29,6 @@ # if !defined(__MINGW32__) && !defined(__MINGW64__) && !defined(__CYGWIN32__) # define __declspec(x) __attribute__((x)) # endif -#else -# define __attribute__(x) /* nothing */ #endif #ifdef _MSC_VER Modified: trunk/reactos/include/reactos/mingw-w64/sect_attribs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/mingw-w64/…
============================================================================== --- trunk/reactos/include/reactos/mingw-w64/sect_attribs.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/mingw-w64/sect_attribs.h [iso-8859-1] Fri Sep 18 17:22:28 2009 @@ -10,7 +10,7 @@ #define _ATTRIBUTES shared #endif -#if 0 +#if defined(_MSC_VER) /* Reference list of existing section for msvcrt. */ #pragma section(".CRTMP$XCA",long,_ATTRIBUTES) #pragma section(".CRTMP$XCZ",long,_ATTRIBUTES) @@ -55,6 +55,14 @@ #pragma section(".rtc$IZZ",long,read) #pragma section(".rtc$TAA",long,read) #pragma section(".rtc$TZZ",long,read) +#pragma section(".tls",long,read,write) +#pragma section(".tls$ZZZ",long,read,write) #endif +#if defined(_MSC_VER) +#define _CRTALLOC(x) __declspec(allocate(x)) +#elif defined(__GNUC__) #define _CRTALLOC(x) __attribute__ ((section (x) )) +#else +#error +#endif Modified: trunk/reactos/lib/3rdparty/mingw/crtexe.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/crtexe.…
============================================================================== --- trunk/reactos/lib/3rdparty/mingw/crtexe.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/mingw/crtexe.c [iso-8859-1] Fri Sep 18 17:22:28 2009 @@ -52,7 +52,11 @@ #define _commode (*_imp___commode) extern int _dowildcard; +#if defined(__GNUC__) int _MINGW_INSTALL_DEBUG_MATHERR __attribute__((weak)) = 0; +#else +int _MINGW_INSTALL_DEBUG_MATHERR = 0; +#endif extern int __defaultmatherr; extern _CRTIMP void __cdecl _initterm(_PVFV *, _PVFV *);
15 years, 3 months
1
0
0
0
[janderwald] 43072: - Fix a bug which broke build
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Sep 18 11:29:39 2009 New Revision: 43072 URL:
http://svn.reactos.org/svn/reactos?rev=43072&view=rev
Log: - Fix a bug which broke build Modified: trunk/reactos/dll/win32/shell32/shfldr_desktop.c trunk/reactos/dll/win32/shell32/shfldr_fs.c Modified: trunk/reactos/dll/win32/shell32/shfldr_desktop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_d…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_desktop.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_desktop.c [iso-8859-1] Fri Sep 18 11:29:39 2009 @@ -1385,7 +1385,7 @@ pszFileName = wcsrchr(pszSrcList, '\\'); pszFileName++; - if (LoadStringW(shell32_hInstance, IDS_COPY_FROM, pszTarget, MAX_PATH - length)) + if (LoadStringW(shell32_hInstance, IDS_COPY_OF, pszTarget, MAX_PATH - length)) { wcscat(szTargetPath, L" "); } Modified: trunk/reactos/dll/win32/shell32/shfldr_fs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_f…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_fs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_fs.c [iso-8859-1] Fri Sep 18 11:29:39 2009 @@ -1357,7 +1357,7 @@ pszFileName = wcsrchr(pszSrcList, '\\'); pszFileName++; - if (LoadStringW(shell32_hInstance, IDS_COPY_FROM, pszTarget, MAX_PATH - length)) + if (LoadStringW(shell32_hInstance, IDS_COPY_OF, pszTarget, MAX_PATH - length)) { wcscat(szTargetPath, L" "); }
15 years, 3 months
1
0
0
0
[dreimer] 43071: Add AMD64 Branch SVN Tree Creation Support to ssvn.
by dreimer@svn.reactos.org
Author: dreimer Date: Fri Sep 18 11:27:27 2009 New Revision: 43071 URL:
http://svn.reactos.org/svn/reactos?rev=43071&view=rev
Log: Add AMD64 Branch SVN Tree Creation Support to ssvn. Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1 trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1 URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1 [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1 [iso-8859-1] Fri Sep 18 11:27:27 2009 @@ -11,7 +11,11 @@ $OFFSVN = IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' info" | select-string "Revision:" $OFFSVN = $OFFSVN -replace "(.*)Revision: ",'' $OFFSVN = [CONVERT]::ToInt32($OFFSVN,10) - $ONSVN = IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' info
svn://svn.reactos.org/reactos/trunk/reactos
" | select-string "Revision:" + if ("$ENV:ROS_ARCH" -eq "amd64") { + $ONSVN = IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' info
svn://svn.reactos.org/reactos/branches/ros-amd64-bringup/reactos
" | select-string "Revision:" + } else { + $ONSVN = IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' info
svn://svn.reactos.org/reactos/trunk/reactos
" | select-string "Revision:" + } $ONSVN = $ONSVN -replace "(.*)Revision: ",'' $ONSVN = [CONVERT]::ToInt32($ONSVN,10) "Local Revision: $OFFSVN" @@ -98,7 +102,11 @@ $null = (Remove-Item "$_ROSBE_LOGDIR" -recurse -force) $dir = get-childitem if ("$dir" -eq "") { - IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' checkout
svn://svn.reactos.org/reactos/trunk/reactos
." + if ("$ENV:ROS_ARCH" -eq "amd64") { + IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' checkout
svn://svn.reactos.org/reactos/branches/ros-amd64-bringup/reactos
." + } else { + IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' checkout
svn://svn.reactos.org/reactos/trunk/reactos
." + } } else { "ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED" } @@ -117,7 +125,11 @@ Set-Location modules\rosapps $dir = get-childitem if ("$dir" -eq "") { - IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' checkout
svn://svn.reactos.org/reactos/trunk/rosapps
." + if ("$ENV:ROS_ARCH" -eq "amd64") { + IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' checkout
svn://svn.reactos.org/reactos/branches/ros-amd64-bringup/rosapps
." + } else { + IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' checkout
svn://svn.reactos.org/reactos/trunk/rosapps
." + } } else { "ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED" } @@ -137,7 +149,11 @@ Set-Location modules\rostests $dir = get-childitem if ("$dir" -eq "") { - IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' checkout
svn://svn.reactos.org/reactos/trunk/rostests
." + if ("$ENV:ROS_ARCH" -eq "amd64") { + IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' checkout
svn://svn.reactos.org/reactos/branches/ros-amd64-bringup/rostests
." + } else { + IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' checkout
svn://svn.reactos.org/reactos/trunk/rostests
." + } } else { "ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED" } Modified: trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/sSV…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd [iso-8859-1] Fri Sep 18 11:27:27 2009 @@ -47,7 +47,11 @@ rd /s /q "%_ROSBE_LOGDIR%" 1> NUL 2> NUL dir /b 2>nul | findstr "." >nul if errorlevel 1 ( - "%_ROSBE_BASEDIR%\Tools\svn.exe" checkout
svn://svn.reactos.org/reactos/trunk/reactos
. + if "%ROS_ARCH%" == "amd64" ( + "%_ROSBE_BASEDIR%\Tools\svn.exe" checkout
svn://svn.reactos.org/reactos/branches/ros-amd64-bringup/reactos
. + ) else ( + "%_ROSBE_BASEDIR%\Tools\svn.exe" checkout
svn://svn.reactos.org/reactos/trunk/reactos
. + ) ) else ( echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED ) @@ -67,7 +71,11 @@ cd modules\rosapps dir /b 2>nul | findstr "." >nul if errorlevel 1 ( - "%_ROSBE_BASEDIR%\Tools\svn.exe" checkout
svn://svn.reactos.org/reactos/trunk/rosapps
. + if "%ROS_ARCH%" == "amd64" ( + "%_ROSBE_BASEDIR%\Tools\svn.exe" checkout
svn://svn.reactos.org/reactos/branches/ros-amd64-bringup/rosapps
. + ) else ( + "%_ROSBE_BASEDIR%\Tools\svn.exe" checkout
svn://svn.reactos.org/reactos/trunk/rosapps
. + ) ) else ( echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED ) @@ -88,7 +96,11 @@ cd modules\rostests dir /b 2>nul | findstr "." >nul if errorlevel 1 ( - "%_ROSBE_BASEDIR%\Tools\svn.exe" checkout
svn://svn.reactos.org/reactos/trunk/rostests
. + if "%ROS_ARCH%" == "amd64" ( + "%_ROSBE_BASEDIR%\Tools\svn.exe" checkout
svn://svn.reactos.org/reactos/branches/ros-amd64-bringup/rostests
. + ) else ( + "%_ROSBE_BASEDIR%\Tools\svn.exe" checkout
svn://svn.reactos.org/reactos/trunk/rostests
. + ) ) else ( echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED ) @@ -112,7 +124,11 @@ :UP for /f "usebackq tokens=2" %%i in (`""%_ROSBE_BASEDIR%\Tools\svn.exe" info | find "Revision:""`) do set OFFSVN=%%i - for /f "usebackq tokens=2" %%j in (`""%_ROSBE_BASEDIR%\Tools\svn.exe" info
svn://svn.reactos.org/reactos/trunk/reactos
| find "Revision:""`) do set ONSVN=%%j + if "%ROS_ARCH%" == "amd64" ( + for /f "usebackq tokens=2" %%j in (`""%_ROSBE_BASEDIR%\Tools\svn.exe" info
svn://svn.reactos.org/reactos/branches/ros-amd64-bringup/reactos
| find "Revision:""`) do set ONSVN=%%j + ) else ( + for /f "usebackq tokens=2" %%j in (`""%_ROSBE_BASEDIR%\Tools\svn.exe" info
svn://svn.reactos.org/reactos/trunk/reactos
| find "Revision:""`) do set ONSVN=%%j + ) echo Local Revision: !OFFSVN! echo Online HEAD Revision: !ONSVN!
15 years, 3 months
1
0
0
0
[janderwald] 43070: - Allow creating a copy of a file residing in the same directory - Free the correct the buffer - Romanian language needs to be updated See issue #4846 for more details.
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Sep 18 02:48:47 2009 New Revision: 43070 URL:
http://svn.reactos.org/svn/reactos?rev=43070&view=rev
Log: - Allow creating a copy of a file residing in the same directory - Free the correct the buffer - Romanian language needs to be updated See issue #4846 for more details. Modified: trunk/reactos/dll/win32/shell32/lang/bg-BG.rc trunk/reactos/dll/win32/shell32/lang/ca-ES.rc trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc trunk/reactos/dll/win32/shell32/lang/da-DK.rc trunk/reactos/dll/win32/shell32/lang/de-DE.rc trunk/reactos/dll/win32/shell32/lang/el-GR.rc trunk/reactos/dll/win32/shell32/lang/en-GB.rc trunk/reactos/dll/win32/shell32/lang/en-US.rc trunk/reactos/dll/win32/shell32/lang/es-ES.rc trunk/reactos/dll/win32/shell32/lang/fi-FI.rc trunk/reactos/dll/win32/shell32/lang/fr-FR.rc trunk/reactos/dll/win32/shell32/lang/hu-HU.rc trunk/reactos/dll/win32/shell32/lang/it-IT.rc trunk/reactos/dll/win32/shell32/lang/ja-JP.rc trunk/reactos/dll/win32/shell32/lang/ko-KR.rc trunk/reactos/dll/win32/shell32/lang/nl-NL.rc trunk/reactos/dll/win32/shell32/lang/no-NO.rc trunk/reactos/dll/win32/shell32/lang/pl-PL.rc trunk/reactos/dll/win32/shell32/lang/pt-BR.rc trunk/reactos/dll/win32/shell32/lang/pt-PT.rc trunk/reactos/dll/win32/shell32/lang/ru-RU.rc trunk/reactos/dll/win32/shell32/lang/sk-SK.rc trunk/reactos/dll/win32/shell32/lang/sl-SI.rc trunk/reactos/dll/win32/shell32/lang/sv-SE.rc trunk/reactos/dll/win32/shell32/lang/tr-TR.rc trunk/reactos/dll/win32/shell32/lang/uk-UA.rc trunk/reactos/dll/win32/shell32/lang/zh-CN.rc trunk/reactos/dll/win32/shell32/lang/zh-TW.rc trunk/reactos/dll/win32/shell32/precomp.h trunk/reactos/dll/win32/shell32/shfldr_desktop.c trunk/reactos/dll/win32/shell32/shfldr_fs.c trunk/reactos/dll/win32/shell32/shresdef.h trunk/reactos/dll/win32/shell32/shv_def_cmenu.c trunk/reactos/dll/win32/shell32/undocshell.h Modified: trunk/reactos/dll/win32/shell32/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/bg-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/bg-BG.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/bg-BG.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -749,8 +749,9 @@ IDS_INSTALLNEWFONT "Ñëàãàíå íà íîâ øðèôò..." IDS_DEFAULT_CLUSTER_SIZE "Ïîäðàçáèðàí ðàçïðåäåëèòåëåí ðàçìåð" -END - - - - + IDS_COPY_OF "Copy of" +END + + + + Modified: trunk/reactos/dll/win32/shell32/lang/ca-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ca-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/ca-ES.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/ca-ES.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -748,4 +748,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/cs-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -749,4 +749,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/da-DK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/da-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/da-DK.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/da-DK.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -737,4 +737,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/de-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/de-DE.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -752,4 +752,5 @@ IDS_INSTALLNEWFONT "Neue Schriftart installieren..." IDS_DEFAULT_CLUSTER_SIZE "Standardgröße" -END + IDS_COPY_OF "Kopie von" +END Modified: trunk/reactos/dll/win32/shell32/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/el-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/el-GR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/el-GR.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -749,4 +749,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/en-GB.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/en-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/en-GB.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/en-GB.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -748,4 +748,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/en-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/en-US.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -748,4 +748,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/es-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/es-ES.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/es-ES.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -751,4 +751,5 @@ IDS_INSTALLNEWFONT "Instalar Nueva Fuente..." IDS_DEFAULT_CLUSTER_SIZE "Tamaño asignado por defecto" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/fi-FI.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/fi-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/fi-FI.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/fi-FI.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -748,4 +748,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/fr-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/fr-FR.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -752,4 +752,5 @@ IDS_INSTALLNEWFONT "Installer une nouvelle police..." IDS_DEFAULT_CLUSTER_SIZE "Taille d'allocation par défaut" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/hu-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/hu-HU.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/hu-HU.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -751,4 +751,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/it-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/it-IT.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/it-IT.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -749,4 +749,5 @@ IDS_INSTALLNEWFONT "Installazione nuovi Font..." IDS_DEFAULT_CLUSTER_SIZE "Dimensione predefinita di allocazione" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ja-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/ja-JP.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/ja-JP.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -749,4 +749,5 @@ IDS_INSTALLNEWFONT "Vµ¢tHgÌCXg[..." IDS_DEFAULT_CLUSTER_SIZE "ftHg AP[V TCY" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/ko-KR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ko-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/ko-KR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/ko-KR.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -748,4 +748,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/nl-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/nl-NL.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/nl-NL.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -748,4 +748,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/no-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/no-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/no-NO.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/no-NO.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -751,5 +751,5 @@ IDS_INSTALLNEWFONT "Installere nye skrifttyper..." IDS_DEFAULT_CLUSTER_SIZE "Standard tildelingsstørrelse" - -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pl-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/pl-PL.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -755,4 +755,5 @@ IDS_INSTALLNEWFONT "Zainstaluj Now¹ Czcionkê..." IDS_DEFAULT_CLUSTER_SIZE "Domylny rozmiar jednostki alokacji" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pt-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/pt-BR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/pt-BR.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -750,4 +750,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/pt-PT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pt-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/pt-PT.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/pt-PT.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -750,4 +750,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ru-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/ru-RU.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -747,4 +747,5 @@ IDS_INSTALLNEWFONT "Óñòàíîâèòü íîâûé øðèôò..." IDS_DEFAULT_CLUSTER_SIZE "Âûäåëÿåìûé ïî óìîë÷àíèþ ðàçìåð" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sk-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/sk-SK.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/sk-SK.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -754,4 +754,5 @@ IDS_INSTALLNEWFONT "&Naintalova nové písmo..." IDS_DEFAULT_CLUSTER_SIZE "Predvolená alokaèná ve¾kos" //Default allocation size -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/sl-SI.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sl-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/sl-SI.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/sl-SI.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -748,4 +748,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sv-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/sv-SE.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/sv-SE.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -748,4 +748,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/tr-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/tr-TR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/tr-TR.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -748,4 +748,5 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/uk-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/uk-UA.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/uk-UA.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -749,4 +749,5 @@ IDS_INSTALLNEWFONT "²íñòàëþâàòè íîâèé øðèôò..." IDS_DEFAULT_CLUSTER_SIZE "Ðîçì³ð êëàñòåðà çà ïðîìîâ÷àííÿì" -END + IDS_COPY_OF "Copy of" +END Modified: trunk/reactos/dll/win32/shell32/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/zh-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/zh-CN.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/zh-CN.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -736,5 +736,6 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" -END - + IDS_COPY_OF "Copy of" +END + Modified: trunk/reactos/dll/win32/shell32/lang/zh-TW.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/zh-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/zh-TW.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/zh-TW.rc [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -749,7 +749,7 @@ IDS_INSTALLNEWFONT "Install New Font..." IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" - + IDS_COPY_OF "Copy of" END #pragma code_page(default) Modified: trunk/reactos/dll/win32/shell32/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/precomp.…
============================================================================== --- trunk/reactos/dll/win32/shell32/precomp.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/precomp.h [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -60,6 +60,7 @@ #include "version.h" #include "shellfolder.h" #include "xdg.h" +#include "shellapi.h" #include "wine/debug.h" #include "wine/unicode.h" Modified: trunk/reactos/dll/win32/shell32/shfldr_desktop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_d…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_desktop.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_desktop.c [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -1289,8 +1289,8 @@ WCHAR szTargetPath[MAX_PATH]; SHFILEOPSTRUCTW op; LPITEMIDLIST pidl; - LPWSTR pszSrc, pszTarget, pszSrcList, pszTargetList; - int res; + LPWSTR pszSrc, pszTarget, pszSrcList, pszTargetList, pszFileName; + int res, length; STRRET strRet; IGenericSFImpl *This = impl_from_ISFHelper(iface); @@ -1377,8 +1377,28 @@ res = SHFileOperationW(&op); - HeapFree(GetProcessHeap(), 0, pszSrc); - HeapFree(GetProcessHeap(), 0, pszTarget); + if (res == DE_SAMEFILE) + { + length = wcslen(szTargetPath); + + + pszFileName = wcsrchr(pszSrcList, '\\'); + pszFileName++; + + if (LoadStringW(shell32_hInstance, IDS_COPY_FROM, pszTarget, MAX_PATH - length)) + { + wcscat(szTargetPath, L" "); + } + + wcscat(szTargetPath, pszFileName); + op.pTo = szTargetPath; + + res = SHFileOperationW(&op); + } + + + HeapFree(GetProcessHeap(), 0, pszSrcList); + HeapFree(GetProcessHeap(), 0, pszTargetList); if (res) return E_FAIL; Modified: trunk/reactos/dll/win32/shell32/shfldr_fs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_f…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_fs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_fs.c [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -1260,16 +1260,17 @@ WCHAR szTargetPath[MAX_PATH]; SHFILEOPSTRUCTW op; LPITEMIDLIST pidl; - LPWSTR pszSrc, pszTarget, pszSrcList, pszTargetList; - int res; + LPWSTR pszSrc, pszTarget, pszSrcList, pszTargetList, pszFileName; + int res, length; + HRESULT hr; STRRET strRet; IGenericSFImpl *This = impl_from_ISFHelper(iface); TRACE ("(%p)->(%p,%u,%p)\n", This, pSFFrom, cidl, apidl); - IShellFolder_QueryInterface (pSFFrom, &IID_IPersistFolder2, (LPVOID *) & ppf2); - if (ppf2) + hr = IShellFolder_QueryInterface (pSFFrom, &IID_IPersistFolder2, (LPVOID *) & ppf2); + if (SUCCEEDED(hr)) { if (FAILED(IPersistFolder2_GetCurFolder (ppf2, &pidl))) { @@ -1349,8 +1350,26 @@ res = SHFileOperationW(&op); - HeapFree(GetProcessHeap(), 0, pszSrc); - HeapFree(GetProcessHeap(), 0, pszTarget); + if (res == DE_SAMEFILE) + { + length = wcslen(szTargetPath); + + pszFileName = wcsrchr(pszSrcList, '\\'); + pszFileName++; + + if (LoadStringW(shell32_hInstance, IDS_COPY_FROM, pszTarget, MAX_PATH - length)) + { + wcscat(szTargetPath, L" "); + } + + wcscat(szTargetPath, pszFileName); + op.pTo = szTargetPath; + + res = SHFileOperationW(&op); + } + + HeapFree(GetProcessHeap(), 0, pszSrcList); + HeapFree(GetProcessHeap(), 0, pszTargetList); if (res) return E_FAIL; Modified: trunk/reactos/dll/win32/shell32/shresdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shresdef…
============================================================================== --- trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -168,6 +168,7 @@ #define IDS_RENAME 328 #define IDS_INSERT 329 #define IDS_DESCRIPTION 330 +#define IDS_COPY_OF 331 /* Note: this string is referenced from the registry */ #define IDS_RECYCLEBIN_FOLDER_NAME 8964 Modified: trunk/reactos/dll/win32/shell32/shv_def_cmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_def_…
============================================================================== --- trunk/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -1052,7 +1052,12 @@ return E_FAIL; } - if (FAILED(IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (LPVOID*)&psfFrom))) + if (_ILIsDesktop(pidl)) + { + /* use desktop shellfolder */ + psfFrom = psfDesktop; + } + else if (FAILED(IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (LPVOID*)&psfFrom))) { ERR("no IShellFolder\n"); Modified: trunk/reactos/dll/win32/shell32/undocshell.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/undocshe…
============================================================================== --- trunk/reactos/dll/win32/shell32/undocshell.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/undocshell.h [iso-8859-1] Fri Sep 18 02:48:47 2009 @@ -81,6 +81,8 @@ #define RFF_NOLABEL 0x08 #define RFF_NOSEPARATEMEM 0x20 /* NT only */ +#define DE_SAMEFILE 0x71 + /* RunFileFlg notification structure */ typedef struct {
15 years, 3 months
1
0
0
0
[cgutman] 43069: - Use proper object attributes and share access when opening the file object - Fixes a rare INVALID_KERNEL_HANDLE BSOD and debug log handle warnings from AFD when using Firefox - See bug #4796
by cgutman@svn.reactos.org
Author: cgutman Date: Fri Sep 18 01:09:16 2009 New Revision: 43069 URL:
http://svn.reactos.org/svn/reactos?rev=43069&view=rev
Log: - Use proper object attributes and share access when opening the file object - Fixes a rare INVALID_KERNEL_HANDLE BSOD and debug log handle warnings from AFD when using Firefox - See bug #4796 Modified: trunk/reactos/drivers/network/afd/afd/tdi.c Modified: trunk/reactos/drivers/network/afd/afd/tdi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/td…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] Fri Sep 18 01:09:16 2009 @@ -112,7 +112,8 @@ InitializeObjectAttributes(&Attr, /* Attribute buffer */ DeviceName, /* Device name */ - OBJ_CASE_INSENSITIVE, /* Attributes */ + OBJ_CASE_INSENSITIVE | /* Attributes */ + OBJ_KERNEL_HANDLE, NULL, /* Root directory */ NULL); /* Security descriptor */ @@ -122,7 +123,7 @@ &Iosb, /* IO status */ 0, /* Initial allocation size */ FILE_ATTRIBUTE_NORMAL, /* File attributes */ - FILE_SHARE_READ | FILE_SHARE_WRITE, /* Share access */ + 0, /* Share access */ FILE_OPEN_IF, /* Create disposition */ 0, /* Create options */ EaInfo, /* EA buffer */
15 years, 3 months
1
0
0
0
[janderwald] 43068: - Implement ISFHelper_fnCopyItems for desktop shellfolder - Check if the target folder desktop - Fixes copying of files to desktop See issue #4845 for more details.
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Sep 18 00:57:50 2009 New Revision: 43068 URL:
http://svn.reactos.org/svn/reactos?rev=43068&view=rev
Log: - Implement ISFHelper_fnCopyItems for desktop shellfolder - Check if the target folder desktop - Fixes copying of files to desktop See issue #4845 for more details. Modified: trunk/reactos/dll/win32/shell32/shfldr_desktop.c trunk/reactos/dll/win32/shell32/shv_def_cmenu.c Modified: trunk/reactos/dll/win32/shell32/shfldr_desktop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_d…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_desktop.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_desktop.c [iso-8859-1] Fri Sep 18 00:57:50 2009 @@ -1284,10 +1284,108 @@ static HRESULT WINAPI ISF_Desktop_ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl, LPCITEMIDLIST * apidl) { + IPersistFolder2 *ppf2 = NULL; + WCHAR szSrcPath[MAX_PATH]; + WCHAR szTargetPath[MAX_PATH]; + SHFILEOPSTRUCTW op; + LPITEMIDLIST pidl; + LPWSTR pszSrc, pszTarget, pszSrcList, pszTargetList; + int res; + STRRET strRet; IGenericSFImpl *This = impl_from_ISFHelper(iface); TRACE ("(%p)->(%p,%u,%p)\n", This, pSFFrom, cidl, apidl); - return E_NOTIMPL; + + IShellFolder_QueryInterface (pSFFrom, &IID_IPersistFolder2, (LPVOID *) & ppf2); + if (ppf2) + { + if (FAILED(IPersistFolder2_GetCurFolder (ppf2, &pidl))) + { + IPersistFolder2_Release(ppf2); + return E_FAIL; + } + IPersistFolder2_Release(ppf2); + + if (FAILED(IShellFolder_GetDisplayNameOf(pSFFrom, pidl, SHGDN_FORPARSING, &strRet))) + { + SHFree (pidl); + return E_FAIL; + } + + if (FAILED(StrRetToBufW(&strRet, pidl, szSrcPath, MAX_PATH))) + { + SHFree (pidl); + return E_FAIL; + } + SHFree (pidl); + + pszSrc = PathAddBackslashW (szSrcPath); + + wcscpy(szTargetPath, This->sPathTarget); + pszTarget = PathAddBackslashW (szTargetPath); + + pszSrcList = build_paths_list(szSrcPath, cidl, apidl); + pszTargetList = build_paths_list(szTargetPath, cidl, apidl); + + if (!pszSrcList || !pszTargetList) + { + if (pszSrcList) + HeapFree(GetProcessHeap(), 0, pszSrcList); + + if (pszTargetList) + HeapFree(GetProcessHeap(), 0, pszTargetList); + + SHFree (pidl); + IPersistFolder2_Release (ppf2); + return E_OUTOFMEMORY; + } + ZeroMemory(&op, sizeof(op)); + if (!pszSrcList[0]) + { + /* remove trailing backslash */ + pszSrc--; + pszSrc[0] = L'\0'; + op.pFrom = szSrcPath; + } + else + { + op.pFrom = pszSrcList; + } + + if (!pszTargetList[0]) + { + /* remove trailing backslash */ + if (pszTarget - szTargetPath > 3) + { + pszTarget--; + pszTarget[0] = L'\0'; + } + else + { + pszTarget[1] = L'\0'; + } + + op.pTo = szTargetPath; + } + else + { + op.pTo = pszTargetList; + } + op.hwnd = GetActiveWindow(); + op.wFunc = FO_COPY; + op.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMMKDIR; + + res = SHFileOperationW(&op); + + HeapFree(GetProcessHeap(), 0, pszSrc); + HeapFree(GetProcessHeap(), 0, pszTarget); + + if (res) + return E_FAIL; + else + return S_OK; + } + return E_FAIL; } static const ISFHelperVtbl vt_FSFldr_ISFHelper = Modified: trunk/reactos/dll/win32/shell32/shv_def_cmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_def_…
============================================================================== --- trunk/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] Fri Sep 18 00:57:50 2009 @@ -1083,9 +1083,18 @@ IPersistFolder2_Release(ppf2); if (SUCCEEDED(hr)) { - hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (LPVOID*)&psfTarget); + if (_ILIsDesktop(pidl)) + { + /* use desktop shellfolder */ + psfTarget = psfDesktop; + } + else + { + /* retrieve target desktop folder */ + hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (LPVOID*)&psfTarget); + } + TRACE("psfTarget %x %p, Desktop %u\n", hr, psfTarget, _ILIsDesktop(pidl)); ILFree(pidl); - TRACE("psfTarget %p\n", psfTarget); } } } @@ -1146,7 +1155,7 @@ _ILFreeaPidl(apidl, lpcida->cidl); ReleaseStgMedium(&medium); IDataObject_Release(pda); -ERR("CP result %x\n",hr); + TRACE("CP result %x\n",hr); return S_OK; }
15 years, 3 months
1
0
0
0
[sginsberg] 43067: - Fix kernel build regression for MSVC from 43014
by sginsberg@svn.reactos.org
Author: sginsberg Date: Thu Sep 17 20:28:26 2009 New Revision: 43067 URL:
http://svn.reactos.org/svn/reactos?rev=43067&view=rev
Log: - Fix kernel build regression for MSVC from 43014 Modified: trunk/reactos/ntoskrnl/kdbg/kdb.c Modified: trunk/reactos/ntoskrnl/kdbg/kdb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb.c?rev=43…
============================================================================== --- trunk/reactos/ntoskrnl/kdbg/kdb.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kdbg/kdb.c [iso-8859-1] Thu Sep 17 20:28:26 2009 @@ -1228,7 +1228,7 @@ /*!\brief Calls the main loop ... */ static VOID -KdbpCallMainLoop() +KdbpCallMainLoop(VOID) { KdbpCliMainLoop(KdbEnteredOnSingleStep); }
15 years, 3 months
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
27
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Results per page:
10
25
50
100
200