Author: cgutman
Date: Fri Jun 24 01:36:32 2011
New Revision: 52436
URL:
http://svn.reactos.org/svn/reactos?rev=52436&view=rev
Log:
[VFATLIB]
- Don't overwrite format status with lock status
Modified:
trunk/reactos/lib/fslib/vfatlib/vfatlib.c
Modified: trunk/reactos/lib/fslib/vfatlib/vfatlib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/vfatlib/vfatlib.…
==============================================================================
--- trunk/reactos/lib/fslib/vfatlib/vfatlib.c [iso-8859-1] (original)
+++ trunk/reactos/lib/fslib/vfatlib/vfatlib.c [iso-8859-1] Fri Jun 24 01:36:32 2011
@@ -32,7 +32,7 @@
HANDLE FileHandle;
PARTITION_INFORMATION PartitionInfo;
FORMAT_CONTEXT Context;
- NTSTATUS Status;
+ NTSTATUS Status, LockStatus;
DPRINT("VfatFormat(DriveRoot '%wZ')\n", DriveRoot);
@@ -194,20 +194,20 @@
Context.Percent = 0;
Callback (PROGRESS, 0, (PVOID)&Context.Percent);
}
-
- Status = NtFsControlFile(FileHandle,
- NULL,
- NULL,
- NULL,
- &Iosb,
- FSCTL_LOCK_VOLUME,
- NULL,
- 0,
- NULL,
- 0);
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("WARNING: Failed to lock volume for formatting! Format may fail!
(Status: 0x%x)\n", Status);
+
+ LockStatus = NtFsControlFile(FileHandle,
+ NULL,
+ NULL,
+ NULL,
+ &Iosb,
+ FSCTL_LOCK_VOLUME,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ if (!NT_SUCCESS(LockStatus))
+ {
+ DPRINT1("WARNING: Failed to lock volume for formatting! Format may fail!
(Status: 0x%x)\n", LockStatus);
}
if (PartitionInfo.PartitionType == PARTITION_FAT_12)
@@ -250,20 +250,20 @@
{
Status = STATUS_INVALID_PARAMETER;
}
-
- Status = NtFsControlFile(FileHandle,
- NULL,
- NULL,
- NULL,
- &Iosb,
- FSCTL_UNLOCK_VOLUME,
- NULL,
- 0,
- NULL,
- 0);
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("Failed to unlock volume (Status: 0x%x)\n", Status);
+
+ LockStatus = NtFsControlFile(FileHandle,
+ NULL,
+ NULL,
+ NULL,
+ &Iosb,
+ FSCTL_UNLOCK_VOLUME,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ if (!NT_SUCCESS(LockStatus))
+ {
+ DPRINT1("Failed to unlock volume (Status: 0x%x)\n", LockStatus);
}
NtClose(FileHandle);