ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2009
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
30 participants
755 discussions
Start a n
N
ew thread
[fireball] 38882: - SVN maintenance.
by fireball@svn.reactos.org
Author: fireball Date: Sun Jan 18 04:25:02 2009 New Revision: 38882 URL:
http://svn.reactos.org/svn/reactos?rev=38882&view=rev
Log: - SVN maintenance. Modified:
trunk/web/reactos.org/htdocs/testman/lang/pl.inc.php
(contents, props changed) Modified:
trunk/web/reactos.org/htdocs/testman/lang/pl.inc.php
URL:
http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/testman/lan…
============================================================================== ---
trunk/web/reactos.org/htdocs/testman/lang/pl.inc.php
[iso-8859-1] (original) +++
trunk/web/reactos.org/htdocs/testman/lang/pl.inc.php
[iso-8859-1] Sun Jan 18 04:25:02 2009 @@ -1,62 +1,62 @@ -<?php -/* - PROJECT: ReactOS Web Test Manager - LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - PURPOSE: Translation - COPYRIGHT: Copyright 2008-2009 Colin Finck <colin(a)reactos.org> - TRANSLATOR: Maciej Bialas - - charset=utf-8 without BOM -*/ - - $testman_langres = array( - // Index page - "index_header" => '<a href="
http://www.reactos.org/
">Strona gÅówna</a> > Menedżer testów ReactOS', - "index_title" => "Menedżer testów ReactOS", - "index_intro" => "Ten interfejs pozwala Tobie znaleźÄ, zobaczyÄ i porównaÄ wyniki przeprowadzanych automatycznie testów regresji.", - "js_disclaimer" => "Musisz wÅÄ czyÄ obsÅugÄ JavaScriptu, aby używaÄ tego interfejsu!", - - "lastresults_header" => "Ostatnich 10 wyników testów", - "date" => "Data", - "revision" => "Wydanie", - "user" => "Użytkownik", - "platform" => "Platforma", - - "search_header" => "Szukaj w wynikach testów", - "search_revision" => "Wydanie", - "rangeinfo" => "Możesz wprowadziÄ numer wydania (np. %s) lub przedziaÅ (np. %s-%s)", - "search_platform" => "Platforma", - "search_button" => "Szukaj", - "searching" => "Trwa szukanie w wynikach testów", - - "foundresults" => "Znaleziono %s wyników!", - "noresults" => "Brak wyników wyszukiwania!", - - "status" => "<b>%s</b> testów zaznaczonych do porównania", - "compare_button" => "Porównaj", - - "noselection" => "Nie wybraÅeÅ/aŠżadnych wyników!", - "maxselection" => "Możesz zaznaczyÄ do porównania maksymalnie %d wyników!", - - // Compare page - "compare_title" => "Porównywanie wyników", - "showchanged" => "Pokaż tylko zmienione wyniki", - - "legend" => "Legenda", - "totaltests" => "Wszystkie testy", - "failedtests" => "Nieudane", - "todotests" => "Oznaczone jako ToDo", - "skippedtests" => "PominiÄte", - "difference" => "Różnica wzglÄdem poprzedniego wyniku", - - "testsuite" => "Zestaw testów", - "resulthead" => "Wydanie %d<br />pod %s<br />przez %s<br /> %s", - - // Result Details page - "detail_title" => "SzczegóÅy wyników", - - "thisresult" => "Informacje o tych wynikach", - "log" => "Dziennik", - "associatedtest" => "Informacja o powiÄ zanych testach", - ); -?> +<?php +/* + PROJECT: ReactOS Web Test Manager + LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation + PURPOSE: Translation + COPYRIGHT: Copyright 2008-2009 Colin Finck <colin(a)reactos.org> + TRANSLATOR: Maciej Bialas + + charset=utf-8 without BOM +*/ + + $testman_langres = array( + // Index page + "index_header" => '<a href="
http://www.reactos.org/
">Strona gÅówna</a> > Menedżer testów ReactOS', + "index_title" => "Menedżer testów ReactOS", + "index_intro" => "Ten interfejs pozwala Tobie znaleźÄ, zobaczyÄ i porównaÄ wyniki przeprowadzanych automatycznie testów regresji.", + "js_disclaimer" => "Musisz wÅÄ czyÄ obsÅugÄ JavaScriptu, aby używaÄ tego interfejsu!", + + "lastresults_header" => "Ostatnich 10 wyników testów", + "date" => "Data", + "revision" => "Wydanie", + "user" => "Użytkownik", + "platform" => "Platforma", + + "search_header" => "Szukaj w wynikach testów", + "search_revision" => "Wydanie", + "rangeinfo" => "Możesz wprowadziÄ numer wydania (np. %s) lub przedziaÅ (np. %s-%s)", + "search_platform" => "Platforma", + "search_button" => "Szukaj", + "searching" => "Trwa szukanie w wynikach testów", + + "foundresults" => "Znaleziono %s wyników!", + "noresults" => "Brak wyników wyszukiwania!", + + "status" => "<b>%s</b> testów zaznaczonych do porównania", + "compare_button" => "Porównaj", + + "noselection" => "Nie wybraÅeÅ/aŠżadnych wyników!", + "maxselection" => "Możesz zaznaczyÄ do porównania maksymalnie %d wyników!", + + // Compare page + "compare_title" => "Porównywanie wyników", + "showchanged" => "Pokaż tylko zmienione wyniki", + + "legend" => "Legenda", + "totaltests" => "Wszystkie testy", + "failedtests" => "Nieudane", + "todotests" => "Oznaczone jako ToDo", + "skippedtests" => "PominiÄte", + "difference" => "Różnica wzglÄdem poprzedniego wyniku", + + "testsuite" => "Zestaw testów", + "resulthead" => "Wydanie %d<br />pod %s<br />przez %s<br /> %s", + + // Result Details page + "detail_title" => "SzczegóÅy wyników", + + "thisresult" => "Informacje o tych wynikach", + "log" => "Dziennik", + "associatedtest" => "Informacja o powiÄ zanych testach", + ); +?> Propchange:
trunk/web/reactos.org/htdocs/testman/lang/pl.inc.php
------------------------------------------------------------------------------ svn:eol-style = native
15 years, 11 months
1
0
0
0
[fireball] 38881: - SVN maintenance.
by fireball@svn.reactos.org
Author: fireball Date: Sun Jan 18 04:23:15 2009 New Revision: 38881 URL:
http://svn.reactos.org/svn/reactos?rev=38881&view=rev
Log: - SVN maintenance. Modified: trunk/reactos/ntoskrnl/fsrtl/fastio.c (contents, props changed) Modified: trunk/reactos/ntoskrnl/fsrtl/fastio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/fastio.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/fastio.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/fastio.c [iso-8859-1] Sun Jan 18 04:23:15 2009 @@ -1,1426 +1,1426 @@ -/* - * PROJECT: ReactOS Kernel - * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/fsrtl/fastio.c - * PURPOSE: Provides Fast I/O entrypoints to the Cache Manager - * PROGRAMMERS: buzdelabuz2@gmail.com,alex.ionescu@reactos.org - */ - -/* INCLUDES ******************************************************************/ - -#include <ntoskrnl.h> -#define NDEBUG -#include <debug.h> - -/* PUBLIC FUNCTIONS **********************************************************/ - -/* - * @implemented - */ -VOID -NTAPI -FsRtlIncrementCcFastReadResourceMiss(VOID) -{ - CcFastReadResourceMiss++; -} - -/* - * @implemented - */ -VOID -NTAPI -FsRtlIncrementCcFastReadNotPossible(VOID) -{ - CcFastReadNotPossible++; -} - -/* - * @implemented - */ -VOID -NTAPI -FsRtlIncrementCcFastReadWait(VOID) -{ - CcFastReadWait++; -} - -/* - * @implemented - */ -VOID -NTAPI -FsRtlIncrementCcFastReadNoWait(VOID) -{ - CcFastReadNoWait++; -} - -/* - * @implemented - */ -BOOLEAN -NTAPI -FsRtlCopyRead(IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, - IN ULONG Length, - IN BOOLEAN Wait, - IN ULONG LockKey, - OUT PVOID Buffer, - OUT PIO_STATUS_BLOCK IoStatus, - IN PDEVICE_OBJECT DeviceObject) -{ - - PFSRTL_COMMON_FCB_HEADER FcbHeader; - LARGE_INTEGER Offset; - PFAST_IO_DISPATCH FastIoDispatch; - PDEVICE_OBJECT Device; - BOOLEAN Result = TRUE; - ULONG PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(FileOffset,Length); - - PAGED_CODE(); - ASSERT(FileObject); - ASSERT(FileObject->FsContext); - - /* No actual read */ - if (!Length) - { - /* Return success */ - IoStatus->Status = STATUS_SUCCESS; - IoStatus->Information = 0; - return TRUE; - } - - if (MAXLONGLONG < (LONGLONG) FileOffset->QuadPart + Length) { - IoStatus->Status = STATUS_INVALID_PARAMETER; - IoStatus->Information = 0; - return FALSE; - } - - /* Get the offset and FCB header */ - Offset.QuadPart = FileOffset->QuadPart + Length; - FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext; - - - if (Wait) { - /* Use a Resource Acquire */ - FsRtlEnterFileSystem(); - CcFastReadWait++; - ExAcquireResourceSharedLite(FcbHeader->Resource, TRUE); - } else { - /* Acquire the resource without blocking */ - /* Return false and the I/O manager will retry using the standard IRP method. */ - /* Use a Resource Acquire */ - FsRtlEnterFileSystem(); - if (!ExAcquireResourceSharedLite(FcbHeader->Resource, FALSE)) { - FsRtlExitFileSystem(); - FsRtlIncrementCcFastReadResourceMiss(); - return FALSE; - } - } - - - /* Check if this is a fast I/O cached file */ - if (!(FileObject->PrivateCacheMap) || - (FcbHeader->IsFastIoPossible == FastIoIsNotPossible)) { - /* It's not, so fail */ - Result = FALSE; - goto Cleanup; - } - - /* Check if we need to find out if fast I/O is available */ - if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable) - { - /* Sanity check */ - ASSERT(!KeIsExecutingDpc()); - - /* Get the Fast I/O table */ - Device = IoGetRelatedDeviceObject(FileObject); - FastIoDispatch = Device->DriverObject->FastIoDispatch; - - /* Sanity check */ - ASSERT(FastIoDispatch != NULL); - ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL); - - /* Ask the driver if we can do it */ - if (!FastIoDispatch->FastIoCheckIfPossible(FileObject, - FileOffset, - Length, - TRUE, - LockKey, - TRUE, - IoStatus, - Device)) - { - /* It's not, fail */ - Result = FALSE; - goto Cleanup; - } - } - - /* Check if we read too much */ - if (Offset.QuadPart > FcbHeader->FileSize.QuadPart){ - /* We did, check if the file offset is past the end */ - if (FileOffset->QuadPart >= FcbHeader->FileSize.QuadPart){ - /* Set end of file */ - IoStatus->Status = STATUS_END_OF_FILE; - IoStatus->Information = 0; - goto Cleanup; - } - - /* Otherwise, just normalize the length */ - Length = (ULONG)(FcbHeader->FileSize.QuadPart - FileOffset->QuadPart); - } - - /* Set this as top-level IRP */ - PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP; - - _SEH2_TRY - { - /* Make sure the IO and file size is below 4GB */ - if (Wait && !(Offset.HighPart | FcbHeader->FileSize.HighPart )) { - - /* Call the cache controller */ - CcFastCopyRead (FileObject,FileOffset->LowPart,Length,PageCount,Buffer,IoStatus); - /* File was accessed */ - FileObject->Flags |= FO_FILE_FAST_IO_READ; - if (IoStatus->Status != STATUS_END_OF_FILE) { - ASSERT(( FcbHeader->FileSize.QuadPart) >= (FileOffset->QuadPart + IoStatus->Information)); - } - - } else { - - /* Call the cache controller */ - Result = CcCopyRead(FileObject, FileOffset, Length, Wait,Buffer, IoStatus); - /* File was accessed */ - FileObject->Flags |= FO_FILE_FAST_IO_READ; - if (Result == TRUE) { - ASSERT( (IoStatus->Status == STATUS_END_OF_FILE) || - ((LONGLONG)(FileOffset->QuadPart + IoStatus->Information) <= FcbHeader->FileSize.QuadPart) - ); - } - } - - /* Update the current file offset */ - if (Result == TRUE) { - FileObject->CurrentByteOffset.QuadPart += IoStatus->Information; - } - } - _SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) - { - Result = FALSE; - } _SEH2_END; - - PsGetCurrentThread()->TopLevelIrp = 0; - - /* Return to caller */ -Cleanup: - - ExReleaseResourceLite(FcbHeader->Resource); - FsRtlExitFileSystem(); - - if (Result == FALSE) { - CcFastReadNotPossible += 1; - } - - return Result; - -} - - -/* - * @implemented - */ -BOOLEAN -NTAPI -FsRtlCopyWrite(IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, - IN ULONG Length, - IN BOOLEAN Wait, - IN ULONG LockKey, - OUT PVOID Buffer, - OUT PIO_STATUS_BLOCK IoStatus, - IN PDEVICE_OBJECT DeviceObject) -{ - - BOOLEAN Result = TRUE; - PFAST_IO_DISPATCH FastIoDispatch; - PDEVICE_OBJECT Device; - PFSRTL_COMMON_FCB_HEADER FcbHeader; - - /* WDK doc. Offset=0xffffffffffffffff indicates append to the end of file */ - BOOLEAN FileOffsetAppend = ((FileOffset->HighPart == (LONG)0xffffffff) && (FileOffset->LowPart == 0xffffffff)); - BOOLEAN ResourceAquiredShared = FALSE; - - BOOLEAN b_4GB = FALSE; - - BOOLEAN FileSizeModified = FALSE; - LARGE_INTEGER OldFileSize; - LARGE_INTEGER OldValidDataLength; - - LARGE_INTEGER NewSize; - LARGE_INTEGER Offset; - - PAGED_CODE(); - - ASSERT(FileObject); - ASSERT(FileObject->FsContext); - - /* Initialize some of the vars and pointers */ - NewSize.QuadPart = 0; - Offset.QuadPart = FileOffset->QuadPart + Length; - FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext; - - /* Nagar p.544 -- Check with Cc if we can write and check if the IO > 64kB (WDK macro) */ - if ( (CcCanIWrite(FileObject, Length,Wait, FALSE) == FALSE) || - (CcCopyWriteWontFlush(FileObject,FileOffset,Length) == FALSE) || - ((FileObject->Flags & FO_WRITE_THROUGH )== TRUE) - ) - { - return FALSE; - } - - /* No actual read */ - if (!Length) - { - IoStatus->Status = STATUS_SUCCESS; - IoStatus->Information = Length; - return TRUE; - } - - FsRtlEnterFileSystem(); - - /* Nagar p.544/545 -- The CcFastCopyWrite doesn't deal with filesize beyond 4GB*/ - if (Wait && (FcbHeader->AllocationSize.HighPart == 0)) - { - /* If the file offset is not past the file size, then we can acquire the lock shared */ - if ((FileOffsetAppend == FALSE) && (Offset.LowPart <= FcbHeader->ValidDataLength.LowPart)){ - ExAcquireResourceSharedLite(FcbHeader->Resource,TRUE); - ResourceAquiredShared = TRUE; - } else { - ExAcquireResourceExclusiveLite(FcbHeader->Resource,TRUE); - } - - /* Nagar p.544/545 -- If we append, use the file size as offset. Also, check that we aren't crossing the 4GB boundary */ - if ((FileOffsetAppend == TRUE)) { - Offset.LowPart = FcbHeader->FileSize.LowPart; - NewSize.LowPart = FcbHeader->FileSize.LowPart + Length; - b_4GB = (NewSize.LowPart < FcbHeader->FileSize.LowPart); - - } else { - Offset.LowPart = FileOffset->LowPart; - NewSize.LowPart = FileOffset->LowPart + Length; - b_4GB = ((NewSize.LowPart < FileOffset->LowPart) || (FileOffset->HighPart != 0)); - } - - /* Nagar p.544/545 - Make sure that caching is initated. - That fast are allowed for this file stream. - That we are not extending past the allocated size - That we are not creating a hole bigger than 8k - That we are not crossing the 4GB boundary - */ - if ( (FileObject->PrivateCacheMap != NULL) && - (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) && - (FcbHeader->AllocationSize.LowPart >= NewSize.LowPart) && - (Offset.LowPart < (FcbHeader->ValidDataLength.LowPart + 0x2000) ) && - !b_4GB - ) - { - /* If we are extending past the file size, we need to release the lock and acquire it - exclusively, because we are going to need to update the FcbHeader */ - if (ResourceAquiredShared && (NewSize.LowPart > (FcbHeader->ValidDataLength.LowPart + 0x2000))) { - /* Then we need to acquire the resource exclusive */ - ExReleaseResourceLite(FcbHeader->Resource); - ExAcquireResourceExclusiveLite(FcbHeader->Resource,TRUE); - if (FileOffsetAppend == TRUE) { - Offset.LowPart = FcbHeader->FileSize.LowPart; // ?? - NewSize.LowPart = FcbHeader->FileSize.LowPart + Length; - /* Make sure we don't cross the 4GB boundary */ - b_4GB = (NewSize.LowPart < Offset.LowPart); - } - - /* Recheck some of the conditions since we let the lock go */ - if ( (FileObject->PrivateCacheMap != NULL) && - (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) && - (FcbHeader->AllocationSize.LowPart >= NewSize.LowPart) && - (FcbHeader->AllocationSize.HighPart == 0) && - !b_4GB - ) - { - } else - { - goto FailAndCleanup; - } - } - - }else - { - goto FailAndCleanup; - } - - /* Check if we need to find out if fast I/O is available */ - if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable) - { - IO_STATUS_BLOCK FastIoCheckIfPossibleStatus; - - /* Sanity check */ - ASSERT(!KeIsExecutingDpc()); - - /* Get the Fast I/O table */ - Device = IoGetRelatedDeviceObject(FileObject); - FastIoDispatch = Device->DriverObject->FastIoDispatch; - - /* Sanity check */ - ASSERT(FastIoDispatch != NULL); - ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL); - - /* Ask the driver if we can do it */ - if (!FastIoDispatch->FastIoCheckIfPossible(FileObject, - FileOffsetAppend? &FcbHeader->FileSize:FileOffset, - Length, - TRUE, - LockKey, - FALSE, - &FastIoCheckIfPossibleStatus, - Device)) - { - /* It's not, fail */ - goto FailAndCleanup; - } - } - - /* If we are going to extend the file then save the old file size - in case the operation fails - */ - if (NewSize.LowPart > FcbHeader->FileSize.LowPart) { - FileSizeModified = TRUE; - OldFileSize.LowPart = FcbHeader->FileSize.LowPart; - OldValidDataLength.LowPart = FcbHeader->ValidDataLength.LowPart; - FcbHeader->FileSize.LowPart = NewSize.LowPart; - } - - /* Set this as top-level IRP */ - PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP; - - _SEH2_TRY - { - if (Offset.LowPart > FcbHeader->ValidDataLength.LowPart) { - LARGE_INTEGER OffsetVar; - OffsetVar.LowPart = Offset.LowPart; - OffsetVar.HighPart = 0; - CcZeroData(FileObject,&FcbHeader->ValidDataLength,&OffsetVar,TRUE); - } - - /* Call the cache manager */ - CcFastCopyWrite(FileObject,Offset.LowPart,Length,Buffer); - } - _SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) - { - Result = FALSE; - } _SEH2_END; - - /* Remove ourselves at the top level component after the IO is done */ - PsGetCurrentThread()->TopLevelIrp = 0; - - /* Did the operation succeed ? */ - if (Result == TRUE) { - /* Update the valid file size if necessary */ - if (NewSize.LowPart > FcbHeader->ValidDataLength.LowPart){ - FcbHeader->ValidDataLength.LowPart = NewSize.LowPart ; - } - - /* Flag the file as modified */ - FileObject->Flags |= FO_FILE_MODIFIED; - - /* Update the strucutres if the file size changed */ - if (FileSizeModified) { - ((SHARED_CACHE_MAP*) FileObject->SectionObjectPointer->SharedCacheMap)->FileSize.LowPart = NewSize.LowPart; - FileObject->Flags |= FO_FILE_SIZE_CHANGED; - } - - /* Update the file object current file offset */ - FileObject->CurrentByteOffset.QuadPart = NewSize.LowPart; - - } else { - - /* Result == FALSE if we get here. */ - if (FileSizeModified) { - /* If the file size was modified then restore the old file size */ - if(FcbHeader->PagingIoResource != NULL) { - // Nagar P.544 Restore the old file size if operation didn't succeed. - ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource,TRUE); - FcbHeader->FileSize.LowPart = OldFileSize.LowPart; - FcbHeader->ValidDataLength.LowPart = OldValidDataLength.LowPart; - ExReleaseResourceLite(FcbHeader->PagingIoResource); - } else { - /* If there is no lock and do it without */ - FcbHeader->FileSize.LowPart = OldFileSize.LowPart; - FcbHeader->ValidDataLength.LowPart = OldValidDataLength.LowPart; - } - } else { - } - } - - goto Cleanup; - - } else { - - LARGE_INTEGER OldFileSize; - - /* Sanity check */ - ASSERT(!KeIsExecutingDpc()); - - // Nagar P.544 - /* Check if we need to acquire the resource exclusive */ - if ( (FileOffsetAppend == FALSE) && - ( (FileOffset->QuadPart + Length) <= FcbHeader->ValidDataLength.QuadPart ) - ) - { - /* Acquire the resource shared */ - if (!ExAcquireResourceSharedLite(FcbHeader->Resource,Wait)) { - goto LeaveCriticalAndFail; - } - ResourceAquiredShared =TRUE; - } else { - /* Acquire the resource exclusive */ - if (!ExAcquireResourceExclusiveLite(FcbHeader->Resource,Wait)) { - goto LeaveCriticalAndFail; - } - } - - /* Check if we are appending */ - if (FileOffsetAppend == TRUE) { - Offset.QuadPart = FcbHeader->FileSize.QuadPart; - NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length; - } else { - Offset.QuadPart = FileOffset->QuadPart; - NewSize.QuadPart += FileOffset->QuadPart + Length; - } - - /* Nagar p.544/545 - Make sure that caching is initated. - That fast are allowed for this file stream. - That we are not extending past the allocated size - That we are not creating a hole bigger than 8k - */ - if ( (FileObject->PrivateCacheMap != NULL) && - (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) && - ((FcbHeader->ValidDataLength.QuadPart + 0x2000) > Offset.QuadPart) && - (MAXLONGLONG > (Offset.QuadPart + Length)) && - (FcbHeader->AllocationSize.QuadPart >= NewSize.QuadPart) - ) - { - /* Check if we can keep the lock shared */ - if (ResourceAquiredShared && (NewSize.QuadPart > FcbHeader->ValidDataLength.QuadPart) ) { - ExReleaseResourceLite(FcbHeader->Resource); - if(!ExAcquireResourceExclusiveLite(FcbHeader->Resource,Wait)) - { - goto LeaveCriticalAndFail; - } - - /* Compute the offset and the new filesize */ - if (FileOffsetAppend) { - Offset.QuadPart = FcbHeader->FileSize.QuadPart; - NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length; - } - - /* Recheck the above points since we released and reacquire the lock */ - if ( (FileObject->PrivateCacheMap != NULL) && - (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) && - (FcbHeader->AllocationSize.QuadPart > NewSize.QuadPart) - ) - { - /* Do nothing */ - } else { - goto FailAndCleanup; - } - } - - /* Check if we need to find out if fast I/O is available */ - if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable) - { - IO_STATUS_BLOCK FastIoCheckIfPossibleStatus; - - /* Sanity check */ - ASSERT(!KeIsExecutingDpc()); - - /* Get the Fast I/O table */ - Device = IoGetRelatedDeviceObject(FileObject); - FastIoDispatch = Device->DriverObject->FastIoDispatch; - - /* Sanity check */ - ASSERT(FastIoDispatch != NULL); - ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL); - - /* Ask the driver if we can do it */ - if (!FastIoDispatch->FastIoCheckIfPossible(FileObject, - FileOffsetAppend? &FcbHeader->FileSize:FileOffset, - Length, - TRUE, - LockKey, - FALSE, - &FastIoCheckIfPossibleStatus, - Device)) - { - /* It's not, fail */ - goto FailAndCleanup; - } - } - - - /* If we are going to modify the filesize, save the old fs in case the operation fails */ - if (NewSize.QuadPart > FcbHeader->FileSize.QuadPart) { - FileSizeModified = TRUE; - OldFileSize.QuadPart = FcbHeader->FileSize.QuadPart; - OldValidDataLength.QuadPart = FcbHeader->ValidDataLength.QuadPart; - - /* If the high part of the filesize is going to change, grab the Paging IoResouce */ - if (NewSize.HighPart != FcbHeader->FileSize.HighPart && FcbHeader->PagingIoResource) { - ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE); - FcbHeader->FileSize.QuadPart = NewSize.QuadPart; - ExReleaseResourceLite(FcbHeader->PagingIoResource); - } else { - FcbHeader->FileSize.QuadPart = NewSize.QuadPart; - } - } - - /* Nagar p.544 */ - /* Set ourselves as top component */ - PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP; - _SEH2_TRY - { - BOOLEAN CallCc = TRUE; - /* Check if there is a gap between the end of the file and the offset - If yes, then we have to zero the data - */ - if (Offset.QuadPart > FcbHeader->ValidDataLength.QuadPart) { - if (!(Result = CcZeroData(FileObject,&FcbHeader->ValidDataLength,&Offset,Wait))) { - /* If this operation fails, then we have to exit - We can jump outside the SEH, so I a using a variable to exit - normally - */ - CallCc = FALSE; - } - } - - /* Unless the CcZeroData failed, call the cache manager */ - if (CallCc) { - Result = CcCopyWrite(FileObject,&Offset,Length, Wait, Buffer); - } - }_SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) - { - Result = FALSE; - } _SEH2_END; - - /* Reset the top component */ - PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP; - - /* Did the operation suceeded */ - if (Result) { - /* Check if we need to update the filesize */ - if (NewSize.QuadPart > FcbHeader->ValidDataLength.QuadPart) { - if (NewSize.HighPart != FcbHeader->ValidDataLength.HighPart && FcbHeader->PagingIoResource) { - ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE); - FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart; - ExReleaseResourceLite(FcbHeader->PagingIoResource); - } else { - FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart; - } - } - - /* Flag the file as modified */ - FileObject->Flags |= FO_FILE_MODIFIED; - /* Check if the filesize has changed */ - if (FileSizeModified) { - /* Update the file sizes */ - ((SHARED_CACHE_MAP*) FileObject->SectionObjectPointer->SharedCacheMap)->FileSize.QuadPart = NewSize.QuadPart; - FileObject->Flags |= FO_FILE_SIZE_CHANGED; - } - /* Update the current FO byte offset */ - FileObject->CurrentByteOffset.QuadPart = NewSize.QuadPart; - } - else - { - /* The operation did not succeed - Reset the file size to what it should be - */ - if (FileSizeModified) { - if (FcbHeader->PagingIoResource) { - ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE); - FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart; - FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart; - ExReleaseResourceLite(FcbHeader->PagingIoResource); - }else{ - FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart; - FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart; - } - } - } - goto Cleanup; - } else { - goto FailAndCleanup; - } - - ASSERT(0); - } - -LeaveCriticalAndFail: - FsRtlExitFileSystem(); - return FALSE; - - -FailAndCleanup: - - ExReleaseResourceLite(FcbHeader->Resource); - FsRtlExitFileSystem(); - return FALSE; - -Cleanup: - - ExReleaseResourceLite(FcbHeader->Resource); - FsRtlExitFileSystem(); - return Result; -} - -/* - * @implemented - */ -NTSTATUS -NTAPI -FsRtlGetFileSize(IN PFILE_OBJECT FileObject, - IN OUT PLARGE_INTEGER FileSize) -{ - FILE_STANDARD_INFORMATION Info; - NTSTATUS Status; - IO_STATUS_BLOCK IoStatus; - PDEVICE_OBJECT DeviceObject; - PFAST_IO_DISPATCH FastDispatch; - KEVENT Event; - PIO_STACK_LOCATION IoStackLocation; - PIRP Irp; - BOOLEAN OldHardError; - - - PAGED_CODE(); - - /* Get Device Object and Fast Calls */ - DeviceObject = IoGetRelatedDeviceObject(FileObject); - FastDispatch = DeviceObject->DriverObject->FastIoDispatch; - - /* Check if we support Fast Calls, and check FastIoQueryStandardInfo */ - /* Call the function and see if it succeeds */ - if ( !FastDispatch || - !FastDispatch->FastIoQueryStandardInfo || - !FastDispatch->FastIoQueryStandardInfo(FileObject,TRUE, - &Info,&IoStatus,DeviceObject)) - { - /* If any of the above failed, then we are going to send an IRP to the device object */ - /* Initialize the even for the IO */ - KeInitializeEvent(&Event,NotificationEvent,FALSE); - /* Allocate the IRP */ - Irp = IoAllocateIrp(DeviceObject->StackSize,FALSE); - if (Irp == NULL) - { - return STATUS_INSUFFICIENT_RESOURCES; - } - - - /* Don't process hard error */ - OldHardError = IoSetThreadHardErrorMode(FALSE); - - /* Setup the IRP */ - Irp->UserIosb = &IoStatus; - Irp->UserEvent = &Event; - Irp->Tail.Overlay.Thread = PsGetCurrentThread(); - Irp->Flags = IRP_SYNCHRONOUS_PAGING_IO | IRP_PAGING_IO; - Irp->RequestorMode = KernelMode; - Irp->Tail.Overlay.OriginalFileObject = FileObject; - Irp->AssociatedIrp.SystemBuffer = &Info; - - /* Setup out stack location */ - IoStackLocation = Irp->Tail.Overlay.CurrentStackLocation; - IoStackLocation--; - IoStackLocation->MajorFunction = IRP_MJ_QUERY_INFORMATION; - IoStackLocation->FileObject = FileObject; - IoStackLocation->DeviceObject = DeviceObject; - IoStackLocation->Parameters.QueryFile.Length = ALIGN_UP(sizeof(FILE_INFORMATION_CLASS),ULONG); - IoStackLocation->Parameters.QueryFile.FileInformationClass = FileStandardInformation; - - /* Send the IRP to the related device object */ - Status = IofCallDriver(DeviceObject,Irp); - - /* Standard DDK IRP result processing */ - if (Status == STATUS_PENDING) - { - KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL); - } - - /* If there was a synchronous error, signal it */ - if (!NT_SUCCESS(Status)) - { - IoStatus.Status = Status; - } - - IoSetThreadHardErrorMode(OldHardError); - } - - /* Check the sync/async IO result */ - if (NT_SUCCESS(IoStatus.Status)) - { - /* Was the request for a directory ? */ - if (Info.Directory) - { - IoStatus.Status = STATUS_FILE_IS_A_DIRECTORY; - } - else - { - FileSize->QuadPart = Info.EndOfFile.QuadPart; - } - } - - return IoStatus.Status; -} - - -/* - * @implemented - */ -BOOLEAN -NTAPI -FsRtlMdlRead(IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, - IN ULONG Length, - IN ULONG LockKey, - OUT PMDL *MdlChain, - OUT PIO_STATUS_BLOCK IoStatus) -{ - PDEVICE_OBJECT DeviceObject, BaseDeviceObject; - PFAST_IO_DISPATCH FastDispatch; - - /* Get Device Object and Fast Calls */ - DeviceObject = IoGetRelatedDeviceObject(FileObject); - FastDispatch = DeviceObject->DriverObject->FastIoDispatch; - - /* Check if we support Fast Calls, and check this one */ - if (FastDispatch && FastDispatch->MdlRead) - { - /* Use the fast path */ - return FastDispatch->MdlRead(FileObject, - FileOffset, - Length, - LockKey, - MdlChain, - IoStatus, - DeviceObject); - } - - /* Get the Base File System (Volume) and Fast Calls */ - BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject); - FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch; - - /* If the Base Device Object has its own FastDispatch Routine, fail */ - if (FastDispatch && FastDispatch->MdlRead && - BaseDeviceObject != DeviceObject) - { - return FALSE; - } - - /* No fast path, use slow path */ - return FsRtlMdlReadDev(FileObject, - FileOffset, - Length, - LockKey, - MdlChain, - IoStatus, - DeviceObject); -} - -/* - * @implemented - */ -BOOLEAN -NTAPI -FsRtlMdlReadComplete(IN PFILE_OBJECT FileObject, - IN OUT PMDL MdlChain) -{ - PDEVICE_OBJECT DeviceObject, BaseDeviceObject; - PFAST_IO_DISPATCH FastDispatch; - - /* Get Device Object and Fast Calls */ - DeviceObject = IoGetRelatedDeviceObject(FileObject); - FastDispatch = DeviceObject->DriverObject->FastIoDispatch; - - /* Check if we support Fast Calls, and check this one */ - if (FastDispatch && FastDispatch->MdlReadComplete) - { - /* Use the fast path */ - return FastDispatch->MdlReadComplete(FileObject, - MdlChain, - DeviceObject); - } - - /* Get the Base File System (Volume) and Fast Calls */ - BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject); - FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch; - - /* If the Base Device Object has its own FastDispatch Routine, fail */ - if ((BaseDeviceObject != DeviceObject) && FastDispatch - && FastDispatch->MdlReadComplete) - { - return FALSE; - } - - /* No fast path, use slow path */ - return FsRtlMdlReadCompleteDev(FileObject, MdlChain, DeviceObject); -} - -/* - * @implemented - */ - BOOLEAN - NTAPI -FsRtlMdlReadCompleteDev(IN PFILE_OBJECT FileObject, - IN PMDL MemoryDescriptorList, - IN PDEVICE_OBJECT DeviceObject) -{ - /* Call the Cache Manager */ - CcMdlReadComplete2(MemoryDescriptorList, FileObject); - return TRUE; -} - - -/* - * @implemented - */ -BOOLEAN -NTAPI -FsRtlMdlReadDev(IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, - IN ULONG Length, - IN ULONG LockKey, - OUT PMDL *MdlChain, - OUT PIO_STATUS_BLOCK IoStatus, - IN PDEVICE_OBJECT DeviceObject) -{ - PFSRTL_COMMON_FCB_HEADER FcbHeader; - BOOLEAN Result = TRUE; - LARGE_INTEGER Offset; - PFAST_IO_DISPATCH FastIoDispatch; - PDEVICE_OBJECT Device; - PAGED_CODE(); - - /* No actual read */ - if (!Length) - { - /* Return success */ - IoStatus->Status = STATUS_SUCCESS; - IoStatus->Information = 0; - return TRUE; - } - - /* Sanity check */ - ASSERT(MAXLONGLONG - FileOffset->QuadPart >= (LONGLONG)Length); - - /* Get the offset and FCB header */ - Offset.QuadPart = FileOffset->QuadPart + Length; - FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext; - - /* Enter the FS */ - FsRtlEnterFileSystem(); - CcFastMdlReadWait++; - - /* Lock the FCB */ - ExAcquireResourceShared(FcbHeader->Resource, TRUE); - - /* Check if this is a fast I/O cached file */ - if (!(FileObject->PrivateCacheMap) || - (FcbHeader->IsFastIoPossible == FastIoIsNotPossible)) - { - /* It's not, so fail */ - CcFastMdlReadNotPossible += 1; - Result = FALSE; - goto Cleanup; - } - - /* Check if we need to find out if fast I/O is available */ - if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable) - { - /* Get the Fast I/O table */ - Device = IoGetRelatedDeviceObject(FileObject); - FastIoDispatch = Device->DriverObject->FastIoDispatch; - - /* Sanity check */ - ASSERT(!KeIsExecutingDpc()); - ASSERT(FastIoDispatch != NULL); - ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL); - - /* Ask the driver if we can do it */ - if (!FastIoDispatch->FastIoCheckIfPossible(FileObject, - FileOffset, - Length, - TRUE, - LockKey, - TRUE, - IoStatus, - Device)) - { - /* It's not, fail */ - CcFastMdlReadNotPossible += 1; - Result = FALSE; - goto Cleanup; - } - } - - /* Check if we read too much */ - if (Offset.QuadPart > FcbHeader->FileSize.QuadPart) - { - /* We did, check if the file offset is past the end */ - if (FileOffset->QuadPart >= FcbHeader->FileSize.QuadPart) - { - /* Set end of file */ - IoStatus->Status = STATUS_END_OF_FILE; - IoStatus->Information = 0; - goto Cleanup; - } - - /* Otherwise, just normalize the length */ - Length = (ULONG)(FcbHeader->FileSize.QuadPart - FileOffset->QuadPart); - } - - /* Set this as top-level IRP */ - PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP; - - _SEH2_TRY - { - /* Attempt a read */ - CcMdlRead(FileObject, FileOffset, Length, MdlChain, IoStatus); - FileObject->Flags |= FO_FILE_FAST_IO_READ; - } - _SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) - { - Result = FALSE; - } _SEH2_END; - - - /* Remove the top-level IRP flag */ - PsGetCurrentThread()->TopLevelIrp = 0; - - /* Return to caller */ -Cleanup: - ExReleaseResourceLite(FcbHeader->Resource); - FsRtlExitFileSystem(); - return Result; -} - -/* - * @implemented - */ -BOOLEAN -NTAPI -FsRtlMdlWriteComplete(IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, - IN PMDL MdlChain) -{ - PDEVICE_OBJECT DeviceObject, BaseDeviceObject; - PFAST_IO_DISPATCH FastDispatch; - - /* Get Device Object and Fast Calls */ - DeviceObject = IoGetRelatedDeviceObject(FileObject); - FastDispatch = DeviceObject->DriverObject->FastIoDispatch; - - /* Check if we support Fast Calls, and check this one */ - if (FastDispatch && FastDispatch->MdlWriteComplete) - { - /* Use the fast path */ - return FastDispatch->MdlWriteComplete(FileObject, - FileOffset, - MdlChain, - DeviceObject); - } - - /* Get the Base File System (Volume) and Fast Calls */ - BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject); - FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch; - - /* If the Base Device Object has its own FastDispatch Routine, fail */ - if (FastDispatch && FastDispatch->MdlWriteComplete && - BaseDeviceObject != DeviceObject) - { - return FALSE; - } - - /* No fast path, use slow path */ - return FsRtlMdlWriteCompleteDev(FileObject, - FileOffset, - MdlChain, - DeviceObject); -} - -/* - * @implemented - */ -BOOLEAN -NTAPI -FsRtlMdlWriteCompleteDev(IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, - IN PMDL MdlChain, - IN PDEVICE_OBJECT DeviceObject) -{ - if (FileObject->Flags & FO_WRITE_THROUGH) - { - return FALSE; - } - - - /* Call the Cache Manager */ - CcMdlWriteComplete2(FileObject,FileOffset,MdlChain); - return TRUE; -} - -/* - * @implemented - */ -BOOLEAN -NTAPI -FsRtlPrepareMdlWrite(IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, - IN ULONG Length, - IN ULONG LockKey, - OUT PMDL *MdlChain, - OUT PIO_STATUS_BLOCK IoStatus) -{ - PDEVICE_OBJECT DeviceObject, BaseDeviceObject; - PFAST_IO_DISPATCH FastDispatch; - - /* Get Device Object and Fast Calls */ - DeviceObject = IoGetRelatedDeviceObject(FileObject); - FastDispatch = DeviceObject->DriverObject->FastIoDispatch; - - /* Check if we support Fast Calls, and check this one */ - if (FastDispatch && FastDispatch->PrepareMdlWrite) - { - /* Use the fast path */ - return FastDispatch->PrepareMdlWrite(FileObject, - FileOffset, - Length, - LockKey, - MdlChain, - IoStatus, - DeviceObject); - } - - /* Get the Base File System (Volume) and Fast Calls */ - BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject); - FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch; - - /* If the Base Device Object has its own FastDispatch Routine, fail */ - if (FastDispatch && FastDispatch->PrepareMdlWrite && - BaseDeviceObject != DeviceObject) - { - return FALSE; - } - - /* No fast path, use slow path */ - return FsRtlPrepareMdlWriteDev(FileObject, - FileOffset, - Length, - LockKey, - MdlChain, - IoStatus, - DeviceObject); -} - -/* - * @implemented - */ -BOOLEAN -NTAPI -FsRtlPrepareMdlWriteDev(IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, - IN ULONG Length, - IN ULONG LockKey, - OUT PMDL *MdlChain, - OUT PIO_STATUS_BLOCK IoStatus, - IN PDEVICE_OBJECT DeviceObject) -{ - BOOLEAN Result = TRUE; - PFAST_IO_DISPATCH FastIoDispatch; - PDEVICE_OBJECT Device; - PFSRTL_COMMON_FCB_HEADER FcbHeader; - - LARGE_INTEGER OldFileSize; - LARGE_INTEGER OldValidDataLength; - LARGE_INTEGER NewSize; - LARGE_INTEGER Offset; - - /* WDK doc. Offset=0xffffffffffffffff indicates append to the end of file */ - BOOLEAN FileOffsetAppend = ((FileOffset->HighPart == (LONG)0xffffffff) && (FileOffset->LowPart == 0xffffffff)); - BOOLEAN FileSizeModified = FALSE; - BOOLEAN ResourceAquiredShared = FALSE; - - /* Initialize some of the vars and pointers */ - OldFileSize.QuadPart = 0; - OldValidDataLength.QuadPart = 0; - - PAGED_CODE(); - - Offset.QuadPart = FileOffset->QuadPart + Length; - - /* Nagar p.544 -- Check with Cc if we can write */ - if ( (!CcCanIWrite(FileObject, Length,TRUE,FALSE))|| - (FileObject->Flags & FO_WRITE_THROUGH)) - { - return FALSE; - } - - IoStatus->Status = STATUS_SUCCESS; - - /* No actual read */ - if (!Length) - { - return TRUE; - } - - FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext; - FsRtlEnterFileSystem(); - - /* Check we are going to extend the file */ - if ( (FileOffsetAppend == FALSE) && - ( (FileOffset->QuadPart + Length) <= FcbHeader->ValidDataLength.QuadPart ) - ) - { - /* Acquire the resource shared */ - ExAcquireResourceSharedLite(FcbHeader->Resource,TRUE); - ResourceAquiredShared =TRUE; - } else - { - /* Acquire the resource exclusive */ - ExAcquireResourceExclusiveLite(FcbHeader->Resource,TRUE); - } - - /* Check if we are appending */ - if (FileOffsetAppend == TRUE) { - Offset.QuadPart = FcbHeader->FileSize.QuadPart; - NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length; - } else - { - Offset.QuadPart = FileOffset->QuadPart; - NewSize.QuadPart = FileOffset->QuadPart + Length; - } - - if ( (FileObject->PrivateCacheMap) && - (FcbHeader->IsFastIoPossible) && - (MAXLONGLONG >= (LONGLONG) FileOffset->QuadPart + Length) && - (NewSize.QuadPart <= FcbHeader->AllocationSize.QuadPart) ) - { - /* Check if we can keep the lock shared */ - if (ResourceAquiredShared && (NewSize.QuadPart > FcbHeader->ValidDataLength.QuadPart) ) { - ExReleaseResourceLite(FcbHeader->Resource); - ExAcquireResourceExclusiveLite(FcbHeader->Resource,TRUE); - - /* Compute the offset and the new filesize */ - if (FileOffsetAppend) { - Offset.QuadPart = FcbHeader->FileSize.QuadPart; - NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length; - } - - /* Recheck the above points since we released and reacquire the lock */ - if ( (FileObject->PrivateCacheMap != NULL) && - (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) && - (FcbHeader->AllocationSize.QuadPart > NewSize.QuadPart) - ) - { - /* Do nothing */ - } else { - goto FailAndCleanup; - } - } - - /* Check if we need to find out if fast I/O is available */ - if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable) - { - /* Sanity check */ - /* ASSERT(!KeIsExecutingDpc()); */ - - /* Get the Fast I/O table */ - Device = IoGetRelatedDeviceObject(FileObject); - FastIoDispatch = Device->DriverObject->FastIoDispatch; - - /* Sanity check */ - ASSERT(FastIoDispatch != NULL); - ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL); - - /* Ask the driver if we can do it */ - if (!FastIoDispatch->FastIoCheckIfPossible(FileObject, - FileOffset, - Length, - TRUE, - LockKey, - FALSE, - IoStatus, - Device)) - { - /* It's not, fail */ - goto FailAndCleanup; - } - } - - /* If we are going to modify the filesize, save the old fs in case the operation fails */ - if (NewSize.QuadPart > FcbHeader->FileSize.QuadPart) - { - FileSizeModified = TRUE; - OldFileSize.QuadPart = FcbHeader->FileSize.QuadPart; - OldValidDataLength.QuadPart = FcbHeader->ValidDataLength.QuadPart; - - /* If the high part of the filesize is going to change, grab the Paging IoResouce */ - if (NewSize.HighPart != FcbHeader->FileSize.HighPart && FcbHeader->PagingIoResource) - { - ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE); - FcbHeader->FileSize.QuadPart = NewSize.QuadPart; - ExReleaseResourceLite(FcbHeader->PagingIoResource); - } else { - FcbHeader->FileSize.QuadPart = NewSize.QuadPart; - } - } - - - /* Nagar p.544 */ - /* Set ourselves as top component */ - PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP; - _SEH2_TRY - { - /* Check if there is a gap between the end of the file and the offset - If yes, then we have to zero the data - */ - if (Offset.QuadPart > FcbHeader->ValidDataLength.QuadPart) { - Result = CcZeroData(FileObject,&FcbHeader->ValidDataLength,&Offset,TRUE); - if (Result) - { - CcPrepareMdlWrite(FileObject,&Offset,Length,MdlChain,IoStatus); - } - } else { - CcPrepareMdlWrite(FileObject,&Offset,Length,MdlChain,IoStatus); - } - - }_SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) - { - Result = FALSE; - } _SEH2_END; - - /* Reset the top component */ - PsGetCurrentThread()->TopLevelIrp = 0; - - /* Did the operation suceeded */ - if (Result) { - /* Check if we need to update the filesize */ - if (NewSize.QuadPart > FcbHeader->ValidDataLength.QuadPart) { - if (NewSize.HighPart != FcbHeader->ValidDataLength.HighPart && FcbHeader->PagingIoResource) { - ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE); - FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart; - ExReleaseResourceLite(FcbHeader->PagingIoResource); - } else { - FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart; - } - } - - /* Flag the file as modified */ - FileObject->Flags |= FO_FILE_MODIFIED; - /* Check if the filesize has changed */ - if (FileSizeModified) { - /* Update the file sizes */ - ((SHARED_CACHE_MAP*) FileObject->SectionObjectPointer->SharedCacheMap)->FileSize.QuadPart = NewSize.QuadPart; - FileObject->Flags |= FO_FILE_SIZE_CHANGED; - } - - } - else - { - /* The operation did not succeed - Reset the file size to what it should be - */ - if (FileSizeModified) { - if (FcbHeader->PagingIoResource) { - ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE); - FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart; - FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart; - ExReleaseResourceLite(FcbHeader->PagingIoResource); - }else{ - FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart; - FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart; - } - } - } - - goto Cleanup; - - } - else - { - goto FailAndCleanup; - } - - -FailAndCleanup: - - ExReleaseResourceLite(FcbHeader->Resource); - FsRtlExitFileSystem(); - return FALSE; - -Cleanup: - - ExReleaseResourceLite(FcbHeader->Resource); - FsRtlExitFileSystem(); - return Result; - -} - -/* -* @implemented -*/ -VOID -NTAPI -FsRtlAcquireFileExclusive(IN PFILE_OBJECT FileObject) -{ - /* - PAGED_CODE(); - FsRtlAcquireFileExclusiveCommon(FileObject,0,0); - */ - KeBugCheck(FILE_SYSTEM); -} - -/* -* @implemented -*/ -VOID -NTAPI -FsRtlReleaseFile(IN PFILE_OBJECT FileObject) -{ - - KeBugCheck(FILE_SYSTEM); -} - -/*++ - * @name FsRtlRegisterFileSystemFilterCallbacks - * @unimplemented - * - * FILLME - * - * @param FilterDriverObject - * FILLME - * - * @param Callbacks - * FILLME - * - * @return None - * - * @remarks None - * - *--*/ -NTSTATUS -NTAPI -FsRtlRegisterFileSystemFilterCallbacks(IN PDRIVER_OBJECT FilterDriverObject, - IN PFS_FILTER_CALLBACKS Callbacks) -{ - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; -} - +/* + * PROJECT: ReactOS Kernel + * LICENSE: GPL - See COPYING in the top level directory + * FILE: ntoskrnl/fsrtl/fastio.c + * PURPOSE: Provides Fast I/O entrypoints to the Cache Manager + * PROGRAMMERS: buzdelabuz2@gmail.com,alex.ionescu@reactos.org + */ + +/* INCLUDES ******************************************************************/ + +#include <ntoskrnl.h> +#define NDEBUG +#include <debug.h> + +/* PUBLIC FUNCTIONS **********************************************************/ + +/* + * @implemented + */ +VOID +NTAPI +FsRtlIncrementCcFastReadResourceMiss(VOID) +{ + CcFastReadResourceMiss++; +} + +/* + * @implemented + */ +VOID +NTAPI +FsRtlIncrementCcFastReadNotPossible(VOID) +{ + CcFastReadNotPossible++; +} + +/* + * @implemented + */ +VOID +NTAPI +FsRtlIncrementCcFastReadWait(VOID) +{ + CcFastReadWait++; +} + +/* + * @implemented + */ +VOID +NTAPI +FsRtlIncrementCcFastReadNoWait(VOID) +{ + CcFastReadNoWait++; +} + +/* + * @implemented + */ +BOOLEAN +NTAPI +FsRtlCopyRead(IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN ULONG Length, + IN BOOLEAN Wait, + IN ULONG LockKey, + OUT PVOID Buffer, + OUT PIO_STATUS_BLOCK IoStatus, + IN PDEVICE_OBJECT DeviceObject) +{ + + PFSRTL_COMMON_FCB_HEADER FcbHeader; + LARGE_INTEGER Offset; + PFAST_IO_DISPATCH FastIoDispatch; + PDEVICE_OBJECT Device; + BOOLEAN Result = TRUE; + ULONG PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(FileOffset,Length); + + PAGED_CODE(); + ASSERT(FileObject); + ASSERT(FileObject->FsContext); + + /* No actual read */ + if (!Length) + { + /* Return success */ + IoStatus->Status = STATUS_SUCCESS; + IoStatus->Information = 0; + return TRUE; + } + + if (MAXLONGLONG < (LONGLONG) FileOffset->QuadPart + Length) { + IoStatus->Status = STATUS_INVALID_PARAMETER; + IoStatus->Information = 0; + return FALSE; + } + + /* Get the offset and FCB header */ + Offset.QuadPart = FileOffset->QuadPart + Length; + FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext; + + + if (Wait) { + /* Use a Resource Acquire */ + FsRtlEnterFileSystem(); + CcFastReadWait++; + ExAcquireResourceSharedLite(FcbHeader->Resource, TRUE); + } else { + /* Acquire the resource without blocking */ + /* Return false and the I/O manager will retry using the standard IRP method. */ + /* Use a Resource Acquire */ + FsRtlEnterFileSystem(); + if (!ExAcquireResourceSharedLite(FcbHeader->Resource, FALSE)) { + FsRtlExitFileSystem(); + FsRtlIncrementCcFastReadResourceMiss(); + return FALSE; + } + } + + + /* Check if this is a fast I/O cached file */ + if (!(FileObject->PrivateCacheMap) || + (FcbHeader->IsFastIoPossible == FastIoIsNotPossible)) { + /* It's not, so fail */ + Result = FALSE; + goto Cleanup; + } + + /* Check if we need to find out if fast I/O is available */ + if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable) + { + /* Sanity check */ + ASSERT(!KeIsExecutingDpc()); + + /* Get the Fast I/O table */ + Device = IoGetRelatedDeviceObject(FileObject); + FastIoDispatch = Device->DriverObject->FastIoDispatch; + + /* Sanity check */ + ASSERT(FastIoDispatch != NULL); + ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL); + + /* Ask the driver if we can do it */ + if (!FastIoDispatch->FastIoCheckIfPossible(FileObject, + FileOffset, + Length, + TRUE, + LockKey, + TRUE, + IoStatus, + Device)) + { + /* It's not, fail */ + Result = FALSE; + goto Cleanup; + } + } + + /* Check if we read too much */ + if (Offset.QuadPart > FcbHeader->FileSize.QuadPart){ + /* We did, check if the file offset is past the end */ + if (FileOffset->QuadPart >= FcbHeader->FileSize.QuadPart){ + /* Set end of file */ + IoStatus->Status = STATUS_END_OF_FILE; + IoStatus->Information = 0; + goto Cleanup; + } + + /* Otherwise, just normalize the length */ + Length = (ULONG)(FcbHeader->FileSize.QuadPart - FileOffset->QuadPart); + } + + /* Set this as top-level IRP */ + PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP; + + _SEH2_TRY + { + /* Make sure the IO and file size is below 4GB */ + if (Wait && !(Offset.HighPart | FcbHeader->FileSize.HighPart )) { + + /* Call the cache controller */ + CcFastCopyRead (FileObject,FileOffset->LowPart,Length,PageCount,Buffer,IoStatus); + /* File was accessed */ + FileObject->Flags |= FO_FILE_FAST_IO_READ; + if (IoStatus->Status != STATUS_END_OF_FILE) { + ASSERT(( FcbHeader->FileSize.QuadPart) >= (FileOffset->QuadPart + IoStatus->Information)); + } + + } else { + + /* Call the cache controller */ + Result = CcCopyRead(FileObject, FileOffset, Length, Wait,Buffer, IoStatus); + /* File was accessed */ + FileObject->Flags |= FO_FILE_FAST_IO_READ; + if (Result == TRUE) { + ASSERT( (IoStatus->Status == STATUS_END_OF_FILE) || + ((LONGLONG)(FileOffset->QuadPart + IoStatus->Information) <= FcbHeader->FileSize.QuadPart) + ); + } + } + + /* Update the current file offset */ + if (Result == TRUE) { + FileObject->CurrentByteOffset.QuadPart += IoStatus->Information; + } + } + _SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) + { + Result = FALSE; + } _SEH2_END; + + PsGetCurrentThread()->TopLevelIrp = 0; + + /* Return to caller */ +Cleanup: + + ExReleaseResourceLite(FcbHeader->Resource); + FsRtlExitFileSystem(); + + if (Result == FALSE) { + CcFastReadNotPossible += 1; + } + + return Result; + +} + + +/* + * @implemented + */ +BOOLEAN +NTAPI +FsRtlCopyWrite(IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN ULONG Length, + IN BOOLEAN Wait, + IN ULONG LockKey, + OUT PVOID Buffer, + OUT PIO_STATUS_BLOCK IoStatus, + IN PDEVICE_OBJECT DeviceObject) +{ + + BOOLEAN Result = TRUE; + PFAST_IO_DISPATCH FastIoDispatch; + PDEVICE_OBJECT Device; + PFSRTL_COMMON_FCB_HEADER FcbHeader; + + /* WDK doc. Offset=0xffffffffffffffff indicates append to the end of file */ + BOOLEAN FileOffsetAppend = ((FileOffset->HighPart == (LONG)0xffffffff) && (FileOffset->LowPart == 0xffffffff)); + BOOLEAN ResourceAquiredShared = FALSE; + + BOOLEAN b_4GB = FALSE; + + BOOLEAN FileSizeModified = FALSE; + LARGE_INTEGER OldFileSize; + LARGE_INTEGER OldValidDataLength; + + LARGE_INTEGER NewSize; + LARGE_INTEGER Offset; + + PAGED_CODE(); + + ASSERT(FileObject); + ASSERT(FileObject->FsContext); + + /* Initialize some of the vars and pointers */ + NewSize.QuadPart = 0; + Offset.QuadPart = FileOffset->QuadPart + Length; + FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext; + + /* Nagar p.544 -- Check with Cc if we can write and check if the IO > 64kB (WDK macro) */ + if ( (CcCanIWrite(FileObject, Length,Wait, FALSE) == FALSE) || + (CcCopyWriteWontFlush(FileObject,FileOffset,Length) == FALSE) || + ((FileObject->Flags & FO_WRITE_THROUGH )== TRUE) + ) + { + return FALSE; + } + + /* No actual read */ + if (!Length) + { + IoStatus->Status = STATUS_SUCCESS; + IoStatus->Information = Length; + return TRUE; + } + + FsRtlEnterFileSystem(); + + /* Nagar p.544/545 -- The CcFastCopyWrite doesn't deal with filesize beyond 4GB*/ + if (Wait && (FcbHeader->AllocationSize.HighPart == 0)) + { + /* If the file offset is not past the file size, then we can acquire the lock shared */ + if ((FileOffsetAppend == FALSE) && (Offset.LowPart <= FcbHeader->ValidDataLength.LowPart)){ + ExAcquireResourceSharedLite(FcbHeader->Resource,TRUE); + ResourceAquiredShared = TRUE; + } else { + ExAcquireResourceExclusiveLite(FcbHeader->Resource,TRUE); + } + + /* Nagar p.544/545 -- If we append, use the file size as offset. Also, check that we aren't crossing the 4GB boundary */ + if ((FileOffsetAppend == TRUE)) { + Offset.LowPart = FcbHeader->FileSize.LowPart; + NewSize.LowPart = FcbHeader->FileSize.LowPart + Length; + b_4GB = (NewSize.LowPart < FcbHeader->FileSize.LowPart); + + } else { + Offset.LowPart = FileOffset->LowPart; + NewSize.LowPart = FileOffset->LowPart + Length; + b_4GB = ((NewSize.LowPart < FileOffset->LowPart) || (FileOffset->HighPart != 0)); + } + + /* Nagar p.544/545 + Make sure that caching is initated. + That fast are allowed for this file stream. + That we are not extending past the allocated size + That we are not creating a hole bigger than 8k + That we are not crossing the 4GB boundary + */ + if ( (FileObject->PrivateCacheMap != NULL) && + (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) && + (FcbHeader->AllocationSize.LowPart >= NewSize.LowPart) && + (Offset.LowPart < (FcbHeader->ValidDataLength.LowPart + 0x2000) ) && + !b_4GB + ) + { + /* If we are extending past the file size, we need to release the lock and acquire it + exclusively, because we are going to need to update the FcbHeader */ + if (ResourceAquiredShared && (NewSize.LowPart > (FcbHeader->ValidDataLength.LowPart + 0x2000))) { + /* Then we need to acquire the resource exclusive */ + ExReleaseResourceLite(FcbHeader->Resource); + ExAcquireResourceExclusiveLite(FcbHeader->Resource,TRUE); + if (FileOffsetAppend == TRUE) { + Offset.LowPart = FcbHeader->FileSize.LowPart; // ?? + NewSize.LowPart = FcbHeader->FileSize.LowPart + Length; + /* Make sure we don't cross the 4GB boundary */ + b_4GB = (NewSize.LowPart < Offset.LowPart); + } + + /* Recheck some of the conditions since we let the lock go */ + if ( (FileObject->PrivateCacheMap != NULL) && + (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) && + (FcbHeader->AllocationSize.LowPart >= NewSize.LowPart) && + (FcbHeader->AllocationSize.HighPart == 0) && + !b_4GB + ) + { + } else + { + goto FailAndCleanup; + } + } + + }else + { + goto FailAndCleanup; + } + + /* Check if we need to find out if fast I/O is available */ + if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable) + { + IO_STATUS_BLOCK FastIoCheckIfPossibleStatus; + + /* Sanity check */ + ASSERT(!KeIsExecutingDpc()); + + /* Get the Fast I/O table */ + Device = IoGetRelatedDeviceObject(FileObject); + FastIoDispatch = Device->DriverObject->FastIoDispatch; + + /* Sanity check */ + ASSERT(FastIoDispatch != NULL); + ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL); + + /* Ask the driver if we can do it */ + if (!FastIoDispatch->FastIoCheckIfPossible(FileObject, + FileOffsetAppend? &FcbHeader->FileSize:FileOffset, + Length, + TRUE, + LockKey, + FALSE, + &FastIoCheckIfPossibleStatus, + Device)) + { + /* It's not, fail */ + goto FailAndCleanup; + } + } + + /* If we are going to extend the file then save the old file size + in case the operation fails + */ + if (NewSize.LowPart > FcbHeader->FileSize.LowPart) { + FileSizeModified = TRUE; + OldFileSize.LowPart = FcbHeader->FileSize.LowPart; + OldValidDataLength.LowPart = FcbHeader->ValidDataLength.LowPart; + FcbHeader->FileSize.LowPart = NewSize.LowPart; + } + + /* Set this as top-level IRP */ + PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP; + + _SEH2_TRY + { + if (Offset.LowPart > FcbHeader->ValidDataLength.LowPart) { + LARGE_INTEGER OffsetVar; + OffsetVar.LowPart = Offset.LowPart; + OffsetVar.HighPart = 0; + CcZeroData(FileObject,&FcbHeader->ValidDataLength,&OffsetVar,TRUE); + } + + /* Call the cache manager */ + CcFastCopyWrite(FileObject,Offset.LowPart,Length,Buffer); + } + _SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) + { + Result = FALSE; + } _SEH2_END; + + /* Remove ourselves at the top level component after the IO is done */ + PsGetCurrentThread()->TopLevelIrp = 0; + + /* Did the operation succeed ? */ + if (Result == TRUE) { + /* Update the valid file size if necessary */ + if (NewSize.LowPart > FcbHeader->ValidDataLength.LowPart){ + FcbHeader->ValidDataLength.LowPart = NewSize.LowPart ; + } + + /* Flag the file as modified */ + FileObject->Flags |= FO_FILE_MODIFIED; + + /* Update the strucutres if the file size changed */ + if (FileSizeModified) { + ((SHARED_CACHE_MAP*) FileObject->SectionObjectPointer->SharedCacheMap)->FileSize.LowPart = NewSize.LowPart; + FileObject->Flags |= FO_FILE_SIZE_CHANGED; + } + + /* Update the file object current file offset */ + FileObject->CurrentByteOffset.QuadPart = NewSize.LowPart; + + } else { + + /* Result == FALSE if we get here. */ + if (FileSizeModified) { + /* If the file size was modified then restore the old file size */ + if(FcbHeader->PagingIoResource != NULL) { + // Nagar P.544 Restore the old file size if operation didn't succeed. + ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource,TRUE); + FcbHeader->FileSize.LowPart = OldFileSize.LowPart; + FcbHeader->ValidDataLength.LowPart = OldValidDataLength.LowPart; + ExReleaseResourceLite(FcbHeader->PagingIoResource); + } else { + /* If there is no lock and do it without */ + FcbHeader->FileSize.LowPart = OldFileSize.LowPart; + FcbHeader->ValidDataLength.LowPart = OldValidDataLength.LowPart; + } + } else { + } + } + + goto Cleanup; + + } else { + + LARGE_INTEGER OldFileSize; + + /* Sanity check */ + ASSERT(!KeIsExecutingDpc()); + + // Nagar P.544 + /* Check if we need to acquire the resource exclusive */ + if ( (FileOffsetAppend == FALSE) && + ( (FileOffset->QuadPart + Length) <= FcbHeader->ValidDataLength.QuadPart ) + ) + { + /* Acquire the resource shared */ + if (!ExAcquireResourceSharedLite(FcbHeader->Resource,Wait)) { + goto LeaveCriticalAndFail; + } + ResourceAquiredShared =TRUE; + } else { + /* Acquire the resource exclusive */ + if (!ExAcquireResourceExclusiveLite(FcbHeader->Resource,Wait)) { + goto LeaveCriticalAndFail; + } + } + + /* Check if we are appending */ + if (FileOffsetAppend == TRUE) { + Offset.QuadPart = FcbHeader->FileSize.QuadPart; + NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length; + } else { + Offset.QuadPart = FileOffset->QuadPart; + NewSize.QuadPart += FileOffset->QuadPart + Length; + } + + /* Nagar p.544/545 + Make sure that caching is initated. + That fast are allowed for this file stream. + That we are not extending past the allocated size + That we are not creating a hole bigger than 8k + */ + if ( (FileObject->PrivateCacheMap != NULL) && + (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) && + ((FcbHeader->ValidDataLength.QuadPart + 0x2000) > Offset.QuadPart) && + (MAXLONGLONG > (Offset.QuadPart + Length)) && + (FcbHeader->AllocationSize.QuadPart >= NewSize.QuadPart) + ) + { + /* Check if we can keep the lock shared */ + if (ResourceAquiredShared && (NewSize.QuadPart > FcbHeader->ValidDataLength.QuadPart) ) { + ExReleaseResourceLite(FcbHeader->Resource); + if(!ExAcquireResourceExclusiveLite(FcbHeader->Resource,Wait)) + { + goto LeaveCriticalAndFail; + } + + /* Compute the offset and the new filesize */ + if (FileOffsetAppend) { + Offset.QuadPart = FcbHeader->FileSize.QuadPart; + NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length; + } + + /* Recheck the above points since we released and reacquire the lock */ + if ( (FileObject->PrivateCacheMap != NULL) && + (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) && + (FcbHeader->AllocationSize.QuadPart > NewSize.QuadPart) + ) + { + /* Do nothing */ + } else { + goto FailAndCleanup; + } + } + + /* Check if we need to find out if fast I/O is available */ + if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable) + { + IO_STATUS_BLOCK FastIoCheckIfPossibleStatus; + + /* Sanity check */ + ASSERT(!KeIsExecutingDpc()); + + /* Get the Fast I/O table */ + Device = IoGetRelatedDeviceObject(FileObject); + FastIoDispatch = Device->DriverObject->FastIoDispatch; + + /* Sanity check */ + ASSERT(FastIoDispatch != NULL); + ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL); + + /* Ask the driver if we can do it */ + if (!FastIoDispatch->FastIoCheckIfPossible(FileObject, + FileOffsetAppend? &FcbHeader->FileSize:FileOffset, + Length, + TRUE, + LockKey, + FALSE, + &FastIoCheckIfPossibleStatus, + Device)) + { + /* It's not, fail */ + goto FailAndCleanup; + } + } + + + /* If we are going to modify the filesize, save the old fs in case the operation fails */ + if (NewSize.QuadPart > FcbHeader->FileSize.QuadPart) { + FileSizeModified = TRUE; + OldFileSize.QuadPart = FcbHeader->FileSize.QuadPart; + OldValidDataLength.QuadPart = FcbHeader->ValidDataLength.QuadPart; + + /* If the high part of the filesize is going to change, grab the Paging IoResouce */ + if (NewSize.HighPart != FcbHeader->FileSize.HighPart && FcbHeader->PagingIoResource) { + ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE); + FcbHeader->FileSize.QuadPart = NewSize.QuadPart; + ExReleaseResourceLite(FcbHeader->PagingIoResource); + } else { + FcbHeader->FileSize.QuadPart = NewSize.QuadPart; + } + } + + /* Nagar p.544 */ + /* Set ourselves as top component */ + PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP; + _SEH2_TRY + { + BOOLEAN CallCc = TRUE; + /* Check if there is a gap between the end of the file and the offset + If yes, then we have to zero the data + */ + if (Offset.QuadPart > FcbHeader->ValidDataLength.QuadPart) { + if (!(Result = CcZeroData(FileObject,&FcbHeader->ValidDataLength,&Offset,Wait))) { + /* If this operation fails, then we have to exit + We can jump outside the SEH, so I a using a variable to exit + normally + */ + CallCc = FALSE; + } + } + + /* Unless the CcZeroData failed, call the cache manager */ + if (CallCc) { + Result = CcCopyWrite(FileObject,&Offset,Length, Wait, Buffer); + } + }_SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) + { + Result = FALSE; + } _SEH2_END; + + /* Reset the top component */ + PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP; + + /* Did the operation suceeded */ + if (Result) { + /* Check if we need to update the filesize */ + if (NewSize.QuadPart > FcbHeader->ValidDataLength.QuadPart) { + if (NewSize.HighPart != FcbHeader->ValidDataLength.HighPart && FcbHeader->PagingIoResource) { + ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE); + FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart; + ExReleaseResourceLite(FcbHeader->PagingIoResource); + } else { + FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart; + } + } + + /* Flag the file as modified */ + FileObject->Flags |= FO_FILE_MODIFIED; + /* Check if the filesize has changed */ + if (FileSizeModified) { + /* Update the file sizes */ + ((SHARED_CACHE_MAP*) FileObject->SectionObjectPointer->SharedCacheMap)->FileSize.QuadPart = NewSize.QuadPart; + FileObject->Flags |= FO_FILE_SIZE_CHANGED; + } + /* Update the current FO byte offset */ + FileObject->CurrentByteOffset.QuadPart = NewSize.QuadPart; + } + else + { + /* The operation did not succeed + Reset the file size to what it should be + */ + if (FileSizeModified) { + if (FcbHeader->PagingIoResource) { + ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE); + FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart; + FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart; + ExReleaseResourceLite(FcbHeader->PagingIoResource); + }else{ + FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart; + FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart; + } + } + } + goto Cleanup; + } else { + goto FailAndCleanup; + } + + ASSERT(0); + } + +LeaveCriticalAndFail: + FsRtlExitFileSystem(); + return FALSE; + + +FailAndCleanup: + + ExReleaseResourceLite(FcbHeader->Resource); + FsRtlExitFileSystem(); + return FALSE; + +Cleanup: + + ExReleaseResourceLite(FcbHeader->Resource); + FsRtlExitFileSystem(); + return Result; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +FsRtlGetFileSize(IN PFILE_OBJECT FileObject, + IN OUT PLARGE_INTEGER FileSize) +{ + FILE_STANDARD_INFORMATION Info; + NTSTATUS Status; + IO_STATUS_BLOCK IoStatus; + PDEVICE_OBJECT DeviceObject; + PFAST_IO_DISPATCH FastDispatch; + KEVENT Event; + PIO_STACK_LOCATION IoStackLocation; + PIRP Irp; + BOOLEAN OldHardError; + + + PAGED_CODE(); + + /* Get Device Object and Fast Calls */ + DeviceObject = IoGetRelatedDeviceObject(FileObject); + FastDispatch = DeviceObject->DriverObject->FastIoDispatch; + + /* Check if we support Fast Calls, and check FastIoQueryStandardInfo */ + /* Call the function and see if it succeeds */ + if ( !FastDispatch || + !FastDispatch->FastIoQueryStandardInfo || + !FastDispatch->FastIoQueryStandardInfo(FileObject,TRUE, + &Info,&IoStatus,DeviceObject)) + { + /* If any of the above failed, then we are going to send an IRP to the device object */ + /* Initialize the even for the IO */ + KeInitializeEvent(&Event,NotificationEvent,FALSE); + /* Allocate the IRP */ + Irp = IoAllocateIrp(DeviceObject->StackSize,FALSE); + if (Irp == NULL) + { + return STATUS_INSUFFICIENT_RESOURCES; + } + + + /* Don't process hard error */ + OldHardError = IoSetThreadHardErrorMode(FALSE); + + /* Setup the IRP */ + Irp->UserIosb = &IoStatus; + Irp->UserEvent = &Event; + Irp->Tail.Overlay.Thread = PsGetCurrentThread(); + Irp->Flags = IRP_SYNCHRONOUS_PAGING_IO | IRP_PAGING_IO; + Irp->RequestorMode = KernelMode; + Irp->Tail.Overlay.OriginalFileObject = FileObject; + Irp->AssociatedIrp.SystemBuffer = &Info; + + /* Setup out stack location */ + IoStackLocation = Irp->Tail.Overlay.CurrentStackLocation; + IoStackLocation--; + IoStackLocation->MajorFunction = IRP_MJ_QUERY_INFORMATION; + IoStackLocation->FileObject = FileObject; + IoStackLocation->DeviceObject = DeviceObject; + IoStackLocation->Parameters.QueryFile.Length = ALIGN_UP(sizeof(FILE_INFORMATION_CLASS),ULONG); + IoStackLocation->Parameters.QueryFile.FileInformationClass = FileStandardInformation; + + /* Send the IRP to the related device object */ + Status = IofCallDriver(DeviceObject,Irp); + + /* Standard DDK IRP result processing */ + if (Status == STATUS_PENDING) + { + KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL); + } + + /* If there was a synchronous error, signal it */ + if (!NT_SUCCESS(Status)) + { + IoStatus.Status = Status; + } + + IoSetThreadHardErrorMode(OldHardError); + } + + /* Check the sync/async IO result */ + if (NT_SUCCESS(IoStatus.Status)) + { + /* Was the request for a directory ? */ + if (Info.Directory) + { + IoStatus.Status = STATUS_FILE_IS_A_DIRECTORY; + } + else + { + FileSize->QuadPart = Info.EndOfFile.QuadPart; + } + } + + return IoStatus.Status; +} + + +/* + * @implemented + */ +BOOLEAN +NTAPI +FsRtlMdlRead(IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN ULONG Length, + IN ULONG LockKey, + OUT PMDL *MdlChain, + OUT PIO_STATUS_BLOCK IoStatus) +{ + PDEVICE_OBJECT DeviceObject, BaseDeviceObject; + PFAST_IO_DISPATCH FastDispatch; + + /* Get Device Object and Fast Calls */ + DeviceObject = IoGetRelatedDeviceObject(FileObject); + FastDispatch = DeviceObject->DriverObject->FastIoDispatch; + + /* Check if we support Fast Calls, and check this one */ + if (FastDispatch && FastDispatch->MdlRead) + { + /* Use the fast path */ + return FastDispatch->MdlRead(FileObject, + FileOffset, + Length, + LockKey, + MdlChain, + IoStatus, + DeviceObject); + } + + /* Get the Base File System (Volume) and Fast Calls */ + BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject); + FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch; + + /* If the Base Device Object has its own FastDispatch Routine, fail */ + if (FastDispatch && FastDispatch->MdlRead && + BaseDeviceObject != DeviceObject) + { + return FALSE; + } + + /* No fast path, use slow path */ + return FsRtlMdlReadDev(FileObject, + FileOffset, + Length, + LockKey, + MdlChain, + IoStatus, + DeviceObject); +} + +/* + * @implemented + */ +BOOLEAN +NTAPI +FsRtlMdlReadComplete(IN PFILE_OBJECT FileObject, + IN OUT PMDL MdlChain) +{ + PDEVICE_OBJECT DeviceObject, BaseDeviceObject; + PFAST_IO_DISPATCH FastDispatch; + + /* Get Device Object and Fast Calls */ + DeviceObject = IoGetRelatedDeviceObject(FileObject); + FastDispatch = DeviceObject->DriverObject->FastIoDispatch; + + /* Check if we support Fast Calls, and check this one */ + if (FastDispatch && FastDispatch->MdlReadComplete) + { + /* Use the fast path */ + return FastDispatch->MdlReadComplete(FileObject, + MdlChain, + DeviceObject); + } + + /* Get the Base File System (Volume) and Fast Calls */ + BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject); + FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch; + + /* If the Base Device Object has its own FastDispatch Routine, fail */ + if ((BaseDeviceObject != DeviceObject) && FastDispatch + && FastDispatch->MdlReadComplete) + { + return FALSE; + } + + /* No fast path, use slow path */ + return FsRtlMdlReadCompleteDev(FileObject, MdlChain, DeviceObject); +} + +/* + * @implemented + */ + BOOLEAN + NTAPI +FsRtlMdlReadCompleteDev(IN PFILE_OBJECT FileObject, + IN PMDL MemoryDescriptorList, + IN PDEVICE_OBJECT DeviceObject) +{ + /* Call the Cache Manager */ + CcMdlReadComplete2(MemoryDescriptorList, FileObject); + return TRUE; +} + + +/* + * @implemented + */ +BOOLEAN +NTAPI +FsRtlMdlReadDev(IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN ULONG Length, + IN ULONG LockKey, + OUT PMDL *MdlChain, + OUT PIO_STATUS_BLOCK IoStatus, + IN PDEVICE_OBJECT DeviceObject) +{ + PFSRTL_COMMON_FCB_HEADER FcbHeader; + BOOLEAN Result = TRUE; + LARGE_INTEGER Offset; + PFAST_IO_DISPATCH FastIoDispatch; + PDEVICE_OBJECT Device; + PAGED_CODE(); + + /* No actual read */ + if (!Length) + { + /* Return success */ + IoStatus->Status = STATUS_SUCCESS; + IoStatus->Information = 0; + return TRUE; + } + + /* Sanity check */ + ASSERT(MAXLONGLONG - FileOffset->QuadPart >= (LONGLONG)Length); + + /* Get the offset and FCB header */ + Offset.QuadPart = FileOffset->QuadPart + Length; + FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext; + + /* Enter the FS */ + FsRtlEnterFileSystem(); + CcFastMdlReadWait++; + + /* Lock the FCB */ + ExAcquireResourceShared(FcbHeader->Resource, TRUE); + + /* Check if this is a fast I/O cached file */ + if (!(FileObject->PrivateCacheMap) || + (FcbHeader->IsFastIoPossible == FastIoIsNotPossible)) + { + /* It's not, so fail */ + CcFastMdlReadNotPossible += 1; + Result = FALSE; + goto Cleanup; + } + + /* Check if we need to find out if fast I/O is available */ + if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable) + { + /* Get the Fast I/O table */ + Device = IoGetRelatedDeviceObject(FileObject); + FastIoDispatch = Device->DriverObject->FastIoDispatch; + + /* Sanity check */ + ASSERT(!KeIsExecutingDpc()); + ASSERT(FastIoDispatch != NULL); + ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL); + + /* Ask the driver if we can do it */ + if (!FastIoDispatch->FastIoCheckIfPossible(FileObject, + FileOffset, + Length, + TRUE, + LockKey, + TRUE, + IoStatus, + Device)) + { + /* It's not, fail */ + CcFastMdlReadNotPossible += 1; + Result = FALSE; + goto Cleanup; + } + } + + /* Check if we read too much */ + if (Offset.QuadPart > FcbHeader->FileSize.QuadPart) + { + /* We did, check if the file offset is past the end */ + if (FileOffset->QuadPart >= FcbHeader->FileSize.QuadPart) + { + /* Set end of file */ + IoStatus->Status = STATUS_END_OF_FILE; + IoStatus->Information = 0; + goto Cleanup; + } + + /* Otherwise, just normalize the length */ + Length = (ULONG)(FcbHeader->FileSize.QuadPart - FileOffset->QuadPart); + } + + /* Set this as top-level IRP */ + PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP; + + _SEH2_TRY + { + /* Attempt a read */ + CcMdlRead(FileObject, FileOffset, Length, MdlChain, IoStatus); + FileObject->Flags |= FO_FILE_FAST_IO_READ; + } + _SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) + { + Result = FALSE; + } _SEH2_END; + + + /* Remove the top-level IRP flag */ + PsGetCurrentThread()->TopLevelIrp = 0; + + /* Return to caller */ +Cleanup: + ExReleaseResourceLite(FcbHeader->Resource); + FsRtlExitFileSystem(); + return Result; +} + +/* + * @implemented + */ +BOOLEAN +NTAPI +FsRtlMdlWriteComplete(IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN PMDL MdlChain) +{ + PDEVICE_OBJECT DeviceObject, BaseDeviceObject; + PFAST_IO_DISPATCH FastDispatch; + + /* Get Device Object and Fast Calls */ + DeviceObject = IoGetRelatedDeviceObject(FileObject); + FastDispatch = DeviceObject->DriverObject->FastIoDispatch; + + /* Check if we support Fast Calls, and check this one */ + if (FastDispatch && FastDispatch->MdlWriteComplete) + { + /* Use the fast path */ + return FastDispatch->MdlWriteComplete(FileObject, + FileOffset, + MdlChain, + DeviceObject); + } + + /* Get the Base File System (Volume) and Fast Calls */ + BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject); + FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch; + + /* If the Base Device Object has its own FastDispatch Routine, fail */ + if (FastDispatch && FastDispatch->MdlWriteComplete && + BaseDeviceObject != DeviceObject) + { + return FALSE; + } + + /* No fast path, use slow path */ + return FsRtlMdlWriteCompleteDev(FileObject, + FileOffset, + MdlChain, + DeviceObject); +} + +/* + * @implemented + */ +BOOLEAN +NTAPI +FsRtlMdlWriteCompleteDev(IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN PMDL MdlChain, + IN PDEVICE_OBJECT DeviceObject) +{ + if (FileObject->Flags & FO_WRITE_THROUGH) + { + return FALSE; + } + + + /* Call the Cache Manager */ + CcMdlWriteComplete2(FileObject,FileOffset,MdlChain); + return TRUE; +} + +/* + * @implemented + */ +BOOLEAN +NTAPI +FsRtlPrepareMdlWrite(IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN ULONG Length, + IN ULONG LockKey, + OUT PMDL *MdlChain, + OUT PIO_STATUS_BLOCK IoStatus) +{ + PDEVICE_OBJECT DeviceObject, BaseDeviceObject; + PFAST_IO_DISPATCH FastDispatch; + + /* Get Device Object and Fast Calls */ + DeviceObject = IoGetRelatedDeviceObject(FileObject); + FastDispatch = DeviceObject->DriverObject->FastIoDispatch; + + /* Check if we support Fast Calls, and check this one */ + if (FastDispatch && FastDispatch->PrepareMdlWrite) + { + /* Use the fast path */ + return FastDispatch->PrepareMdlWrite(FileObject, + FileOffset, + Length, + LockKey, + MdlChain, + IoStatus, + DeviceObject); + } + + /* Get the Base File System (Volume) and Fast Calls */ + BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject); + FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch; + + /* If the Base Device Object has its own FastDispatch Routine, fail */ + if (FastDispatch && FastDispatch->PrepareMdlWrite && + BaseDeviceObject != DeviceObject) + { + return FALSE; + } + + /* No fast path, use slow path */ + return FsRtlPrepareMdlWriteDev(FileObject, + FileOffset, + Length, + LockKey, + MdlChain, + IoStatus, + DeviceObject); +} + +/* + * @implemented + */ +BOOLEAN +NTAPI +FsRtlPrepareMdlWriteDev(IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN ULONG Length, + IN ULONG LockKey, + OUT PMDL *MdlChain, + OUT PIO_STATUS_BLOCK IoStatus, + IN PDEVICE_OBJECT DeviceObject) +{ + BOOLEAN Result = TRUE; + PFAST_IO_DISPATCH FastIoDispatch; + PDEVICE_OBJECT Device; + PFSRTL_COMMON_FCB_HEADER FcbHeader; + + LARGE_INTEGER OldFileSize; + LARGE_INTEGER OldValidDataLength; + LARGE_INTEGER NewSize; + LARGE_INTEGER Offset; + + /* WDK doc. Offset=0xffffffffffffffff indicates append to the end of file */ + BOOLEAN FileOffsetAppend = ((FileOffset->HighPart == (LONG)0xffffffff) && (FileOffset->LowPart == 0xffffffff)); + BOOLEAN FileSizeModified = FALSE; + BOOLEAN ResourceAquiredShared = FALSE; + + /* Initialize some of the vars and pointers */ + OldFileSize.QuadPart = 0; + OldValidDataLength.QuadPart = 0; + + PAGED_CODE(); + + Offset.QuadPart = FileOffset->QuadPart + Length; + + /* Nagar p.544 -- Check with Cc if we can write */ + if ( (!CcCanIWrite(FileObject, Length,TRUE,FALSE))|| + (FileObject->Flags & FO_WRITE_THROUGH)) + { + return FALSE; + } + + IoStatus->Status = STATUS_SUCCESS; + + /* No actual read */ + if (!Length) + { + return TRUE; + } + + FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext; + FsRtlEnterFileSystem(); + + /* Check we are going to extend the file */ + if ( (FileOffsetAppend == FALSE) && + ( (FileOffset->QuadPart + Length) <= FcbHeader->ValidDataLength.QuadPart ) + ) + { + /* Acquire the resource shared */ + ExAcquireResourceSharedLite(FcbHeader->Resource,TRUE); + ResourceAquiredShared =TRUE; + } else + { + /* Acquire the resource exclusive */ + ExAcquireResourceExclusiveLite(FcbHeader->Resource,TRUE); + } + + /* Check if we are appending */ + if (FileOffsetAppend == TRUE) { + Offset.QuadPart = FcbHeader->FileSize.QuadPart; + NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length; + } else + { + Offset.QuadPart = FileOffset->QuadPart; + NewSize.QuadPart = FileOffset->QuadPart + Length; + } + + if ( (FileObject->PrivateCacheMap) && + (FcbHeader->IsFastIoPossible) && + (MAXLONGLONG >= (LONGLONG) FileOffset->QuadPart + Length) && + (NewSize.QuadPart <= FcbHeader->AllocationSize.QuadPart) ) + { + /* Check if we can keep the lock shared */ + if (ResourceAquiredShared && (NewSize.QuadPart > FcbHeader->ValidDataLength.QuadPart) ) { + ExReleaseResourceLite(FcbHeader->Resource); + ExAcquireResourceExclusiveLite(FcbHeader->Resource,TRUE); + + /* Compute the offset and the new filesize */ + if (FileOffsetAppend) { + Offset.QuadPart = FcbHeader->FileSize.QuadPart; + NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length; + } + + /* Recheck the above points since we released and reacquire the lock */ + if ( (FileObject->PrivateCacheMap != NULL) && + (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) && + (FcbHeader->AllocationSize.QuadPart > NewSize.QuadPart) + ) + { + /* Do nothing */ + } else { + goto FailAndCleanup; + } + } + + /* Check if we need to find out if fast I/O is available */ + if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable) + { + /* Sanity check */ + /* ASSERT(!KeIsExecutingDpc()); */ + + /* Get the Fast I/O table */ + Device = IoGetRelatedDeviceObject(FileObject); + FastIoDispatch = Device->DriverObject->FastIoDispatch; + + /* Sanity check */ + ASSERT(FastIoDispatch != NULL); + ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL); + + /* Ask the driver if we can do it */ + if (!FastIoDispatch->FastIoCheckIfPossible(FileObject, + FileOffset, + Length, + TRUE, + LockKey, + FALSE, + IoStatus, + Device)) + { + /* It's not, fail */ + goto FailAndCleanup; + } + } + + /* If we are going to modify the filesize, save the old fs in case the operation fails */ + if (NewSize.QuadPart > FcbHeader->FileSize.QuadPart) + { + FileSizeModified = TRUE; + OldFileSize.QuadPart = FcbHeader->FileSize.QuadPart; + OldValidDataLength.QuadPart = FcbHeader->ValidDataLength.QuadPart; + + /* If the high part of the filesize is going to change, grab the Paging IoResouce */ + if (NewSize.HighPart != FcbHeader->FileSize.HighPart && FcbHeader->PagingIoResource) + { + ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE); + FcbHeader->FileSize.QuadPart = NewSize.QuadPart; + ExReleaseResourceLite(FcbHeader->PagingIoResource); + } else { + FcbHeader->FileSize.QuadPart = NewSize.QuadPart; + } + } + + + /* Nagar p.544 */ + /* Set ourselves as top component */ + PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP; + _SEH2_TRY + { + /* Check if there is a gap between the end of the file and the offset + If yes, then we have to zero the data + */ + if (Offset.QuadPart > FcbHeader->ValidDataLength.QuadPart) { + Result = CcZeroData(FileObject,&FcbHeader->ValidDataLength,&Offset,TRUE); + if (Result) + { + CcPrepareMdlWrite(FileObject,&Offset,Length,MdlChain,IoStatus); + } + } else { + CcPrepareMdlWrite(FileObject,&Offset,Length,MdlChain,IoStatus); + } + + }_SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) + { + Result = FALSE; + } _SEH2_END; + + /* Reset the top component */ + PsGetCurrentThread()->TopLevelIrp = 0; + + /* Did the operation suceeded */ + if (Result) { + /* Check if we need to update the filesize */ + if (NewSize.QuadPart > FcbHeader->ValidDataLength.QuadPart) { + if (NewSize.HighPart != FcbHeader->ValidDataLength.HighPart && FcbHeader->PagingIoResource) { + ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE); + FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart; + ExReleaseResourceLite(FcbHeader->PagingIoResource); + } else { + FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart; + } + } + + /* Flag the file as modified */ + FileObject->Flags |= FO_FILE_MODIFIED; + /* Check if the filesize has changed */ + if (FileSizeModified) { + /* Update the file sizes */ + ((SHARED_CACHE_MAP*) FileObject->SectionObjectPointer->SharedCacheMap)->FileSize.QuadPart = NewSize.QuadPart; + FileObject->Flags |= FO_FILE_SIZE_CHANGED; + } + + } + else + { + /* The operation did not succeed + Reset the file size to what it should be + */ + if (FileSizeModified) { + if (FcbHeader->PagingIoResource) { + ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE); + FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart; + FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart; + ExReleaseResourceLite(FcbHeader->PagingIoResource); + }else{ + FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart; + FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart; + } + } + } + + goto Cleanup; + + } + else + { + goto FailAndCleanup; + } + + +FailAndCleanup: + + ExReleaseResourceLite(FcbHeader->Resource); + FsRtlExitFileSystem(); + return FALSE; + +Cleanup: + + ExReleaseResourceLite(FcbHeader->Resource); + FsRtlExitFileSystem(); + return Result; + +} + +/* +* @implemented +*/ +VOID +NTAPI +FsRtlAcquireFileExclusive(IN PFILE_OBJECT FileObject) +{ + /* + PAGED_CODE(); + FsRtlAcquireFileExclusiveCommon(FileObject,0,0); + */ + KeBugCheck(FILE_SYSTEM); +} + +/* +* @implemented +*/ +VOID +NTAPI +FsRtlReleaseFile(IN PFILE_OBJECT FileObject) +{ + + KeBugCheck(FILE_SYSTEM); +} + +/*++ + * @name FsRtlRegisterFileSystemFilterCallbacks + * @unimplemented + * + * FILLME + * + * @param FilterDriverObject + * FILLME + * + * @param Callbacks + * FILLME + * + * @return None + * + * @remarks None + * + *--*/ +NTSTATUS +NTAPI +FsRtlRegisterFileSystemFilterCallbacks(IN PDRIVER_OBJECT FilterDriverObject, + IN PFS_FILTER_CALLBACKS Callbacks) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + Propchange: trunk/reactos/ntoskrnl/fsrtl/fastio.c ------------------------------------------------------------------------------ svn:eol-style = native
15 years, 11 months
1
0
0
0
[fireball] 38880: - SVN maintenance.
by fireball@svn.reactos.org
Author: fireball Date: Sun Jan 18 04:22:07 2009 New Revision: 38880 URL:
http://svn.reactos.org/svn/reactos?rev=38880&view=rev
Log: - SVN maintenance. Modified: trunk/reactos/base/applications/winhlp32/callback.c (contents, props changed) trunk/reactos/base/applications/winhlp32/hlpfile.c (contents, props changed) trunk/reactos/base/applications/winhlp32/hlpfile.h (contents, props changed) trunk/reactos/base/applications/winhlp32/lex.yy.c (contents, props changed) trunk/reactos/base/applications/winhlp32/macro.c (contents, props changed) trunk/reactos/base/applications/winhlp32/macro.h (contents, props changed) trunk/reactos/base/applications/winhlp32/macro.lex.l (contents, props changed) trunk/reactos/base/applications/winhlp32/string.c (contents, props changed) trunk/reactos/base/applications/winhlp32/winhelp.c (contents, props changed) trunk/reactos/base/applications/winhlp32/winhelp.h (contents, props changed) trunk/reactos/base/applications/winhlp32/winhelp_res.h (contents, props changed) [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/base/applications/winhlp32/callback.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
Modified: trunk/reactos/base/applications/winhlp32/hlpfile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
Modified: trunk/reactos/base/applications/winhlp32/hlpfile.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
Modified: trunk/reactos/base/applications/winhlp32/lex.yy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
Modified: trunk/reactos/base/applications/winhlp32/macro.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
Modified: trunk/reactos/base/applications/winhlp32/macro.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
Modified: trunk/reactos/base/applications/winhlp32/macro.lex.l URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
Modified: trunk/reactos/base/applications/winhlp32/string.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
Modified: trunk/reactos/base/applications/winhlp32/winhelp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
Modified: trunk/reactos/base/applications/winhlp32/winhelp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
Modified: trunk/reactos/base/applications/winhlp32/winhelp_res.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
15 years, 11 months
1
0
0
0
[cwittich] 38879: fix kernel32 console winetest crash
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Jan 18 04:06:34 2009 New Revision: 38879 URL:
http://svn.reactos.org/svn/reactos?rev=38879&view=rev
Log: fix kernel32 console winetest crash Modified: trunk/reactos/dll/win32/kernel32/misc/console.c Modified: trunk/reactos/dll/win32/kernel32/misc/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/co…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/console.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/console.c [iso-8859-1] Sun Jan 18 04:06:34 2009 @@ -3763,6 +3763,7 @@ BOOL WINAPI SetConsoleInputExeNameW(LPCWSTR lpInputExeName) { + NTSTATUS Status = STATUS_SUCCESS; int lenName = lstrlenW(lpInputExeName); if(lenName < 1 || @@ -3776,14 +3777,28 @@ RtlEnterCriticalSection(&ConsoleLock); _SEH2_TRY { - RtlCopyMemory(InputExeName, lpInputExeName, lenName * sizeof(WCHAR)); - InputExeName[lenName] = L'\0'; + _SEH2_TRY + { + RtlCopyMemory(InputExeName, lpInputExeName, lenName * sizeof(WCHAR)); + InputExeName[lenName] = L'\0'; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; } _SEH2_FINALLY { RtlLeaveCriticalSection(&ConsoleLock); } _SEH2_END; + + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return FALSE; + } return TRUE; } @@ -3836,26 +3851,40 @@ DWORD WINAPI GetConsoleInputExeNameW(DWORD nBufferLength, LPWSTR lpBuffer) { + NTSTATUS Status = STATUS_SUCCESS; int lenName = 0; RtlEnterCriticalSection(&ConsoleLock); - _SEH2_TRY { - lenName = lstrlenW(InputExeName); - if(lenName >= (int)nBufferLength) + _SEH2_TRY { - /* buffer is not large enough, return the required size */ - SetLastError(ERROR_BUFFER_OVERFLOW); - lenName += 1; + lenName = lstrlenW(InputExeName); + if(lenName >= (int)nBufferLength) + { + /* buffer is not large enough, return the required size */ + SetLastError(ERROR_BUFFER_OVERFLOW); + lenName += 1; + } + RtlCopyMemory(lpBuffer, InputExeName, (lenName + 1) * sizeof(WCHAR)); } - RtlCopyMemory(lpBuffer, InputExeName, (lenName + 1) * sizeof(WCHAR)); + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; } _SEH2_FINALLY { RtlLeaveCriticalSection(&ConsoleLock); } _SEH2_END; + + if (!NT_SUCCESS(Status)) + { + SetLastError(ERROR_BUFFER_OVERFLOW); + return lenName + 1; + } return lenName; }
15 years, 11 months
1
0
0
0
[sserapion] 38878: Re: 38126 - Sorry, but this hack cannot go away at this time.
by sserapion@svn.reactos.org
Author: sserapion Date: Sun Jan 18 04:03:47 2009 New Revision: 38878 URL:
http://svn.reactos.org/svn/reactos?rev=38878&view=rev
Log: Re: 38126 - Sorry, but this hack cannot go away at this time. Modified: branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild Modified: branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/React…
============================================================================== --- branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild [iso-8859-1] Sun Jan 18 04:03:47 2009 @@ -235,7 +235,80 @@ </directory> <directory name="lib"> - <xi:include href="lib/lib.rbuild" /> + <directory name="3rdparty"> + <directory name="adns"> + <xi:include href="lib/3rdparty/adns/adns.rbuild" /> + </directory> + <directory name="bzip2"> + <xi:include href="lib/3rdparty/bzip2/bzip2.rbuild" /> + </directory> + <directory name="expat"> + <xi:include href="lib/3rdparty/expat/expat.rbuild" /> + </directory> + <directory name="icu4ros"> + <xi:include href="lib/3rdparty/icu4ros/icu4ros.rbuild" /> + </directory> + <directory name="libwine"> + <xi:include href="lib/3rdparty/libwine/libwine.rbuild" /> + </directory> + <directory name="libxml2"> + <xi:include href="lib/3rdparty/libxml2/libxml2.rbuild" /> + </directory> + <!--directory name="mingw"> + <xi:include href="lib/3rdparty/mingw/mingw.rbuild" /> + </directory--> + <directory name="zlib"> + <xi:include href="lib/3rdparty/zlib/zlib.rbuild" /> + </directory> + </directory> + <directory name="sdk"> + <xi:include href="lib/sdk/sdk.rbuild" /> + </directory> + <directory name="cmlib"> + <xi:include href="lib/cmlib/cmlib.rbuild" /> + </directory> + <directory name="debugsup"> + <xi:include href="lib/debugsup/debugsup.rbuild" /> + </directory> + <directory name="drivers"> + <xi:include href="lib/drivers/directory.rbuild" /> + </directory> + <directory name="epsapi"> + <xi:include href="lib/epsapi/epsapi.rbuild" /> + </directory> + <directory name="fslib"> + <xi:include href="lib/fslib/directory.rbuild" /> + </directory> + <directory name="host"> + <xi:include href="lib/host/directory.rbuild" /> + </directory> + <directory name="inflib"> + <xi:include href="lib/inflib/inflib.rbuild" /> + </directory> + <directory name="nls"> + <xi:include href="lib/nls/nls.rbuild" /> + </directory> + <directory name="ntdllsys"> + <xi:include href="lib/ntdllsys/ntdllsys.rbuild" /> + </directory> + <directory name="pseh"> + <xi:include href="lib/pseh/pseh.rbuild" /> + </directory> + <directory name="recyclebin"> + <xi:include href="lib/recyclebin/recyclebin.rbuild" /> + </directory> + <directory name="rossym"> + <xi:include href="lib/rossym/rossym.rbuild" /> + </directory> + <directory name="rtl"> + <xi:include href="lib/rtl/rtl.rbuild" /> + </directory> + <directory name="smlib"> + <xi:include href="lib/smlib/smlib.rbuild" /> + </directory> + <directory name="win32ksys"> + <xi:include href="lib/win32ksys/win32ksys.rbuild" /> + </directory> </directory> <directory name="media">
15 years, 11 months
1
0
0
0
[sserapion] 38877: Remove unnecessary dependency, fix build a bit.
by sserapion@svn.reactos.org
Author: sserapion Date: Sun Jan 18 03:44:36 2009 New Revision: 38877 URL:
http://svn.reactos.org/svn/reactos?rev=38877&view=rev
Log: Remove unnecessary dependency, fix build a bit. Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/mingw.rbuild Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/mingw.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/mingw.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/mingw.rbuild [iso-8859-1] Sun Jan 18 03:44:36 2009 @@ -4,6 +4,7 @@ <module name="mingw_common" type="staticlibrary" isstartuplib="true" underscoresymbols="true" crt="dll"> <importlibrary definition="moldname-msvcrt.def" dllname="msvcrt.dll" /> <include base="mingw_common">include</include> + <library>kernel32</library> <file>_newmode.c</file> <file>_wgetopt.c</file> <file>atonexit.c</file> @@ -30,14 +31,12 @@ </module> <module name="mingw_main" type="staticlibrary" isstartuplib="true" crt="dll"> <include base="mingw_common">include</include> - <library>mingw_common</library> <file>crt0_c.c</file> <file>crtexe.c</file> <file>dllargv.c</file> </module> <module name="mingw_wmain" type="staticlibrary" isstartuplib="true" unicode="yes" crt="dll"> <include base="mingw_common">include</include> - <library>mingw_common</library> <define name="WPRFLAG"/> <file>crt0_w.c</file> <file>crtexe.c</file> @@ -45,7 +44,6 @@ </module> <module name="mingw_dllmain" type="staticlibrary" isstartuplib="true" crt="dll"> <include base="mingw_common">include</include> - <library>mingw_common</library> <file>dllargv.c</file> <file>crtdll.c</file> </module>
15 years, 11 months
1
0
0
0
[cwittich] 38876: sync msi_winetest with wine 1.1.13
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Jan 18 03:03:44 2009 New Revision: 38876 URL:
http://svn.reactos.org/svn/reactos?rev=38876&view=rev
Log: sync msi_winetest with wine 1.1.13 Modified: trunk/rostests/winetests/msi/automation.c trunk/rostests/winetests/msi/db.c trunk/rostests/winetests/msi/format.c trunk/rostests/winetests/msi/install.c trunk/rostests/winetests/msi/msi.c trunk/rostests/winetests/msi/package.c trunk/rostests/winetests/msi/source.c Modified: trunk/rostests/winetests/msi/automation.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/automation.…
============================================================================== --- trunk/rostests/winetests/msi/automation.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/automation.c [iso-8859-1] Sun Jan 18 03:03:44 2009 @@ -594,7 +594,7 @@ ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); /* Test getting ID of a function name that does exist */ - name = (WCHAR *)szOpenPackage; + name = szOpenPackage; hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); @@ -638,7 +638,7 @@ ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); /* Test invoking a read-only property as DISPATCH_PROPERTYPUT or as a DISPATCH_METHOD */ - name = (WCHAR *)szProductState; + name = szProductState; hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); @@ -723,7 +723,7 @@ VariantInit(&vararg[2]); V_VT(&vararg[2]) = VT_I4; - V_I4(&vararg[2]) = (int)hkey; + V_I4(&vararg[2]) = (INT_PTR)hkey; VariantInit(&vararg[1]); V_VT(&vararg[1]) = VT_BSTR; V_BSTR(&vararg[1]) = SysAllocString(szKey); @@ -2401,7 +2401,7 @@ } /* Installer::OpenDatabase */ - hr = Installer_OpenDatabase(szPath, (int)MSIDBOPEN_TRANSACT, &pDatabase); + hr = Installer_OpenDatabase(szPath, (INT_PTR)MSIDBOPEN_TRANSACT, &pDatabase); ok(hr == S_OK, "Installer_OpenDatabase failed, hresult 0x%08x\n", hr); if (hr == S_OK) { Modified: trunk/rostests/winetests/msi/db.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/db.c?rev=38…
============================================================================== --- trunk/rostests/winetests/msi/db.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/db.c [iso-8859-1] Sun Jan 18 03:03:44 2009 @@ -2347,7 +2347,7 @@ CHAR szPackage[10]; MSIHANDLE hPackage; - sprintf(szPackage,"#%li",hdb); + sprintf(szPackage,"#%i",hdb); res = MsiOpenPackage(szPackage,&hPackage); if (res != ERROR_SUCCESS) return 0; @@ -5742,14 +5742,13 @@ static void read_file_data(LPCSTR filename, LPSTR buffer) { - OFSTRUCT ofs; - HFILE file; + HANDLE file; DWORD read; - file = OpenFile(filename, &ofs, OF_READ); + file = CreateFileA( filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL ); ZeroMemory(buffer, MAX_PATH); - ReadFile((HANDLE)file, buffer, MAX_PATH, &read, NULL); - CloseHandle((HANDLE)file); + ReadFile(file, buffer, MAX_PATH, &read, NULL); + CloseHandle(file); } static void test_forcecodepage(void) @@ -6175,7 +6174,7 @@ r = add_custom_action_entry(hdb, "'SetProp', 51, 'MYPROP', 'grape'"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - sprintf(package, "#%li", hdb); + sprintf(package, "#%i", hdb); r = MsiOpenPackage(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); @@ -6234,7 +6233,7 @@ r = add_custom_action_entry(hdb, "'SetProp', 51, 'MYPROP', 'grape'"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - sprintf(package, "#%li", hdb); + sprintf(package, "#%i", hdb); r = MsiOpenPackage(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); Modified: trunk/rostests/winetests/msi/format.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/format.c?re…
============================================================================== --- trunk/rostests/winetests/msi/format.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/format.c [iso-8859-1] Sun Jan 18 03:03:44 2009 @@ -228,7 +228,7 @@ CHAR szPackage[10]; MSIHANDLE hPackage; - sprintf(szPackage,"#%li",hdb); + sprintf(szPackage,"#%i",hdb); res = MsiOpenPackage(szPackage,&hPackage); ok( res == ERROR_SUCCESS , "Failed to open package\n" ); @@ -303,7 +303,7 @@ res = MsiCloseHandle( suminfo); ok( res == ERROR_SUCCESS , "Failed to close suminfo\n" ); - sprintf(szPackage,"#%li",hdb); + sprintf(szPackage,"#%i",hdb); res = MsiOpenPackage(szPackage,&hPackage); ok( res == ERROR_SUCCESS , "Failed to open package\n" ); Modified: trunk/rostests/winetests/msi/install.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/install.c?r…
============================================================================== --- trunk/rostests/winetests/msi/install.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/install.c [iso-8859-1] Sun Jan 18 03:03:44 2009 @@ -1211,34 +1211,34 @@ /* the FCI callbacks */ -static void *mem_alloc(ULONG cb) +static void * CDECL mem_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void mem_free(void *memory) +static void CDECL mem_free(void *memory) { HeapFree(GetProcessHeap(), 0, memory); } -static BOOL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) +static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) { sprintf(pccab->szCab, pv, pccab->iCab); return TRUE; } -static long progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) +static LONG CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) { return 0; } -static int file_placed(PCCAB pccab, char *pszFile, long cbFile, - BOOL fContinuation, void *pv) +static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile, + BOOL fContinuation, void *pv) { return 0; } -static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) +static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) { HANDLE handle; DWORD dwAccess = 0; @@ -1262,7 +1262,7 @@ return (INT_PTR)handle; } -static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwRead; @@ -1274,7 +1274,7 @@ return dwRead; } -static UINT fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwWritten; @@ -1286,7 +1286,7 @@ return dwWritten; } -static int fci_close(INT_PTR hf, int *err, void *pv) +static int CDECL fci_close(INT_PTR hf, int *err, void *pv) { HANDLE handle = (HANDLE)hf; ok(CloseHandle(handle), "Failed to CloseHandle\n"); @@ -1294,7 +1294,7 @@ return 0; } -static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) +static LONG CDECL fci_seek(INT_PTR hf, LONG dist, int seektype, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD ret; @@ -1305,7 +1305,7 @@ return ret; } -static int fci_delete(char *pszFile, int *err, void *pv) +static int CDECL fci_delete(char *pszFile, int *err, void *pv) { BOOL ret = DeleteFileA(pszFile); ok(ret, "Failed to DeleteFile %s\n", pszFile); @@ -1362,7 +1362,7 @@ OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); size = sizeof(buf); - GetTokenInformation(token, TokenUser, (void *)buf, size, &size); + GetTokenInformation(token, TokenUser, buf, size, &size); user = (PTOKEN_USER)buf; pConvertSidToStringSidA(user->User.Sid, usersid); } @@ -1378,7 +1378,7 @@ return (r == ERROR_SUCCESS ) && !strcmp(val, buffer); } -static BOOL get_temp_file(char *pszTempName, int cbTempName, void *pv) +static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv) { LPSTR tempname; @@ -1397,8 +1397,8 @@ return FALSE; } -static INT_PTR get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, - USHORT *pattribs, int *err, void *pv) +static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, + USHORT *pattribs, int *err, void *pv) { BY_HANDLE_FILE_INFORMATION finfo; FILETIME filetime; Modified: trunk/rostests/winetests/msi/msi.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/msi.c?rev=3…
============================================================================== --- trunk/rostests/winetests/msi/msi.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/msi.c [iso-8859-1] Sun Jan 18 03:03:44 2009 @@ -505,7 +505,7 @@ hr = CoCreateGuid(&guid); ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - size = StringFromGUID2(&guid, (LPOLESTR)guidW, MAX_PATH); + size = StringFromGUID2(&guid, guidW, MAX_PATH); ok(size == 39, "Expected 39, got %d\n", hr); WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL); @@ -522,7 +522,7 @@ OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); size = sizeof(buf); - GetTokenInformation(token, TokenUser, (void *)buf, size, &size); + GetTokenInformation(token, TokenUser, buf, size, &size); user = (PTOKEN_USER)buf; pConvertSidToStringSidA(user->User.Sid, usersid); } @@ -794,7 +794,7 @@ hr = CoCreateGuid(&guid); ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - size = StringFromGUID2(&guid, (LPOLESTR)guidW, MAX_PATH); + size = StringFromGUID2(&guid, guidW, MAX_PATH); ok(size == 39, "Expected 39, got %d\n", hr); WideCharToMultiByte(CP_ACP, 0, guidW, size, component, MAX_PATH, NULL, NULL); @@ -1760,7 +1760,6 @@ RegDeleteKeyA(compkey, ""); RegCloseKey(prodkey); RegCloseKey(compkey); - RegCloseKey(installprop); DeleteFileA("C:\\imapath"); lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); @@ -1919,9 +1918,6 @@ r = MsiGetProductCodeA(component, product); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); RegDeleteKeyA(prodkey, ""); RegCloseKey(prodkey); @@ -7368,9 +7364,12 @@ /* LocalPackage has just the package name */ hprod = 0xdeadbeef; r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_INSTALL_PACKAGE_OPEN_FAILED, - "Expected ERROR_INSTALL_PACKAGE_OPEN_FAILED, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); + ok(r == ERROR_INSTALL_PACKAGE_OPEN_FAILED || r == ERROR_SUCCESS, + "Expected ERROR_INSTALL_PACKAGE_OPEN_FAILED or ERROR_SUCCESS, got %d\n", r); + if (r == ERROR_SUCCESS) + MsiCloseHandle(hprod); + else + ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); lstrcpyA(val, path); lstrcatA(val, "\\winetest.msi"); Modified: trunk/rostests/winetests/msi/package.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/package.c?r…
============================================================================== --- trunk/rostests/winetests/msi/package.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/package.c [iso-8859-1] Sun Jan 18 03:03:44 2009 @@ -48,7 +48,7 @@ OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); size = sizeof(buf); - GetTokenInformation(token, TokenUser, (void *)buf, size, &size); + GetTokenInformation(token, TokenUser, buf, size, &size); user = (PTOKEN_USER)buf; pConvertSidToStringSidA(user->User.Sid, usersid); } @@ -160,7 +160,7 @@ hr = CoCreateGuid(&guid); ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - size = StringFromGUID2(&guid, (LPOLESTR)guidW, MAX_PATH); + size = StringFromGUID2(&guid, guidW, MAX_PATH); ok(size == 39, "Expected 39, got %d\n", hr); WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL); @@ -665,7 +665,7 @@ CHAR szPackage[10]; MSIHANDLE hPackage; - sprintf(szPackage,"#%li",hdb); + sprintf(szPackage,"#%i",hdb); res = MsiOpenPackage(szPackage,&hPackage); if (res != ERROR_SUCCESS) return 0; @@ -2116,7 +2116,7 @@ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); /* database exists, but is emtpy */ - sprintf(name, "#%ld", hdb); + sprintf(name, "#%d", hdb); r = MsiOpenPackage(name, &hpack); ok(r == ERROR_INSTALL_PACKAGE_INVALID, "Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r); @@ -2134,7 +2134,7 @@ ok(r == ERROR_SUCCESS, "failed to create InstallExecuteSequence table\n"); /* a few key tables exist */ - sprintf(name, "#%ld", hdb); + sprintf(name, "#%d", hdb); r = MsiOpenPackage(name, &hpack); ok(r == ERROR_INSTALL_PACKAGE_INVALID, "Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r); @@ -2146,7 +2146,7 @@ r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - sprintf(name, "#%ld", hdb); + sprintf(name, "#%d", hdb); /* The following summary information props must exist: * - PID_REVNUMBER @@ -8888,7 +8888,7 @@ r = add_directory_entry(hdb, "'TARGETDIR', '', 'SourceDir'"); ok(r == S_OK, "failed\n"); - sprintf(package, "#%li", hdb); + sprintf(package, "#%i", hdb); r = MsiOpenPackage(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); @@ -8997,7 +8997,7 @@ MsiCloseHandle(hpkg); /* reset the package state */ - sprintf(package, "#%li", hdb); + sprintf(package, "#%i", hdb); r = MsiOpenPackage(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); @@ -9585,6 +9585,13 @@ lstrcatA(keypath, prod_squashed); res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); + if (res == ERROR_ACCESS_DENIED) + { + skip("Not enough rights to perform tests\n"); + RegDeleteKeyA(prodkey, ""); + RegCloseKey(prodkey); + return; + } ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); res = RegCreateKeyA(userkey, "InstallProperties", &props); Modified: trunk/rostests/winetests/msi/source.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/source.c?re…
============================================================================== --- trunk/rostests/winetests/msi/source.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/source.c [iso-8859-1] Sun Jan 18 03:03:44 2009 @@ -114,7 +114,7 @@ hr = CoCreateGuid(&guid); ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - size = StringFromGUID2(&guid, (LPOLESTR)guidW, MAX_PATH); + size = StringFromGUID2(&guid, guidW, MAX_PATH); ok(size == 39, "Expected 39, got %d\n", hr); WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL); @@ -136,7 +136,7 @@ if (!rc && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) return 0; size = sizeof(buf); - GetTokenInformation(token, TokenUser, (void *)buf, size, &size); + GetTokenInformation(token, TokenUser, buf, size, &size); user = (PTOKEN_USER)buf; pConvertSidToStringSidA(user->User.Sid, usersid); return 1;
15 years, 11 months
1
0
0
0
[cwittich] 38875: sync msacm32_winetest with wine 1.1.13
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Jan 18 02:59:27 2009 New Revision: 38875 URL:
http://svn.reactos.org/svn/reactos?rev=38875&view=rev
Log: sync msacm32_winetest with wine 1.1.13 Modified: trunk/rostests/winetests/msacm32/msacm.c Modified: trunk/rostests/winetests/msacm32/msacm.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msacm32/msacm.c…
============================================================================== --- trunk/rostests/winetests/msacm32/msacm.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msacm32/msacm.c [iso-8859-1] Sun Jan 18 02:59:27 2009 @@ -29,8 +29,8 @@ #include "winnls.h" #include "mmsystem.h" #define NOBITMAP -#include "wine/mmreg.h" -#include "wine/msacm.h" +#include "mmreg.h" +#include "msacm.h" static BOOL CALLBACK FormatTagEnumProc(HACMDRIVERID hadid, PACMFORMATTAGDETAILS paftd, @@ -59,9 +59,9 @@ DWORD fdwSupport) { MMRESULT rc; - ACMDRIVERDETAILSA dd; + ACMDRIVERDETAILS dd; HACMDRIVER had; - + DWORD dwDriverPriority; DWORD dwDriverSupport; @@ -275,9 +275,9 @@ "acmMetrics(): rc = %08x, should be %08x\n", rc, MMSYSERR_NOERROR); if (rc == MMSYSERR_NOERROR) { - ACMFORMATDETAILSA fd; + ACMFORMATDETAILS fd; WAVEFORMATEX * pwfx; - ACMFORMATTAGDETAILSA aftd; + ACMFORMATTAGDETAILS aftd; /* try bad pointer */ rc = acmFormatEnum(had, 0, FormatEnumProc, 0, 0);
15 years, 11 months
1
0
0
0
[cwittich] 38874: sync mapi32_winetest with wine 1.1.13
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Jan 18 02:56:17 2009 New Revision: 38874 URL:
http://svn.reactos.org/svn/reactos?rev=38874&view=rev
Log: sync mapi32_winetest with wine 1.1.13 Modified: trunk/rostests/winetests/mapi32/imalloc.c trunk/rostests/winetests/mapi32/prop.c Modified: trunk/rostests/winetests/mapi32/imalloc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mapi32/imalloc.…
============================================================================== --- trunk/rostests/winetests/mapi32/imalloc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mapi32/imalloc.c [iso-8859-1] Sun Jan 18 02:56:17 2009 @@ -64,8 +64,7 @@ /* Prove that native mapi uses LocalAlloc/LocalFree */ lpMem = IMalloc_Alloc(lpMalloc, 61); - ok (lpMem && IMalloc_GetSize(lpMalloc, lpMem) == - LocalSize((HANDLE)lpMem), + ok (lpMem && IMalloc_GetSize(lpMalloc, lpMem) == LocalSize(lpMem), "Expected non-null, same size, got %p, %s size\n", lpMem, lpMem ? "different" : "same"); Modified: trunk/rostests/winetests/mapi32/prop.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mapi32/prop.c?r…
============================================================================== --- trunk/rostests/winetests/mapi32/prop.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mapi32/prop.c [iso-8859-1] Sun Jan 18 02:56:17 2009 @@ -93,11 +93,11 @@ if (!pPropCopyMore) return; - scode = pMAPIAllocateBuffer(sizeof(LPSPropValue), (LPVOID *)lpDest); + scode = pMAPIAllocateBuffer(sizeof(LPSPropValue), lpDest); if (FAILED(scode)) return; - scode = pMAPIAllocateMore(sizeof(LPSPropValue), lpDest, (LPVOID *)lpSrc); + scode = pMAPIAllocateMore(sizeof(LPSPropValue), lpDest, lpSrc); if (FAILED(scode)) return;
15 years, 11 months
1
0
0
0
[hyperion] 38873: Warning killing commit modified tests/polytest/polytest.cpp Use %ld to print LONGs, not %d modified tests/vmtest/vmtest.c Don't do pointer arithmetics on PVOID Everything else Compile winetests with __ROS_LONG64__
by hyperion@svn.reactos.org
Author: hyperion Date: Sun Jan 18 00:31:44 2009 New Revision: 38873 URL:
http://svn.reactos.org/svn/reactos?rev=38873&view=rev
Log: Warning killing commit modified tests/polytest/polytest.cpp Use %ld to print LONGs, not %d modified tests/vmtest/vmtest.c Don't do pointer arithmetics on PVOID Everything else Compile winetests with __ROS_LONG64__ Modified: trunk/rostests/tests/polytest/polytest.cpp trunk/rostests/tests/vmtest/vmtest.c trunk/rostests/winetests/GUI/GUI.rbuild trunk/rostests/winetests/advapi32/advapi32.rbuild trunk/rostests/winetests/advpack/advpack.rbuild trunk/rostests/winetests/browseui/browseui.rbuild trunk/rostests/winetests/cabinet/cabinet.rbuild trunk/rostests/winetests/comcat/comcat.rbuild trunk/rostests/winetests/comctl32/comctl32.rbuild trunk/rostests/winetests/comdlg32/comdlg32.rbuild trunk/rostests/winetests/gdi32/gdi32.rbuild trunk/rostests/winetests/gdiplus/gdiplus.rbuild trunk/rostests/winetests/hlink/hlink.rbuild trunk/rostests/winetests/icmp/icmp.rbuild trunk/rostests/winetests/imm32/imm32.rbuild trunk/rostests/winetests/kernel32/kernel32.rbuild trunk/rostests/winetests/lz32/lz32.rbuild trunk/rostests/winetests/mapi32/mapi32.rbuild trunk/rostests/winetests/mlang/mlang.rbuild trunk/rostests/winetests/msacm32/msacm32.rbuild trunk/rostests/winetests/mshtml/mshtml.rbuild trunk/rostests/winetests/msi/msi.rbuild trunk/rostests/winetests/mstask/mstask.rbuild trunk/rostests/winetests/msvcrt/msvcrt.rbuild trunk/rostests/winetests/netapi32/netapi32.rbuild trunk/rostests/winetests/ntdll/ntdll.rbuild trunk/rostests/winetests/odbccp32/odbccp32.rbuild trunk/rostests/winetests/ole32/ole32.rbuild trunk/rostests/winetests/oleaut32/oleaut32.rbuild trunk/rostests/winetests/powrprof/powrprof.rbuild trunk/rostests/winetests/psapi/psapi.rbuild trunk/rostests/winetests/riched20/riched20.rbuild trunk/rostests/winetests/riched32/riched32.rbuild trunk/rostests/winetests/rpcrt4/rpcrt4.rbuild trunk/rostests/winetests/rsabase/rsabase.rbuild trunk/rostests/winetests/rsaenh/rsaenh.rbuild trunk/rostests/winetests/schannel/schannel.rbuild trunk/rostests/winetests/setupapi/setupapi.rbuild trunk/rostests/winetests/shell32/shell32.rbuild trunk/rostests/winetests/shlwapi/shlwapi.rbuild trunk/rostests/winetests/urlmon/urlmon.rbuild trunk/rostests/winetests/user32/user32.rbuild trunk/rostests/winetests/usp10/usp10.rbuild trunk/rostests/winetests/uxtheme/uxtheme.rbuild trunk/rostests/winetests/version/version.rbuild trunk/rostests/winetests/winetest/winetest.rbuild trunk/rostests/winetests/winhttp/winhttp.rbuild trunk/rostests/winetests/wininet/wininet.rbuild Modified: trunk/rostests/tests/polytest/polytest.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/polytest/polytest.c…
============================================================================== --- trunk/rostests/tests/polytest/polytest.cpp [iso-8859-1] (original) +++ trunk/rostests/tests/polytest/polytest.cpp [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -794,7 +794,7 @@ To = Points[CurrentPoint + 1]; } - DPRINT1("Polygon Making line from (%d,%d) to (%d,%d)\n", From.x, From.y, To.x, To.y ); + DPRINT1("Polygon Making line from (%ld,%ld) to (%ld,%ld)\n", From.x, From.y, To.x, To.y ); IntEngLineTo(SurfObj, dc.CombinedClip, OutBrushObj, @@ -863,6 +863,6 @@ printf("\n"); } DPRINT1("Done!\n"); - (void)getch(); + (void)_getch(); } /* EOF */ Modified: trunk/rostests/tests/vmtest/vmtest.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/vmtest/vmtest.c?rev…
============================================================================== --- trunk/rostests/tests/vmtest/vmtest.c [iso-8859-1] (original) +++ trunk/rostests/tests/vmtest/vmtest.c [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -3,7 +3,7 @@ int main() { - PVOID Base; + PBYTE Base; PVOID Ret; Base = VirtualAlloc(NULL, Modified: trunk/rostests/winetests/GUI/GUI.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/GUI/GUI.rbuild?…
============================================================================== --- trunk/rostests/winetests/GUI/GUI.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/GUI/GUI.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <include base="GUI">.</include> <define name="_WIN32_IE">0x600</define> <define name="_WIN32_WINNT">0x501</define> + <define name="__ROS_LONG64__" /> <library>gdi32</library> <library>kernel32</library> <library>user32</library> Modified: trunk/rostests/winetests/advapi32/advapi32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/advapi…
============================================================================== --- trunk/rostests/winetests/advapi32/advapi32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/advapi32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -5,6 +5,7 @@ <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="advapi32_winetest">.</include> <define name="__USE_W32API" /> + <define name="__ROS_LONG64__" /> <library>advapi32</library> <library>kernel32</library> <library>ntdll</library> Modified: trunk/rostests/winetests/advpack/advpack.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advpack/advpack…
============================================================================== --- trunk/rostests/winetests/advpack/advpack.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/advpack/advpack.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="advpack_winetest" type="win32cui" installbase="bin" installname="advpack_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="advpack_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>advpack.c</file> <file>files.c</file> <file>install.c</file> Modified: trunk/rostests/winetests/browseui/browseui.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/browseui/browse…
============================================================================== --- trunk/rostests/winetests/browseui/browseui.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/browseui/browseui.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="browseui_winetest" type="win32cui" installbase="bin" installname="browseui_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="browseui_winetest">.</include> + <define name="__ROS_LONG64__" /> <library>wine</library> <library>ole32</library> <library>user32</library> Modified: trunk/rostests/winetests/cabinet/cabinet.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/cabinet/cabinet…
============================================================================== --- trunk/rostests/winetests/cabinet/cabinet.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/cabinet/cabinet.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="cabinet_winetest" type="win32cui" installbase="bin" installname="cabinet_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="cabinet_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>extract.c</file> <file>fdi.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/comcat/comcat.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comcat/comcat.r…
============================================================================== --- trunk/rostests/winetests/comcat/comcat.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/comcat/comcat.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="comcat_winetest" type="win32cui" installbase="bin" installname="comcat_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="comcat_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>comcat.c</file> <file>testlist.c</file> <library>wine</library> Modified: trunk/rostests/winetests/comctl32/comctl32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/comctl…
============================================================================== --- trunk/rostests/winetests/comctl32/comctl32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/comctl32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="comctl32_winetest" type="win32cui" installbase="bin" installname="comctl32_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="comctl32_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>comboex.c</file> <file>datetime.c</file> <file>dpa.c</file> Modified: trunk/rostests/winetests/comdlg32/comdlg32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comdlg32/comdlg…
============================================================================== --- trunk/rostests/winetests/comdlg32/comdlg32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/comdlg32/comdlg32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="comdlg32_winetest" type="win32cui" installbase="bin" installname="comdlg32_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="comdlg32_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>filedlg.c</file> <file>printdlg.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/gdi32/gdi32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdi32/gdi32.rbu…
============================================================================== --- trunk/rostests/winetests/gdi32/gdi32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/gdi32/gdi32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="gdi32_winetest" type="win32cui" installbase="bin" installname="gdi32_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="gdi32_winetest">.</include> + <define name="__ROS_LONG64__" /> <define name="__USE_W32API" /> <library>ntdll</library> <library>gdi32</library> Modified: trunk/rostests/winetests/gdiplus/gdiplus.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/gdiplus…
============================================================================== --- trunk/rostests/winetests/gdiplus/gdiplus.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/gdiplus/gdiplus.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="gdiplus_winetest" type="win32cui" installbase="bin" installname="gdiplus_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="gdiplus_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>brush.c</file> <file>customlinecap.c</file> <file>font.c</file> Modified: trunk/rostests/winetests/hlink/hlink.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/hlink/hlink.rbu…
============================================================================== --- trunk/rostests/winetests/hlink/hlink.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/hlink/hlink.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="hlink_winetest" type="win32cui" installbase="bin" installname="hlink_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="hlink_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>hlink.c</file> <file>testlist.c</file> <library>wine</library> Modified: trunk/rostests/winetests/icmp/icmp.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/icmp/icmp.rbuil…
============================================================================== --- trunk/rostests/winetests/icmp/icmp.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/icmp/icmp.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -5,6 +5,7 @@ <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="icmp_winetest">.</include> <define name="__USE_W32API" /> + <define name="__ROS_LONG64__" /> <library>kernel32</library> <library>ntdll</library> <library>icmp</library> Modified: trunk/rostests/winetests/imm32/imm32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/imm32/imm32.rbu…
============================================================================== --- trunk/rostests/winetests/imm32/imm32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/imm32/imm32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="imm32_winetest" type="win32cui" installbase="bin" installname="imm32_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="imm32_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>imm32.c</file> <file>testlist.c</file> <library>wine</library> Modified: trunk/rostests/winetests/kernel32/kernel32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/kernel…
============================================================================== --- trunk/rostests/winetests/kernel32/kernel32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/kernel32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -5,6 +5,7 @@ <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="kernel32_winetest">.</include> <define name="__USE_W32API" /> + <define name="__ROS_LONG64__" /> <library>ntdll</library> <library>kernel32</library> <library>advapi32</library> Modified: trunk/rostests/winetests/lz32/lz32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/lz32/lz32.rbuil…
============================================================================== --- trunk/rostests/winetests/lz32/lz32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/lz32/lz32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="lz32_winetest" type="win32cui" installbase="bin" installname="lz32_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="lz32_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>lzexpand_main.c</file> <file>testlist.c</file> <library>wine</library> Modified: trunk/rostests/winetests/mapi32/mapi32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mapi32/mapi32.r…
============================================================================== --- trunk/rostests/winetests/mapi32/mapi32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/mapi32/mapi32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="mapi32_winetest" type="win32cui" installbase="bin" installname="mapi32_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="mapi32_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>imalloc.c</file> <file>prop.c</file> <file>util.c</file> Modified: trunk/rostests/winetests/mlang/mlang.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mlang/mlang.rbu…
============================================================================== --- trunk/rostests/winetests/mlang/mlang.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/mlang/mlang.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="mlang_winetest" type="win32cui" installbase="bin" installname="mlang_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="mlang_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>mlang.c</file> <file>testlist.c</file> <library>wine</library> Modified: trunk/rostests/winetests/msacm32/msacm32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msacm32/msacm32…
============================================================================== --- trunk/rostests/winetests/msacm32/msacm32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/msacm32/msacm32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="msacm32_winetest" type="win32cui" installbase="bin" installname="msacm32_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="msacm32_winetest">.</include> + <define name="__ROS_LONG64__" /> <library>wine</library> <library>kernel32</library> <library>msacm32</library> Modified: trunk/rostests/winetests/mshtml/mshtml.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/mshtml.r…
============================================================================== --- trunk/rostests/winetests/mshtml/mshtml.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/mshtml/mshtml.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="mshtml_winetest" type="win32cui" installbase="bin" installname="mshtml_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="mshtml_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>dom.c</file> <file>htmldoc.c</file> <file>misc.c</file> Modified: trunk/rostests/winetests/msi/msi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/msi.rbuild?…
============================================================================== --- trunk/rostests/winetests/msi/msi.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/msi.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="msi_winetest" type="win32cui" installbase="bin" installname="msi_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="msi_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>automation.c</file> <file>db.c</file> <file>format.c</file> Modified: trunk/rostests/winetests/mstask/mstask.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mstask/mstask.r…
============================================================================== --- trunk/rostests/winetests/mstask/mstask.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/mstask/mstask.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="mstask_winetest" type="win32cui" installbase="bin" installname="mstask_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="mstask_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>task.c</file> <file>task_scheduler.c</file> <file>task_trigger.c</file> Modified: trunk/rostests/winetests/msvcrt/msvcrt.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrt/msvcrt.r…
============================================================================== --- trunk/rostests/winetests/msvcrt/msvcrt.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/msvcrt/msvcrt.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -6,6 +6,7 @@ <include base="msvcrt_winetest">.</include> <include base="msvcrt">include/reactos/wine/msvcrt</include> <define name="__USE_W32API" /> + <define name="__ROS_LONG64__" /> <library>kernel32</library> <library>msvcrt</library> <file>cpp.c</file> Modified: trunk/rostests/winetests/netapi32/netapi32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/netapi32/netapi…
============================================================================== --- trunk/rostests/winetests/netapi32/netapi32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/netapi32/netapi32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="netapi32_winetest" type="win32cui" installbase="bin" installname="netapi32_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="netapi32_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>access.c</file> <file>apibuf.c</file> <file>ds.c</file> Modified: trunk/rostests/winetests/ntdll/ntdll.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/ntdll.rbu…
============================================================================== --- trunk/rostests/winetests/ntdll/ntdll.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/ntdll/ntdll.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -5,6 +5,7 @@ <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="ntdll_winetest">.</include> <define name="__USE_W32API" /> + <define name="__ROS_LONG64__" /> <library>kernel32</library> <library>ntdll</library> <file>atom.c</file> Modified: trunk/rostests/winetests/odbccp32/odbccp32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/odbccp32/odbccp…
============================================================================== --- trunk/rostests/winetests/odbccp32/odbccp32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/odbccp32/odbccp32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="odbccp32_winetest" type="win32cui" installbase="bin" installname="odbccp32_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="odbccp32_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>misc.c</file> <file>testlist.c</file> <library>wine</library> Modified: trunk/rostests/winetests/ole32/ole32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/ole32.rbu…
============================================================================== --- trunk/rostests/winetests/ole32/ole32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/ole32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="ole32_winetest" type="win32cui" installbase="bin" installname="ole32_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="ole32_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>clipboard.c</file> <file>compobj.c</file> <file>defaulthandler.c</file> Modified: trunk/rostests/winetests/oleaut32/oleaut32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/oleaut…
============================================================================== --- trunk/rostests/winetests/oleaut32/oleaut32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/oleaut32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -2,10 +2,10 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="oleaut32_winetest" type="win32cui" installbase="bin" installname="oleaut32_winetest.exe" allowwarnings="true"> - <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="oleaut32_winetest">.</include> <include base="ReactOS">include/reactos/wine</include> <include base="oleaut32_winetest" root="intermediate">.</include> + <define name="__ROS_LONG64__" /> <library>wine</library> <library>oleaut32</library> <library>ole32</library> Modified: trunk/rostests/winetests/powrprof/powrprof.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/powrprof/powrpr…
============================================================================== --- trunk/rostests/winetests/powrprof/powrprof.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/powrprof/powrprof.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -1,6 +1,7 @@ <module name="powrprof_winetest" type="win32cui" installbase="bin" installname="powrprof_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="powrprof_winetest">.</include> + <define name="__ROS_LONG64__" /> <define name="__USE_W32API" /> <define name="UNICODE" /> <define name="_UNICODE" /> Modified: trunk/rostests/winetests/psapi/psapi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/psapi/psapi.rbu…
============================================================================== --- trunk/rostests/winetests/psapi/psapi.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/psapi/psapi.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="psapi_winetest" type="win32cui" installbase="bin" installname="psapi_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="psapi_winetest">.</include> + <define name="__ROS_LONG64__" /> <define name="__USE_W32API" /> <library>kernel32</library> <library>ntdll</library> Modified: trunk/rostests/winetests/riched20/riched20.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/riched…
============================================================================== --- trunk/rostests/winetests/riched20/riched20.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/riched20/riched20.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="riched20_winetest" type="win32cui" installbase="bin" installname="riched20_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="riched20_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>editor.c</file> <file>richole.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/riched32/riched32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched32/riched…
============================================================================== --- trunk/rostests/winetests/riched32/riched32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/riched32/riched32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="riched32_winetest" type="win32cui" installbase="bin" installname="riched32_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="riched32_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>editor.c</file> <file>testlist.c</file> <library>wine</library> Modified: trunk/rostests/winetests/rpcrt4/rpcrt4.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/rpcrt4.r…
============================================================================== --- trunk/rostests/winetests/rpcrt4/rpcrt4.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/rpcrt4/rpcrt4.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -12,6 +12,7 @@ <include base="rpcrt4_winetest">.</include> <include root="intermediate" base="rpcrt4_winetest">.</include> <define name="__USE_W32API" /> + <define name="__ROS_LONG64__" /> <library>wine</library> <library>pseh</library> <library>ole32</library> Modified: trunk/rostests/winetests/rsabase/rsabase.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rsabase/rsabase…
============================================================================== --- trunk/rostests/winetests/rsabase/rsabase.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/rsabase/rsabase.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -3,6 +3,7 @@ <module name="rsabase_winetest" type="win32cui" installbase="bin" installname="rsabase_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="rsabase_winetest">.</include> + <define name="__ROS_LONG64__" /> <library>wine</library> <library>advapi32</library> <library>kernel32</library> Modified: trunk/rostests/winetests/rsaenh/rsaenh.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rsaenh/rsaenh.r…
============================================================================== --- trunk/rostests/winetests/rsaenh/rsaenh.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/rsaenh/rsaenh.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="rsaenh_winetest" type="win32cui" installbase="bin" installname="rsaenh_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="rsaenh_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>rsaenh.c</file> <file>testlist.c</file> <library>wine</library> Modified: trunk/rostests/winetests/schannel/schannel.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/schannel/schann…
============================================================================== --- trunk/rostests/winetests/schannel/schannel.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/schannel/schannel.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="schannel_winetest" type="win32cui" installbase="bin" installname="schannel_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="schannel_winetest">.</include> + <define name="__ROS_LONG64__" /> <library>wine</library> <library>kernel32</library> <library>ntdll</library> Modified: trunk/rostests/winetests/setupapi/setupapi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/setupapi/setupa…
============================================================================== --- trunk/rostests/winetests/setupapi/setupapi.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/setupapi/setupapi.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -5,6 +5,7 @@ <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="setupapi_winetest">.</include> <define name="__USE_W32API" /> + <define name="__ROS_LONG64__" /> <library>ntdll</library> <library>kernel32</library> <library>advapi32</library> Modified: trunk/rostests/winetests/shell32/shell32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shell32…
============================================================================== --- trunk/rostests/winetests/shell32/shell32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shell32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="shell32_winetest" type="win32cui" installbase="bin" installname="shell32_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="shell32_winetest">.</include> + <define name="__ROS_LONG64__" /> <library>wine</library> <library>shell32</library> <library>ole32</library> Modified: trunk/rostests/winetests/shlwapi/shlwapi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/shlwapi…
============================================================================== --- trunk/rostests/winetests/shlwapi/shlwapi.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/shlwapi.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="shlwapi_winetest" type="win32cui" installbase="bin" installname="shlwapi_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="shlwapi_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>clist.c</file> <file>clsid.c</file> <file>generated.c</file> Modified: trunk/rostests/winetests/urlmon/urlmon.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/urlmon.r…
============================================================================== --- trunk/rostests/winetests/urlmon/urlmon.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/urlmon/urlmon.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="urlmon_winetest" type="win32cui" installbase="bin" installname="urlmon_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="urlmon_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>generated.c</file> <file>misc.c</file> <file>protocol.c</file> Modified: trunk/rostests/winetests/user32/user32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/user32/user32.r…
============================================================================== --- trunk/rostests/winetests/user32/user32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/user32/user32.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -6,6 +6,7 @@ <include base="user32_winetest">.</include> <include base="ReactOS">include/reactos/wine</include> <define name="__USE_W32API" /> + <define name="__ROS_LONG64__" /> <library>ntdll</library> <library>user32</library> <library>gdi32</library> Modified: trunk/rostests/winetests/usp10/usp10.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/usp10/usp10.rbu…
============================================================================== --- trunk/rostests/winetests/usp10/usp10.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/usp10/usp10.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="usp10_winetest" type="win32cui" installbase="bin" installname="usp10_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="usp10_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>usp10.c</file> <file>testlist.c</file> <library>wine</library> Modified: trunk/rostests/winetests/uxtheme/uxtheme.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/uxtheme/uxtheme…
============================================================================== --- trunk/rostests/winetests/uxtheme/uxtheme.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/uxtheme/uxtheme.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="uxtheme_winetest" type="win32cui" installbase="bin" installname="uxtheme_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="uxtheme_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>system.c</file> <file>testlist.c</file> <library>wine</library> Modified: trunk/rostests/winetests/version/version.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/version/version…
============================================================================== --- trunk/rostests/winetests/version/version.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/version/version.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="version_winetest" type="win32cui" installbase="bin" installname="version_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="version_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>info.c</file> <file>install.c</file> <file>version.rc</file> Modified: trunk/rostests/winetests/winetest/winetest.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/winetest/winete…
============================================================================== --- trunk/rostests/winetests/winetest/winetest.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/winetest/winetest.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="winetest" type="win32gui" installbase="system32" allowwarnings="true"> <include base="winetest">.</include> + <define name="__ROS_LONG64__" /> <library>comctl32</library> <library>version</library> <library>user32</library> Modified: trunk/rostests/winetests/winhttp/winhttp.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/winhttp/winhttp…
============================================================================== --- trunk/rostests/winetests/winhttp/winhttp.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/winhttp/winhttp.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="winhttp_winetest" type="win32cui" installbase="bin" installname="winhttp_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="winhttp_winetest">.</include> + <define name="__ROS_LONG64__" /> <file>notification.c</file> <file>testlist.c</file> <file>winhttp.c</file> Modified: trunk/rostests/winetests/wininet/wininet.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wininet/wininet…
============================================================================== --- trunk/rostests/winetests/wininet/wininet.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/wininet/wininet.rbuild [iso-8859-1] Sun Jan 18 00:31:44 2009 @@ -4,6 +4,7 @@ <module name="wininet_winetest" type="win32cui" installbase="bin" installname="wininet_winetest.exe" allowwarnings="true"> <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="wininet_winetest">.</include> + <define name="__ROS_LONG64__" /> <library>wine</library> <library>wininet</library> <library>ws2_32</library>
15 years, 11 months
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
76
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Results per page:
10
25
50
100
200