Commit graph

53 commits

Author SHA1 Message Date
Thomas Faber
6eef1df19a [RTL/NDK]
- Add missing mmtypes.h include in mmfuncs.h
- Remove RtlDetermineDosPathNameType_Ustr from rtlfuncs.h, move it up in path.c
- Add RtlGetLongestNtPathLength to rtlfuncs.h

svn path=/trunk/; revision=56410
2012-04-25 07:24:17 +00:00
Thomas Faber
95e2e118d0 [RTL/NDK]
- RtlGetFullPathName_UstrEx returns NTSTATUS

svn path=/trunk/; revision=56378
2012-04-21 06:57:07 +00:00
Thomas Faber
6d5fb45681 [RTL]
- Fix use of uninitialized variables in failure case of RtlSetCurrentDirectory_U. CID 15339, 15340
- Handles should be NULL, not 0

svn path=/trunk/; revision=55805
2012-02-22 12:02:59 +00:00
Timo Kreuzer
cb1539b7df [RTL]
Fix64 bit warnings

svn path=/trunk/; revision=55527
2012-02-10 17:36:11 +00:00
Pierre Schweitzer
f65034e760 [RTL]
- Reimplement RtlSetCurrentDirectory_U. This fixes bugs & implements references count
- Fix the FIXME in RtlpDosPathNameToRelativeNtPathName_Ustr by incrementing references count

svn path=/trunk/; revision=55017
2012-01-20 20:21:16 +00:00
Pierre Schweitzer
f6bc586f58 [RTL]
Complete RtlpDosPathNameToRelativeNtPathName_Ustr() rewrite by properly handling relative names.
This fixes several regressions brought by r54804 (see winetests).
This also fixes file system corruption when using directory functions.
This may also fix general file system corruption, so, please retest bug #6720.

svn path=/trunk/; revision=54820
2012-01-03 19:08:46 +00:00
Pierre Schweitzer
f41bad823b [NDK/RTL]
Fix RtlIsDosDeviceName_U, RtlIsDosDeviceName_Ustr, RtlDosPathNameToRelativeNtPathName_U, RtlDosPathNameToRelativeNtPathName_U_WithStatus prototypes.

svn path=/trunk/; revision=54801
2012-01-01 17:17:07 +00:00
Alex Ionescu
b5381f1fd7 [RTL]: Implement, and export, RtlDosSearchPath_Ustr as well as RtlGetFullPathName_UstrEx. RtlGetFullPathName_U is still old code but it seems good enough for now, and isn't the next target.
Nothing calls this code yet (SearchPathW soon will), this is just an implementation commit. Code was tested to boot to 3rd stage after SearchPath modification, which is the next target (step 2).
After which, the only code in the loader paths that uses legacy path APIs will be the create process path, the third and final step.

svn path=/trunk/; revision=54646
2011-12-14 03:55:54 +00:00
Alex Ionescu
ca193ad4a7 [RTL]: Clarify a comment.
svn path=/trunk/; revision=54588
2011-12-04 17:25:15 +00:00
Alex Ionescu
778d8cec8a [RTL]: Fix a bug in RtlGetCurrentDirectory_U.
svn path=/trunk/; revision=54586
2011-12-04 16:27:32 +00:00
Aleksey Bragin
360430be4d [RTL]
- Fix two bugs revealed by the newly added test in r54114.
 * Original length of the passed string should be used when checking for out-of-buffer access in the loop
 * PathChars should be updated if a DOS device name was found in the given string.
See issue #6390 for more details.

svn path=/trunk/; revision=54116
2011-10-13 18:15:50 +00:00
Timo Kreuzer
0fa1475dfd [RTL]
- Fix possible integer overflow in RtlpInitializeHeapSegment
- Simplify loop in RtlIsDosDeviceName_Ustr
- Make MonthLengths an array of UCHARs instead of ints
- Remove pointless loops in RtlTimeToTimeFields
- Fix MSVC warnings

svn path=/trunk/; revision=54054
2011-10-08 13:50:14 +00:00
Aleksey Bragin
cf694ce4ea [RTL]
- Post-r52687 implementation of RtlIsDosDeviceName_U is more advanced than pre-r52687 one and covers more corner cases which may not be tested by existing winetests.
- Thus bring back the post-r52687 and also introduce fixes for the following bugs in it:
* Incorrect extension/space-at-the-end truncation
* Incorrect encoding of returned offset/length pair
* Incorrect condition for for-loop exit
* Incorrect calculation of the return length in case of COMx/AUX devices (it should not include the terminating 0 character)
- After those trivial fixes (mostly oneliners and typos), the function works as expected and passes all ntdll_winetest path tests. Sorry for any inconviniences!

svn path=/trunk/; revision=54018
2011-10-05 22:20:30 +00:00
Timo Kreuzer
16bab3bc1c [RTL]
- Remove qsort, its already in crt.
- Fix a number of MSVC/64 bit issues

svn path=/trunk/; revision=53776
2011-09-20 17:33:51 +00:00
Eric Kohl
dd81be1f25 [RTL]
Fix the overly complicated and buggy implementation of RtlIsDosDeviceName_Ustr based on the simple pre-r52687 implementation of RtlIsDosDeviceName_U. This fixes 14(!) wine tests.

svn path=/trunk/; revision=53726
2011-09-17 00:55:02 +00:00
Thomas Faber
758fe19cd0 [NTOSKRNL][RTL][DOC]
- Fix incorrect loop boundaries in the ARM version of MmCreateProcessAddressSpace. Spotted by Vincenzo Cotugno and cppcheck
- Correct outdated wineimport.cmd URL in README.WINE
- Assorted spelling and readability fixes

svn path=/trunk/; revision=53688
2011-09-11 11:47:28 +00:00
Cameron Gutman
e399b918e2 [RTL]
- Fix a couple of potential null pointer accesses

svn path=/trunk/; revision=52746
2011-07-20 18:38:13 +00:00
Cameron Gutman
c4097c4a0c [RTL]
- Validate parameters passed into path functions

svn path=/trunk/; revision=52744
2011-07-20 17:59:16 +00:00
Cameron Gutman
bbbb4ccf95 [RTL]
- Fix the string length calculation for the partial name
- Fixes the 2nd stage regression

svn path=/trunk/; revision=52733
2011-07-20 07:11:38 +00:00
Cameron Gutman
d559321dff [RTL]
- Fix returning relative path names for path API calls using RtlpDosPathNameToRelativeNtPathName_Ustr on the backend

svn path=/trunk/; revision=52732
2011-07-20 05:34:33 +00:00
Alex Ionescu
1fdc23fa32 [RTL]: Makes sure there is a curdir handle.
svn path=/trunk/; revision=52728
2011-07-18 13:46:43 +00:00
Alex Ionescu
16163bbc4a [RTL]: Fix a typo in RtlpDosPathNameToRelativeNtPathName_Ustr thanks so smiley.
[RTL]: Implement the unimplemented corner case based on the old ReactOS code.

svn path=/trunk/; revision=52727
2011-07-18 13:45:32 +00:00
Alex Ionescu
b328750c1b [RTL]: Implement RtlDosPathNameToRelativeNtPathName_U_WithStatus, RtlDosPathNameToRelativeNtPathName_U, RtlDosPathNameToNtPathName_U_WithStatus.
[RTL]: Reimplement RtlDosPathNameToNtPathName_U to use UNICODE_STRING semantics.
[RTL]: Fix RtlGetFullPathName_Ustr.
[RTL]: RtlGetFullPathName_U remains based on the legacy non-UNICODE_STRING mechanism, but it's too complex to attempt changing for now.

svn path=/trunk/; revision=52726
2011-07-18 13:22:09 +00:00
Alex Ionescu
094e863db8 [RTL]: Implement RtlGetFullPathName_Ustr, not yet used.
[RTL]: Simplify RtlDosSearchPath_U by not using a temporary "char" value, and just reading straight from the string buffer.

svn path=/trunk/; revision=52713
2011-07-17 13:15:50 +00:00
Jérôme Gardou
e216eae70a [RTL]
- fix RtlDosSearchPath_U : do not alter filename while searching for file extension

svn path=/trunk/; revision=52707
2011-07-17 10:51:42 +00:00
Alex Ionescu
4f4b4e848c [RTL]: Cleanup, no code changes.
svn path=/trunk/; revision=52700
2011-07-16 19:03:50 +00:00
Alex Ionescu
3aab9ff5f6 [NDK]: Add RtlReleaseRelativeName.
[RTL]: Re-implement RtlDosSearchPath_U using new path functions from past commits. Uses correct behavior with RtlDoesFileExists (for relative paths, return success when file is locked -- for absolute paths, do not!). Also uses a more optimized path loop that does not alloc/realloc/free heap continously (only one heap allocation is used).

svn path=/trunk/; revision=52699
2011-07-16 18:58:52 +00:00
Alex Ionescu
b9aaadf5ce [RTL]: Fix RtlDoesFileExists_UEx, thanks to ThFabba.
svn path=/trunk/; revision=52690
2011-07-15 21:59:06 +00:00
Alex Ionescu
60aa578875 [RTL]: Implement RtlIsDosDeviceName_Ustr and make RtlIsDosDeviceName use it. Uses UNICODE_STRING APIs everywhere and similar to the old implementation.
svn path=/trunk/; revision=52687
2011-07-15 13:08:43 +00:00
Alex Ionescu
048a29ec85 [KERNEL32/RTL]: Fix build.
svn path=/trunk/; revision=52686
2011-07-15 01:44:03 +00:00
Alex Ionescu
a595971d83 [RTL]: Implement RtlDoesFileExists_UstrEx, RtlDoesFileExists_UStr, RtlDoesFileExists_UEx.
[RTL]: Make RtlDoesFileExists_UStrEx use the new RTL_RELATIVE_NAME structure and also support whether or not sharing violations should return success or not.
[RTL]: For now, use the old RtlDosPathNameToNtPathName API instead of the newer one.

svn path=/trunk/; revision=52685
2011-07-15 01:29:10 +00:00
Alex Ionescu
42cac56e9d [RTL]: Fix prototype of RtlDosPathNameToNtPathName_U and fix code to match the new prototype.
[NDK]: Add RTL_RELATIVE_NAME_U which is the Windows 2003+ structure used instead of CURDIR for all relative path APIs.

svn path=/trunk/; revision=52681
2011-07-14 15:33:29 +00:00
Alex Ionescu
7ef2dcbe22 [NTDLL]: Always compile your code before comitting, like my cat used to say.
svn path=/trunk/; revision=52626
2011-07-11 01:22:01 +00:00
Alex Ionescu
043ba4e228 [NTDLL]: Reimplement RtlGetCurrentDirectory_U... I couldn't even understand what the old version was doing. This one is at least commented and makes more sense.
svn path=/trunk/; revision=52625
2011-07-11 01:13:34 +00:00
Alex Ionescu
67f44266b0 [RTL]: RtlDetermineDosPathNameType_U Path is not optional. Checked build ASSERTs if not present. Also, \\? is valid, not only \\., so this should fix a bunch of incorrect path determinations. Aren't there supposed to be unit tests for these things?!
svn path=/trunk/; revision=52624
2011-07-11 00:47:44 +00:00
Alex Ionescu
2507c181d0 [RTL]: Clarify what RtlGetLongestNtPathLength returns instead of using "+9" as a magic constant.
svn path=/trunk/; revision=52623
2011-07-11 00:38:34 +00:00
Aleksey Bragin
97d2212a19 [RTL/PATH]
- Update path.c code to Wine 1.3.14. Fixes a buffer overwrite happening in RtlDosSearchPath_U() when invoked by "shell32_winetest.exe shlexec".
- RtlDosPathNameToNtPathName_U remains unsynced.
- Author names added to the header of the file.
See issue #5964 for more details.

svn path=/trunk/; revision=50954
2011-03-02 11:42:30 +00:00
Amine Khaldi
cd21d25fc7 [LIB/RTL]
- Get rid of some unneeded assignment, cast and a variable.

svn path=/trunk/; revision=48005
2010-07-12 14:50:31 +00:00
Jeffrey Morlan
73694e1e38 - Moved the code for updating the drive-specific current-directory environment variable out of RTL and into the CRT. Testing on Windows shows that neither RtlSetCurrentDirectory_U or SetCurrentDirectory update these variables, but _tchdir does.
svn path=/trunk/; revision=40184
2009-03-23 14:47:46 +00:00
Christoph von Wittich
a4b40ce979 fix a bug in RtlDetermineDosPathNameType_U
fixes 5 kernel32 profile winetests

svn path=/trunk/; revision=38893
2009-01-18 14:51:29 +00:00
Daniel Reimer
ae7da04787 Delete all Trailing spaces in code.
svn path=/trunk/; revision=29690
2007-10-19 23:21:45 +00:00
Aleksey Bragin
c466246f9e - Change RtlIsDosDeviceName_U() implementation to a better Wine implementation
- Winesync RtlIsNameLegalDOS8Dot3()
- "ntdll_winetest.exe path" reduced to 3 failures (which happen on XP too), so considering "path" done 100% now.

svn path=/trunk/; revision=29084
2007-09-17 19:51:32 +00:00
Thomas Bluemel
ff56fe5fb3 Some more function prototype fixes and pointer type warning fixes
svn path=/trunk/; revision=27977
2007-07-28 21:30:16 +00:00
Thomas Bluemel
3a4bb3b8dc Yes we should do it as WINE. Fixes a buffer overflow in RtlDetermineDosPathNameType_U()
svn path=/trunk/; revision=23967
2006-09-07 19:20:42 +00:00
Alex Ionescu
8481c1fa10 - NDK 0.98, now with versionned headers. Too many changes to list, see the TinyKRNL SVN Logs for more detailed information. Thanks to Andrew (Wax), Thomas and Aleksey for testing.
svn path=/trunk/; revision=21880
2006-05-10 17:47:44 +00:00
Thomas Bluemel
cb96a25169 translate the \\?\ prefix to \??\ in RtlDosPathNameToNtPathName_U
svn path=/trunk/; revision=20973
2006-01-22 12:29:40 +00:00
Thomas Bluemel
b89c461211 fixed the definition of RtlDosPathNameToNtPathName_U
svn path=/trunk/; revision=20224
2005-12-17 15:45:59 +00:00
Filip Navara
10177cfd7f Check for failed allocations. Spotted by Martin Bealby.
svn path=/trunk/; revision=20092
2005-12-11 23:43:37 +00:00
Hervé Poussineau
f2e1575922 Use correct format for arguments in debug messages
svn path=/trunk/; revision=19984
2005-12-08 23:44:31 +00:00
Alex Ionescu
ada897443b - Update NDK with proper (when possible) RTL structure names that were previously "under review".
- Update relevant source files to new names.

svn path=/trunk/; revision=19375
2005-11-20 17:16:11 +00:00