mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 05:12:55 +00:00
[VFATLIB] Never touch the file system if not in interactive or RW mode.
It's critical not to perform any write on a volume without an exclusive lock on it. That lock is only acquired if ChkDsk is started in RW mode. Also added an assert in write routine, to make sure that when we're about to perform a write operation, we're really allowed to do so. This will avoid volume corruptions when a simple "chkdsk" is issued from cmd. To put it simple: check will really check now, and won't attempt any repair. CORE-14119
This commit is contained in:
parent
284a839dbd
commit
b0bf7dfb62
3 changed files with 137 additions and 117 deletions
|
@ -352,6 +352,8 @@ void fs_write(off_t pos, int size, void *data)
|
|||
CHANGE *new;
|
||||
int did;
|
||||
|
||||
assert(interactive || rw);
|
||||
|
||||
#if 1 //SAE
|
||||
|
||||
if (FsCheckFlags & FSCHECK_IMMEDIATE_WRITE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue