Commit graph

70484 commits

Author SHA1 Message Date
Trevor Thompson 63e83c7ffc [NTFS]
Add support functions, fix warning from previous commit.
+NtfsDumpDataRuns(), +NtfsDumpDataRunData() - Provide diagnostic output.
+GetPackedByteCount() - Used to encode data runs.

svn path=/branches/GSoC_2016/NTFS/; revision=71921
2017-12-10 11:14:00 +01:00
Trevor Thompson 268a139e63 [NTFS]
UpdateFileRecord() - Remove fixup array before returning.

svn path=/branches/GSoC_2016/NTFS/; revision=71920
2017-12-10 11:13:58 +01:00
Trevor Thompson 7c576a836f [NTFS]
Add error-checking to InternalGetNextAttribute(); don't crash if CurrAttr->Length is invalid.

svn path=/branches/GSoC_2016/NTFS/; revision=71897
2017-12-10 11:13:57 +01:00
Trevor Thompson de5cff4b37 [NTFS]
Fix broken check for free disk space in NtfsAllocateClusters().

svn path=/branches/GSoC_2016/NTFS/; revision=71858
2017-12-10 11:13:55 +01:00
Trevor Thompson 7a6e9bcdf6 [NTFS]
Simplify GetLastClusterInDataRun() and clean up NtfsAllocateClusters(). No functional changes.

svn path=/branches/GSoC_2016/NTFS/; revision=71857
2017-12-10 11:13:54 +01:00
Trevor Thompson c08d37d182 [NTFS]
Simplify and optimize InternalSetResidentAttributeLength(), as suggested by Pierre.

svn path=/branches/GSoC_2016/NTFS/; revision=71837
2017-12-10 11:13:52 +01:00
Trevor Thompson 7eb1264f5f [NTFS]
Fix copy-paste error in SetAttributeDataLength()

svn path=/branches/GSoC_2016/NTFS/; revision=71832
2017-12-10 11:13:50 +01:00
Trevor Thompson 760cdfb5aa [NTFS]
Add ability to write to resident attributes.
SetAttributeDataLength() - Check if the file is memory mapped before truncating
+InternalSetResidentAttributeLength() - Used by SetAttributeDataLength()

svn path=/branches/GSoC_2016/NTFS/; revision=71820
2017-12-10 11:13:49 +01:00
Trevor Thompson 25fdabd8ca [NTFS]
Fix typo in NtfsAllocateClusters(), spotted by ThFabba.

svn path=/branches/GSoC_2016/NTFS/; revision=71697
2017-12-10 11:13:35 +01:00
Trevor Thompson 77fc65dc0e [NTFS]
Lay some groundwork for extending allocation size.
+AddRun() - Unimplemented
+GetLastClusterInDataRun()
+NtfsAllocateClusters()

svn path=/branches/GSoC_2016/NTFS/; revision=71696
2017-12-10 11:13:33 +01:00
Trevor Thompson 84a1280fd6 [NTFS]
Allow for an existing file to be opened with FILE_OVERWRITE, FILE_OVERWRITE_IF, or FILE_SUPERSEDE dispositions, and truncate that file. This allows for a file to be opened and saved in Notepad.exe [provided that file is non-resident and its allocation size doesn't need to change].

svn path=/branches/GSoC_2016/NTFS/; revision=71680
2017-12-10 11:13:31 +01:00
Trevor Thompson f47efca89f [NTFS]
Remove unused parameter from SetAttributeDataLength.

svn path=/branches/GSoC_2016/NTFS/; revision=71677
2017-12-10 11:13:30 +01:00
Trevor Thompson a7a2c0d734 [NTFS]
Update a file's size in the relevant $FILE_NAME attribute of the index entry in the parent directory.
+UpdateFileNameRecord() - Searches a parent directory for the proper index entry, then updates the file sizes in that entry.
+UpdateIndexEntryFileNameSize() - Recursively searches directory index and applies the size update.

svn path=/branches/GSoC_2016/NTFS/; revision=71664
2017-12-10 11:13:28 +01:00
Trevor Thompson 4f8133f44b [NTFS]
Fix Up AddFixupArray - It needs to accept a PNTFS_RECORD_HEADER for parameter 2, not a PFILE_RECORD_HEADER.

svn path=/branches/GSoC_2016/NTFS/; revision=71662
2017-12-10 11:13:26 +01:00
Trevor Thompson ba33b9faac [NTFS]
When writing to a file, increase the file size if trying to write past the end.
*FindAttribute() has been given an optional pointer to a ULONG that will receive the offset of the found attribute from the beginning of the record. This is to allow for found attributes to be written back into their file records.
+SetAttributeDataLength()
+UpdateFileRecord() - Updates a file record in the master file table at a given index.
+AddFixupArray() - Prepares a file record or directory index for writing to the disk.

svn path=/branches/GSoC_2016/NTFS/; revision=71660
2017-12-10 11:13:25 +01:00
Trevor Thompson ea6b9622c4 [NTFS]
Add fixes to WriteAttribute():
-Remove erroneous check for end of run (before writing to the last run returned)
-Properly dereference RealLengthWritten pointer, as reported in CR-90

svn path=/branches/GSoC_2016/NTFS/; revision=71616
2017-12-10 11:13:23 +01:00
Trevor Thompson 58a13831ef [NTFS]
Added minimal write support from CORE-10998 along with updates as suggested by CR-90.

svn path=/branches/GSoC_2016/NTFS/; revision=71224
2017-12-10 11:13:19 +01:00
Amine Khaldi 3449296f7b [USETUP] LanguageList => MUILanguageList. #179 2017-12-09 23:33:02 +01:00
Amine Khaldi 1c4f4818ea [ITSS] Get the stubs file out of the source files list. #179 2017-12-09 23:21:22 +01:00
Pierre Schweitzer 18d6584da4
[FASTFAT] Fix FastFAT not returning short name for FAT volumes in FileBothDirectoryInformation case
This is likely due to a copy paste error where long name was copied twice and short never.
Fun fact: this was not affecting FATX volumes
Fun fact2: this was defeating a buffer overflow check and thus was allowing buffer overflow!

CORE-14088
2017-12-09 21:22:55 +01:00
Pierre Schweitzer 48250aef6e
[CHKDSK] Don't continue repair if volume is in use
This makes use of previous commit vfatlib improvements that allow
caller to stop chkdsk if locking fail, which will happen if volume is in use.
That way, ReactOS users won't be able any longer to f*** up their C:\ volume
by attempting to chkdsk -f it!

CORE-14087
2017-12-09 21:12:09 +01:00
Pierre Schweitzer 6a224a38a1
[VFATLIB] Make Chkdsk handle volume opening locking failures.
For instance, when repair is required, we can ask the caller whether we should
continue or not in case locking failed.
Also, introduced a hack for 1st stage where IopParseDevice() hack is in usage
so that broken NTSTATUS is diverted to appropriate status.
That way, usetup will properly continue even if locking failed (due to its
callback stub!)

CORE-14087
2017-12-09 21:12:09 +01:00
Amine Khaldi 287d7cd80a [SMDLL] Use precomp.h in dllmain.c. 2017-12-09 20:47:27 +01:00
Amine Khaldi b3544fd00b [BROWSEUI/SHELLBARS] Add a PCH. 2017-12-09 20:46:40 +01:00
Amine Khaldi eafa77f30a [GDI32_APITEST] Properly add CreateDIBPatternBrush.c to the source files list instead of relying on CMake to do so. 2017-12-09 20:03:08 +01:00
Amine Khaldi d6cb9f60d1 [ACLEDIT][ATL][ATL80][FLTMGR] Get the def files out of the source files lists. #179 2017-12-09 19:59:02 +01:00
Pierre Schweitzer bddb0db469
[FASTFAT] Finally drop the FileNameInformation class for directories.
It makes no sense for them and shouldn't be implemented.
It's an addendum to 9f3c801.
2017-12-09 14:37:07 +01:00
Amine Khaldi 9397f280c3 [FREELDR] The work done in r70692 overlooked the need to update the PCH lists of source files as well.
- We use this as a chance to also update the CMake file in terms of consistency.
- The clang-cl build applies the /Os flag on all the source files that are now using the PCH too.
2017-12-09 14:18:43 +01:00
Colin Finck 46b9165909 [WINSPOOL] Provide stubs with tracing and reasonable failure codes for even more popular Spooler APIs.
This may get more applications to work which previously called into the WINE-generated stubs (that throw an exception).
It also improves debug logs when the "winspool" debug channel is enabled. With such detailed debug logs, we may get an idea which winspool APIs need to be implemented sooner than others.
2017-12-09 14:14:05 +01:00
Colin Finck 1f6f08eca0 [WINSPOOL] Add tracing to all exported APIs. 2017-12-09 14:14:05 +01:00
Colin Finck 45b9b5c1ef [WINSPOOL] Convert the returned Unicode string back to ANSI in GetDefaultPrinterA.
Thanks to Mark for the hint in CORE-14072!
2017-12-09 14:14:05 +01:00
Amine Khaldi de793ea5d6 [USER32_WINETEST] Add a PCH. 2017-12-09 13:58:55 +01:00
Amine Khaldi c4a412a2b9 [ACPPAGE] Make use of the PCH. 2017-12-09 13:40:23 +01:00
Amine Khaldi 4db1f987f3 [MSPAINT] Add some header guards. 2017-12-09 13:36:45 +01:00
Amine Khaldi 44d57334de [LSASRV] Deduplicate SAMPR_ULONG_ARRAY. 2017-12-09 13:29:58 +01:00
Amine Khaldi f6108f3187 [MSAFD] Move the default debug channel to msafd.h. 2017-12-09 13:24:35 +01:00
Amine Khaldi 0bae06fa5f [HAL] Add some header guards. 2017-12-09 13:20:22 +01:00
Amine Khaldi a308735be6 [VGA] Correct VgaInterpretCmdStream() declaration. 2017-12-09 13:11:45 +01:00
Amine Khaldi 69005963fb [UUID] Add a PCH. 2017-12-09 13:04:23 +01:00
Pierre Schweitzer 28343c6c0c
[FASTFAT] Fix size checking in VfatGetFileNameInformation() 2017-12-09 12:45:16 +01:00
Pierre Schweitzer 9f3c80193e
[FASTFAT] Don't mix FileNameInformation and FileNamesInformation (and support the later).
This commit fixes weird behavior in our FastFAT implementation. It was mixing two classes:
FileNameInformation and FileNamesInformation. It was handling FileNameInformation like
FileNamesInformation and was filling buffer with FILE_NAMES_INFORMATION structure instead
of FILE_NAME_INFORMATION structure (how many things did that break?!).
Also, it wasn't implementing the FileNamesInformation class at all. This is required by
ntdll_winetest:directory which doesn't expect it to fail and thus, attempts to read
never filled in memory.

This commit fixes the winetest crash, and may fix other weird FS behavior.

CORE-13367
2017-12-09 12:37:34 +01:00
Amine Khaldi d086a431cb [SAMLIB] Use precomp.h in dllmain.c. 2017-12-09 12:32:34 +01:00
Mark Jansen 4ac511405f [SHELL32_APITEST] Add test for SHCreateFileExtractIconW
CORE-14082
2017-12-09 11:56:42 +01:00
Pierre Schweitzer 4fcaf92ec3
[KERNEL32] Silent a noisy DPRINT1 2017-12-09 11:54:18 +01:00
Katayama Hirofumi MZ ea4daf8b68 [WIN32K] Fix NtGdiGetTextFaceW to report face name correctly (#173)
Initialize TEXTOBJ.FaceName member in TextIntRealizeFont and use it in NtGdiGetTextFaceW 
CORE-14071
2017-12-09 12:06:51 +02:00
Pierre Schweitzer e95751ab78
[FASTFAT] Calculate more accurately buffer length in VfatGetAllInformation(). 2017-12-09 10:59:37 +01:00
Pierre Schweitzer 52f0726817
[FASTFAT] Allow partial returns on directory info query for first entry.
This mimics what MS FastFAT does and fixes (a bit) ntdll_winetest:directory.
It still crashes, but go farther.

CORE-13367
2017-12-09 10:58:19 +01:00
Amine Khaldi e15874b491 [STOBJECT] Improve the existing PCH and make use of it. 2017-12-08 23:15:31 +01:00
Amine Khaldi 6429bfcd8f [CONSRV] Deduplicate GetScreenBufferSizeUnits(), SmallRectToRect() and ConsoleInput. Rename ConsoleList and InsertConsole(). #179 2017-12-08 23:04:48 +01:00
Pierre Schweitzer 9d91a2e8ce
[SERVICES] Fix querying the status of a registered but not started driver.
The current implementation was broken and some dead code was never called; always failing before.
This fix revives this dead code!
Extra fix: avoid derefencing potential null-ptr.
And also, as bonus, comment the function so that logic can be easily understood.

CORE-14062
2017-12-08 22:48:20 +01:00