Author: pschweitzer
Date: Fri Feb 17 21:24:12 2017
New Revision: 73821
URL:
http://svn.reactos.org/svn/reactos?rev=73821&view=rev
Log:
[FASTFAT]
In the FCB, get rid of the FCB_IS_FATX_ENTRY flag. It makes no sense to have it on each
and every file as the VCB already has such flag
Modified:
trunk/reactos/drivers/filesystems/fastfat/cleanup.c
trunk/reactos/drivers/filesystems/fastfat/create.c
trunk/reactos/drivers/filesystems/fastfat/dir.c
trunk/reactos/drivers/filesystems/fastfat/direntry.c
trunk/reactos/drivers/filesystems/fastfat/dirwr.c
trunk/reactos/drivers/filesystems/fastfat/fcb.c
trunk/reactos/drivers/filesystems/fastfat/finfo.c
trunk/reactos/drivers/filesystems/fastfat/flush.c
trunk/reactos/drivers/filesystems/fastfat/rw.c
trunk/reactos/drivers/filesystems/fastfat/vfat.h
trunk/reactos/drivers/filesystems/fastfat/volume.c
Modified: trunk/reactos/drivers/filesystems/fastfat/cleanup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/cleanup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/cleanup.c [iso-8859-1] Fri Feb 17 21:24:12
2017
@@ -78,14 +78,14 @@
if (BooleanFlagOn(pFcb->Flags, FCB_IS_DIRTY))
{
- VfatUpdateEntry (pFcb);
+ VfatUpdateEntry (pFcb, vfatVolumeIsFatX(DeviceExt));
}
if (BooleanFlagOn(pFcb->Flags, FCB_DELETE_PENDING) &&
pFcb->OpenHandleCount == 0)
{
if (vfatFCBIsDirectory(pFcb) &&
- !VfatIsDirectoryEmpty(pFcb))
+ !VfatIsDirectoryEmpty(pFcb, vfatVolumeIsFatX(DeviceExt)))
{
pFcb->Flags &= ~FCB_DELETE_PENDING;
}
Modified: trunk/reactos/drivers/filesystems/fastfat/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] Fri Feb 17 21:24:12
2017
@@ -119,7 +119,7 @@
*(Vpb->VolumeLabel) = 0;
Vpb->VolumeLabelLength = 0;
- if (BooleanFlagOn(DeviceExt->Flags, VCB_IS_FATX))
+ if (vfatVolumeIsFatX(DeviceExt))
{
SizeDirEntry = sizeof(FATX_DIR_ENTRY);
EntriesPerPage = FATX_ENTRIES_PER_PAGE;
@@ -151,7 +151,7 @@
if (ENTRY_VOLUME(DeviceExt, Entry))
{
/* copy volume label */
- if (BooleanFlagOn(DeviceExt->Flags, VCB_IS_FATX))
+ if (vfatVolumeIsFatX(DeviceExt))
{
StringO.Buffer = (PCHAR)Entry->FatX.Filename;
StringO.MaximumLength = StringO.Length =
Entry->FatX.FilenameLength;
@@ -259,7 +259,7 @@
if (rcFcb)
{
ULONG startIndex = rcFcb->startIndex;
- if (BooleanFlagOn(rcFcb->Flags, FCB_IS_FATX_ENTRY) &&
!vfatFCBIsRoot(Parent))
+ if (vfatVolumeIsFatX(DeviceExt) && !vfatFCBIsRoot(Parent))
{
startIndex += 2;
}
@@ -947,7 +947,7 @@
{
*pFcb->Attributes = Stack->Parameters.Create.FileAttributes &
~FILE_ATTRIBUTE_NORMAL;
*pFcb->Attributes |= FILE_ATTRIBUTE_ARCHIVE;
- VfatUpdateEntry(pFcb);
+ VfatUpdateEntry(pFcb, vfatVolumeIsFatX(DeviceExt));
}
ExAcquireResourceExclusiveLite(&(pFcb->MainResource), TRUE);
Modified: trunk/reactos/drivers/filesystems/fastfat/dir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] Fri Feb 17 21:24:12 2017
@@ -127,7 +127,7 @@
DirContext->LongNameU.Buffer,
DirContext->LongNameU.Length);
- if (BooleanFlagOn(DeviceExt->Flags, VCB_IS_FATX))
+ if (vfatVolumeIsFatX(DeviceExt))
{
FsdDosDateTimeToSystemTime(DeviceExt,
DirContext->DirEntry.FatX.CreationDate,
@@ -220,7 +220,7 @@
DirContext->LongNameU.Buffer,
DirContext->LongNameU.Length);
- if (BooleanFlagOn(DeviceExt->Flags, VCB_IS_FATX))
+ if (vfatVolumeIsFatX(DeviceExt))
{
FsdDosDateTimeToSystemTime(DeviceExt,
DirContext->DirEntry.FatX.CreationDate,
@@ -285,7 +285,7 @@
pInfo->EaSize = 0;
- if (BooleanFlagOn(DeviceExt->Flags, VCB_IS_FATX))
+ if (vfatVolumeIsFatX(DeviceExt))
{
pInfo->FileNameLength = DirContext->LongNameU.Length;
Modified: trunk/reactos/drivers/filesystems/fastfat/direntry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/direntry.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/direntry.c [iso-8859-1] Fri Feb 17 21:24:12
2017
@@ -27,7 +27,7 @@
cluster = pFatDirEntry->Fat.FirstCluster |
(pFatDirEntry->Fat.FirstClusterHigh << 16);
}
- else if (BooleanFlagOn(pDeviceExt->Flags, VCB_IS_FATX))
+ else if (vfatVolumeIsFatX(pDeviceExt))
{
cluster = pFatDirEntry->FatX.FirstCluster;
}
@@ -170,9 +170,10 @@
BOOLEAN
VfatIsDirectoryEmpty(
- PVFATFCB Fcb)
+ PVFATFCB Fcb,
+ BOOLEAN IsFatX)
{
- if (BooleanFlagOn(Fcb->Flags, FCB_IS_FATX_ENTRY))
+ if (IsFatX)
return FATXIsDirectoryEmpty(Fcb);
else
return FATIsDirectoryEmpty(Fcb);
Modified: trunk/reactos/drivers/filesystems/fastfat/dirwr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/dirwr.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/dirwr.c [iso-8859-1] Fri Feb 17 21:24:12
2017
@@ -21,7 +21,8 @@
*/
NTSTATUS
VfatUpdateEntry(
- IN PVFATFCB pFcb)
+ IN PVFATFCB pFcb,
+ IN BOOLEAN IsFatX)
{
PVOID Context;
PDIR_ENTRY PinEntry;
@@ -31,7 +32,7 @@
ASSERT(pFcb);
- if (BooleanFlagOn(pFcb->Flags, FCB_IS_FATX_ENTRY))
+ if (IsFatX)
{
SizeDirEntry = sizeof(FATX_DIR_ENTRY);
dirIndex = pFcb->startIndex;
@@ -90,7 +91,7 @@
DPRINT("vfatRenameEntry(%p, %p, %wZ, %d)\n", DeviceExt, pFcb, FileName,
CaseChangeOnly);
- if (BooleanFlagOn(pFcb->Flags, FCB_IS_FATX_ENTRY))
+ if (vfatVolumeIsFatX(DeviceExt))
{
VFAT_DIRENTRY_CONTEXT DirContext;
@@ -162,7 +163,7 @@
ULONG SizeDirEntry;
FileOffset.QuadPart = 0;
- if (BooleanFlagOn(DeviceExt->Flags, VCB_IS_FATX))
+ if (vfatVolumeIsFatX(DeviceExt))
SizeDirEntry = sizeof(FATX_DIR_ENTRY);
else
SizeDirEntry = sizeof(FAT_DIR_ENTRY);
@@ -248,7 +249,7 @@
}
_SEH2_END;
- if (DeviceExt->Flags & VCB_IS_FATX)
+ if (vfatVolumeIsFatX(DeviceExt))
memset(pFatEntry, 0xff, DeviceExt->FatInfo.BytesPerCluster);
else
RtlZeroMemory(pFatEntry, DeviceExt->FatInfo.BytesPerCluster);
@@ -267,7 +268,7 @@
}
_SEH2_END;
- if (DeviceExt->Flags & VCB_IS_FATX)
+ if (vfatVolumeIsFatX(DeviceExt))
memset(pFatEntry, 0xff, SizeDirEntry);
else
RtlZeroMemory(pFatEntry, SizeDirEntry);
@@ -824,7 +825,7 @@
IN UCHAR ReqAttr,
IN PVFAT_MOVE_CONTEXT MoveContext)
{
- if (BooleanFlagOn(DeviceExt->Flags, VCB_IS_FATX))
+ if (vfatVolumeIsFatX(DeviceExt))
return FATXAddEntry(DeviceExt, NameU, Fcb, ParentFcb, RequestedOptions, ReqAttr,
MoveContext);
else
return FATAddEntry(DeviceExt, NameU, Fcb, ParentFcb, RequestedOptions, ReqAttr,
MoveContext);
@@ -927,7 +928,7 @@
ASSERT(pFcb);
ASSERT(pFcb->parentFcb);
- ASSERT(BooleanFlagOn(pFcb->Flags, FCB_IS_FATX_ENTRY));
+ ASSERT(vfatVolumeIsFatX(DeviceExt));
StartIndex = pFcb->startIndex;
@@ -983,7 +984,7 @@
IN PVFATFCB pFcb,
OUT PVFAT_MOVE_CONTEXT MoveContext)
{
- if (BooleanFlagOn(DeviceExt->Flags, VCB_IS_FATX))
+ if (vfatVolumeIsFatX(DeviceExt))
return FATXDelEntry(DeviceExt, pFcb, MoveContext);
else
return FATDelEntry(DeviceExt, pFcb, MoveContext);
Modified: trunk/reactos/drivers/filesystems/fastfat/fcb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/fcb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/fcb.c [iso-8859-1] Fri Feb 17 21:24:12 2017
@@ -136,11 +136,8 @@
}
RtlZeroMemory(rcFCB, sizeof(VFATFCB));
vfatInitFcb(rcFCB, pFileNameU);
- if (BooleanFlagOn(pVCB->Flags, VCB_IS_FATX))
- {
- rcFCB->Flags |= FCB_IS_FATX_ENTRY;
+ if (vfatVolumeIsFatX(pVCB))
rcFCB->Attributes = &rcFCB->entry.FatX.Attrib;
- }
else
rcFCB->Attributes = &rcFCB->entry.Fat.Attrib;
rcFCB->Hash.Hash = vfatNameHash(0, &rcFCB->PathNameU);
@@ -371,7 +368,7 @@
RtlCopyMemory(&Fcb->entry, &DirContext->DirEntry, sizeof (DIR_ENTRY));
RtlCopyUnicodeString(&Fcb->ShortNameU, &DirContext->ShortNameU);
Fcb->Hash.Hash = vfatNameHash(0, &Fcb->PathNameU);
- if (Vcb->Flags & VCB_IS_FATX)
+ if (vfatVolumeIsFatX(Vcb))
{
Fcb->ShortHash.Hash = Fcb->Hash.Hash;
}
@@ -401,7 +398,7 @@
}
}
}
- else if (BooleanFlagOn(Fcb->Flags, FCB_IS_FATX_ENTRY))
+ else if (vfatVolumeIsFatX(Vcb))
{
Size = Fcb->entry.FatX.FileSize;
}
@@ -411,7 +408,7 @@
}
Fcb->dirIndex = DirContext->DirIndex;
Fcb->startIndex = DirContext->StartIndex;
- if (BooleanFlagOn(Fcb->Flags, FCB_IS_FATX_ENTRY) && !vfatFCBIsRoot(Fcb))
+ if (vfatVolumeIsFatX(Vcb) && !vfatFCBIsRoot(Fcb))
{
ASSERT(DirContext->DirIndex >= 2 && DirContext->StartIndex >=
2);
Fcb->dirIndex = DirContext->DirIndex-2;
@@ -453,7 +450,7 @@
Fcb->DirNameU.Buffer = Fcb->PathNameU.Buffer;
vfatSplitPathName(&Fcb->PathNameU, &Fcb->DirNameU,
&Fcb->LongNameU);
Fcb->Hash.Hash = vfatNameHash(0, &Fcb->PathNameU);
- if (BooleanFlagOn(pVCB->Flags, VCB_IS_FATX))
+ if (vfatVolumeIsFatX(pVCB))
{
Fcb->ShortHash.Hash = Fcb->Hash.Hash;
}
@@ -637,7 +634,7 @@
UNICODE_STRING NameU = RTL_CONSTANT_STRING(L"\\");
FCB = vfatNewFCB(pVCB, &NameU);
- if (BooleanFlagOn(FCB->Flags, FCB_IS_FATX_ENTRY))
+ if (vfatVolumeIsFatX(pVCB))
{
memset(FCB->entry.FatX.Filename, ' ', 42);
FCB->entry.FatX.FileSize = pVCB->FatInfo.rootDirectorySectors *
pVCB->FatInfo.BytesPerSector;
Modified: trunk/reactos/drivers/filesystems/fastfat/finfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/finfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/finfo.c [iso-8859-1] Fri Feb 17 21:24:12
2017
@@ -165,7 +165,7 @@
/* Check volume label bit */
ASSERT(0 == (*FCB->Attributes & _A_VOLID));
- if (BooleanFlagOn(FCB->Flags, FCB_IS_FATX_ENTRY))
+ if (vfatVolumeIsFatX(DeviceExt))
{
if (BasicInfo->CreationTime.QuadPart != 0 &&
BasicInfo->CreationTime.QuadPart != -1)
{
@@ -230,7 +230,7 @@
DPRINT("Setting attributes 0x%02x\n", *FCB->Attributes);
}
- VfatUpdateEntry(FCB);
+ VfatUpdateEntry(FCB, vfatVolumeIsFatX(DeviceExt));
return STATUS_SUCCESS;
}
@@ -254,7 +254,7 @@
if (*BufferLength < sizeof(FILE_BASIC_INFORMATION))
return STATUS_BUFFER_OVERFLOW;
- if (BooleanFlagOn(FCB->Flags, FCB_IS_FATX_ENTRY))
+ if (vfatVolumeIsFatX(DeviceExt))
{
FsdDosDateTimeToSystemTime(DeviceExt,
FCB->entry.FatX.CreationDate,
@@ -313,9 +313,7 @@
PDEVICE_OBJECT DeviceObject,
PFILE_DISPOSITION_INFORMATION DispositionInfo)
{
-#if DBG
PDEVICE_EXTENSION DeviceExt = DeviceObject->DeviceExtension;
-#endif
DPRINT("FsdSetDispositionInformation(<%wZ>, Delete %u)\n",
&FCB->PathNameU, DispositionInfo->DeleteFile);
@@ -359,7 +357,7 @@
return STATUS_CANNOT_DELETE;
}
- if (vfatFCBIsDirectory(FCB) && !VfatIsDirectoryEmpty(FCB))
+ if (vfatFCBIsDirectory(FCB) && !VfatIsDirectoryEmpty(FCB,
vfatVolumeIsFatX(DeviceExt)))
{
/* can't delete a non-empty directory */
@@ -1043,7 +1041,7 @@
if (*BufferLength < sizeof(FILE_NETWORK_OPEN_INFORMATION))
return(STATUS_BUFFER_OVERFLOW);
- if (BooleanFlagOn(Fcb->Flags, FCB_IS_FATX_ENTRY))
+ if (vfatVolumeIsFatX(DeviceExt))
{
FsdDosDateTimeToSystemTime(DeviceExt,
Fcb->entry.FatX.CreationDate,
@@ -1184,7 +1182,8 @@
PFILE_OBJECT FileObject,
PVFATFCB Fcb,
ULONG Size,
- ULONG ClusterSize)
+ ULONG ClusterSize,
+ BOOLEAN IsFatX)
{
if (Size > 0)
{
@@ -1196,7 +1195,7 @@
}
if (!vfatFCBIsDirectory(Fcb))
{
- if (BooleanFlagOn(Fcb->Flags, FCB_IS_FATX_ENTRY))
+ if (IsFatX)
Fcb->entry.FatX.FileSize = Size;
else
Fcb->entry.Fat.FileSize = Size;
@@ -1221,7 +1220,7 @@
ULONG ClusterSize = DeviceExt->FatInfo.BytesPerCluster;
ULONG NewSize = AllocationSize->u.LowPart;
ULONG NCluster;
- BOOLEAN AllocSizeChanged = FALSE, IsFatX = BooleanFlagOn(Fcb->Flags,
FCB_IS_FATX_ENTRY);
+ BOOLEAN AllocSizeChanged = FALSE, IsFatX = vfatVolumeIsFatX(DeviceExt);
DPRINT("VfatSetAllocationSizeInformation(File <%wZ>, AllocationSize %d
%u)\n",
&Fcb->PathNameU, AllocationSize->HighPart,
AllocationSize->LowPart);
@@ -1348,7 +1347,7 @@
return STATUS_DISK_FULL;
}
}
- UpdateFileSize(FileObject, Fcb, NewSize, ClusterSize);
+ UpdateFileSize(FileObject, Fcb, NewSize, ClusterSize,
vfatVolumeIsFatX(DeviceExt));
}
else if (NewSize + ClusterSize <= Fcb->RFCB.AllocationSize.u.LowPart)
{
@@ -1364,7 +1363,7 @@
AllocSizeChanged = TRUE;
/* FIXME: Use the cached cluster/offset better way. */
Fcb->LastCluster = Fcb->LastOffset = 0;
- UpdateFileSize(FileObject, Fcb, NewSize, ClusterSize);
+ UpdateFileSize(FileObject, Fcb, NewSize, ClusterSize,
vfatVolumeIsFatX(DeviceExt));
if (NewSize > 0)
{
Status = OffsetToCluster(DeviceExt, FirstCluster,
@@ -1408,14 +1407,14 @@
}
else
{
- UpdateFileSize(FileObject, Fcb, NewSize, ClusterSize);
+ UpdateFileSize(FileObject, Fcb, NewSize, ClusterSize,
vfatVolumeIsFatX(DeviceExt));
}
/* Update the on-disk directory entry */
Fcb->Flags |= FCB_IS_DIRTY;
if (AllocSizeChanged)
{
- VfatUpdateEntry(Fcb);
+ VfatUpdateEntry(Fcb, vfatVolumeIsFatX(DeviceExt));
}
return STATUS_SUCCESS;
}
Modified: trunk/reactos/drivers/filesystems/fastfat/flush.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/flush.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/flush.c [iso-8859-1] Fri Feb 17 21:24:12
2017
@@ -35,7 +35,7 @@
if (BooleanFlagOn(Fcb->Flags, FCB_IS_DIRTY))
{
- Status = VfatUpdateEntry(Fcb);
+ Status = VfatUpdateEntry(Fcb, vfatVolumeIsFatX(DeviceExt));
if (!NT_SUCCESS(Status))
{
IoStatus.Status = Status;
Modified: trunk/reactos/drivers/filesystems/fastfat/rw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] Fri Feb 17 21:24:12 2017
@@ -1017,7 +1017,7 @@
// set dates and times
KeQuerySystemTime (&SystemTime);
- if (BooleanFlagOn(Fcb->Flags, FCB_IS_FATX_ENTRY))
+ if (vfatVolumeIsFatX(IrpContext->DeviceExt))
{
FsdSystemTimeToDosDateTime(IrpContext->DeviceExt,
&SystemTime,
&Fcb->entry.FatX.UpdateDate,
Modified: trunk/reactos/drivers/filesystems/fastfat/vfat.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/vfat.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/vfat.h [iso-8859-1] Fri Feb 17 21:24:12
2017
@@ -197,9 +197,9 @@
#define LONGNAME_MAX_LENGTH 256 // max length for a long filename
-#define ENTRY_DELETED(DeviceExt, DirEntry) (BooleanFlagOn(DeviceExt->Flags,
VCB_IS_FATX) ? FATX_ENTRY_DELETED(&((DirEntry)->FatX)) :
FAT_ENTRY_DELETED(&((DirEntry)->Fat)))
-#define ENTRY_VOLUME(DeviceExt, DirEntry) (BooleanFlagOn(DeviceExt->Flags,
VCB_IS_FATX) ? FATX_ENTRY_VOLUME(&((DirEntry)->FatX)) :
FAT_ENTRY_VOLUME(&((DirEntry)->Fat)))
-#define ENTRY_END(DeviceExt, DirEntry) (BooleanFlagOn(DeviceExt->Flags, VCB_IS_FATX) ?
FATX_ENTRY_END(&((DirEntry)->FatX)) : FAT_ENTRY_END(&((DirEntry)->Fat)))
+#define ENTRY_DELETED(DeviceExt, DirEntry) (vfatVolumeIsFatX(DeviceExt) ?
FATX_ENTRY_DELETED(&((DirEntry)->FatX)) :
FAT_ENTRY_DELETED(&((DirEntry)->Fat)))
+#define ENTRY_VOLUME(DeviceExt, DirEntry) (vfatVolumeIsFatX(DeviceExt) ?
FATX_ENTRY_VOLUME(&((DirEntry)->FatX)) :
FAT_ENTRY_VOLUME(&((DirEntry)->Fat)))
+#define ENTRY_END(DeviceExt, DirEntry) (vfatVolumeIsFatX(DeviceExt) ?
FATX_ENTRY_END(&((DirEntry)->FatX)) : FAT_ENTRY_END(&((DirEntry)->Fat)))
#define FAT_ENTRY_DELETED(DirEntry) ((DirEntry)->Filename[0] == 0xe5)
#define FAT_ENTRY_END(DirEntry) ((DirEntry)->Filename[0] == 0)
@@ -346,7 +346,6 @@
#define FCB_IS_PAGE_FILE 0x0008
#define FCB_IS_VOLUME 0x0010
#define FCB_IS_DIRTY 0x0020
-#define FCB_IS_FATX_ENTRY 0x0040
typedef struct _VFATFCB
{
@@ -530,6 +529,13 @@
return BooleanFlagOn(*FCB->Attributes, FILE_ATTRIBUTE_READONLY);
}
+FORCEINLINE
+BOOLEAN
+vfatVolumeIsFatX(PDEVICE_EXTENSION DeviceExt)
+{
+ return BooleanFlagOn(DeviceExt->Flags, VCB_IS_FATX);
+}
+
/* blockdev.c */
NTSTATUS
@@ -636,7 +642,8 @@
BOOLEAN
VfatIsDirectoryEmpty(
- PVFATFCB Fcb);
+ PVFATFCB Fcb,
+ BOOLEAN IsFatX);
NTSTATUS
FATGetNextDirEntry(
@@ -668,7 +675,8 @@
NTSTATUS
VfatUpdateEntry(
- PVFATFCB pFcb);
+ PVFATFCB pFcb,
+ IN BOOLEAN IsFatX);
NTSTATUS
VfatDelEntry(
Modified: trunk/reactos/drivers/filesystems/fastfat/volume.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/volume.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/volume.c [iso-8859-1] Fri Feb 17 21:24:12
2017
@@ -59,7 +59,7 @@
*BufferLength -= DeviceObject->Vpb->VolumeLabelLength;
}
- if (BooleanFlagOn(DeviceExt->VolumeFcb->Flags, FCB_IS_FATX_ENTRY))
+ if (vfatVolumeIsFatX(DeviceExt))
{
FsdDosDateTimeToSystemTime(DeviceExt,
DeviceExt->VolumeFcb->entry.FatX.CreationDate,
@@ -260,7 +260,7 @@
return STATUS_NAME_TOO_LONG;
}
- if (BooleanFlagOn(DeviceExt->Flags, VCB_IS_FATX))
+ if (vfatVolumeIsFatX(DeviceExt))
{
if (FsLabelInfo->VolumeLabelLength / sizeof(WCHAR) > 42)
return STATUS_NAME_TOO_LONG;
@@ -289,7 +289,7 @@
if (!NT_SUCCESS(Status))
return Status;
- if (BooleanFlagOn(DeviceExt->Flags, VCB_IS_FATX))
+ if (vfatVolumeIsFatX(DeviceExt))
{
RtlCopyMemory(VolumeLabelDirEntry.FatX.Filename, cString, LabelLen);
memset(&VolumeLabelDirEntry.FatX.Filename[LabelLen], ' ', 42 -
LabelLen);