Simplify buffer size management in GetNtfsFileRecord(). As tests shown, Windows doesn't care about the real size of the file record and expects the caller to pass the complete size of the record and returns it fully.
CORE-8725
svn path=/trunk/; revision=65166
Add a simple application (à la NTFSInfo & nfi) to dump the data about a NTFS volume using the FSCTL control codes.
This is for both demonstrating how it works and to assess our driver behavior against Windows behavior of these FSCTL.
CORE-8725
svn path=/trunk/; revision=65165
- rewrite the GEO_FRIENDLYNAME case of GetGeoInfoW which was completely wrong, intl.cpl now shows a valid list of locations
- note: The geo location resource strings have an arbitrary offset so that they don't collide with the nls resources (which shouldn't be there). Once these are moved out of kernel32 into locale.nls this offset alongside with the hack already present in GetLocalisedText can be removed.
svn path=/trunk/; revision=65157
- pszEnvironment is a multi-sz string so make sure to double-null terminate it. Fixes a buffer overrun in winlogon; powered by DPH.
svn path=/trunk/; revision=65153
- fall back to english if a localized resource is not found in GetLocalisedText
- this prevents debug spam and loss of functionality (see CORE-8720) for languages that don't have kernel32 translated
svn path=/trunk/; revision=65152
* Move TRASH_CanTrashFile and TRASH_TrashFile declarations to recyclebin.h.
* Do not include xdg.h in shlfileop.cpp anymore.
* Remove the now unneeded xdg.h.
svn path=/trunk/; revision=65146
- Move FSCTL_GET_NTFS_VOLUME_DATA implementation in its own function GetNfsVolumeData(), so remove it from NtfsUserFsRequest()
- Add support for FSCTL_GET_NTFS_FILE_RECORD in NtfsUserFsRequest()
- Implement GetNtfsFileRecord() which returns a file record. Not fully sure about its implementation, this is to be checked.
This does not really improve the nfi situation in any kind yet...
CORE-8725
svn path=/trunk/; revision=65145
Testman confirms that IopParseDevice() hack is no longer required.
So, this is the end of this 8y old hack.
Now ReactOS is able to properly use its storage stack (who said, amazing?)
Bisous IopParseDevice() hack :-)
svn path=/trunk/; revision=65144
Revert r65120...
Which was reverting r65119...
Which was reverting r65117...
Which was reverting r65110...
Which was reverting r65107...
Which was reverting r65104!
To make it short? Fuck you IopParseDevice() hack!
And this time, I hope this is the right one!
I couldn't reproduce any of the previous issues in my WC.
svn path=/trunk/; revision=65142
Some fixes and missing implementations in RawFS:
- Remove some magic values for VCB state
- Add a local VPB in our VCB. This will allow diverting the IO VPB with ours in case of dismount (and thus, will fix dismount)
- Implement support for said VPB in both RawCheckForDismount() and RawInitializeVcb()
- Now, dismount is handled in RawCheckForDismount() directly, and not in functions calling it
- Handle streams in RawClose
- Handle VCB being dismounted in RawCreate()
- Handle dismount also in RawCleanup() (not only in RawClose())
This fixes volume locking and dismounting in RawFS. And thus, allows FS swap in case of raw volume formating in first stage :-).
More to follow!
svn path=/trunk/; revision=65141
- Fix renaming files in case the target file already exists.
- Plug a few reference count leaks on FCBs.
CORE-8660 #comment fixed in r65140 #resolve
CORE-8633 #comment fixed in r65140 #resolve
CORE-4758 #comment fixed in r65140 #resolve
svn path=/trunk/; revision=65140
On the road for getting rid of IopParseDevice() hack....
- Add support for FSCTL_LOCK_VOLUME, FSCTL_UNLOCK_VOLUME, FSCTL_DISMOUNT_VOLUME in VfatFileSystemControl()
- Implement VfatLockOrUnlockVolume(). This brings some kind of volume locking to FastFAT FSD. It's likely not fully accurate and welcome to race conditions. But, its main purpose is to be used in usetup. So, this is fine for now.
- Stubplement VfatDismountVolume(). This will be implemented later on, but should be relatively straightforward as it requires volume to be locked (so, we're the last ones on it :-)).
svn path=/trunk/; revision=65129
Actually enable again the hack...
For whatever reason, it works with my WC but not with clean trunk...
Where are the you, magic and silent patch that fixes it? :-(
svn path=/trunk/; revision=65120
Finally, disable again the IopParseDevice hack.
Just for the record, opening a volume with FILE_READ_EA or FILE_READ_DATA is legal and works in Windows (NTFS Info for instance opens it with GENERIC_READ).
Let's hope we can rid of this hack forever now... It's been with us since 2006!
svn path=/trunk/; revision=65119
Don't over-reference our FCB in case of volume opening (vfatAttachFCBToFileObject() already references it).
This fixes 1st stage and beyond with IopParseDevice hack off
svn path=/trunk/; revision=65118
Now that we start to honor the storage stack (ie, without the IopParseDevice hack ;-)), we have to let FSDs forward device IOCTLs.
This allows back copying files on 1st stage
svn path=/trunk/; revision=65116
Don't attempt to mount any partition just because we have a valid partition table...
Restrict this to them being marked as FAT or compatible.
svn path=/trunk/; revision=65115
Implement support for the FSCTL_GET_NTFS_VOLUME_DATA user request in NtfsUserFsRequest().
This makes NTFSInfo capable of working in ReactOS :-). A picture to show it: http://www.heisspiter.net/~Pierre/rostests/NTFS_info.png
Yes, NTFS Zone isn't computed yet. I'll have a look at it later on.
This doesn't fix nfi.exe though. If it can get its data, it cannot continue. It loops forever on a FSCTL we don't handle yet.
CORE-8725
svn path=/trunk/; revision=65112
Finally, move old stuff back from disk.sys to ntfs.sys now it can be properly reached on volume opening:
- Halfplement NtfsUserFsRequest() and add support for IRP_MN_USER_FS_REQUEST in NtfsFsdFileSystemControl()
- Also, use the proper FSCTL code: FSCTL_GET_NTFS_VOLUME_DATA which exists and is documented instead of FSCTL_GET_NTFS_VOLUME_DATA. Spotted by Christoph.
CORE-8725
svn path=/trunk/; revision=65106