mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 20:34:59 +00:00
[FASTFAT]
- Add support for FILE_DELETE_ON_CLOSE CORE-6931 #resolve svn path=/trunk/; revision=74450
This commit is contained in:
parent
1d1755e8f5
commit
e6825b17d8
3 changed files with 23 additions and 0 deletions
|
@ -24,6 +24,7 @@ VfatCleanupFile(
|
||||||
PVFAT_IRP_CONTEXT IrpContext)
|
PVFAT_IRP_CONTEXT IrpContext)
|
||||||
{
|
{
|
||||||
PVFATFCB pFcb;
|
PVFATFCB pFcb;
|
||||||
|
PVFATCCB pCcb;
|
||||||
PDEVICE_EXTENSION DeviceExt = IrpContext->DeviceExt;
|
PDEVICE_EXTENSION DeviceExt = IrpContext->DeviceExt;
|
||||||
PFILE_OBJECT FileObject = IrpContext->FileObject;
|
PFILE_OBJECT FileObject = IrpContext->FileObject;
|
||||||
|
|
||||||
|
@ -58,6 +59,12 @@ VfatCleanupFile(
|
||||||
return STATUS_PENDING;
|
return STATUS_PENDING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pCcb = FileObject->FsContext2;
|
||||||
|
if (BooleanFlagOn(pCcb->Flags, CCB_DELETE_ON_CLOSE))
|
||||||
|
{
|
||||||
|
pFcb->Flags |= FCB_DELETE_PENDING;
|
||||||
|
}
|
||||||
|
|
||||||
/* Notify about the cleanup */
|
/* Notify about the cleanup */
|
||||||
FsRtlNotifyCleanup(IrpContext->DeviceExt->NotifySync,
|
FsRtlNotifyCleanup(IrpContext->DeviceExt->NotifySync,
|
||||||
&(IrpContext->DeviceExt->NotifyList),
|
&(IrpContext->DeviceExt->NotifyList),
|
||||||
|
|
|
@ -394,6 +394,7 @@ VfatCreateFile(
|
||||||
ULONG RequestedDisposition, RequestedOptions;
|
ULONG RequestedDisposition, RequestedOptions;
|
||||||
PVFATFCB pFcb = NULL;
|
PVFATFCB pFcb = NULL;
|
||||||
PVFATFCB ParentFcb = NULL;
|
PVFATFCB ParentFcb = NULL;
|
||||||
|
PVFATCCB pCcb = NULL;
|
||||||
PWCHAR c, last;
|
PWCHAR c, last;
|
||||||
BOOLEAN PagingFileCreate;
|
BOOLEAN PagingFileCreate;
|
||||||
BOOLEAN Dots;
|
BOOLEAN Dots;
|
||||||
|
@ -657,6 +658,12 @@ VfatCreateFile(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pCcb = FileObject->FsContext2;
|
||||||
|
if (BooleanFlagOn(RequestedOptions, FILE_DELETE_ON_CLOSE))
|
||||||
|
{
|
||||||
|
pCcb->Flags |= CCB_DELETE_ON_CLOSE;
|
||||||
|
}
|
||||||
|
|
||||||
pFcb->OpenHandleCount++;
|
pFcb->OpenHandleCount++;
|
||||||
DeviceExt->OpenHandleCount++;
|
DeviceExt->OpenHandleCount++;
|
||||||
}
|
}
|
||||||
|
@ -906,6 +913,12 @@ VfatCreateFile(
|
||||||
&pFcb->FCBShareAccess);
|
&pFcb->FCBShareAccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pCcb = FileObject->FsContext2;
|
||||||
|
if (BooleanFlagOn(RequestedOptions, FILE_DELETE_ON_CLOSE))
|
||||||
|
{
|
||||||
|
pCcb->Flags |= CCB_DELETE_ON_CLOSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (Irp->IoStatus.Information == FILE_CREATED)
|
if (Irp->IoStatus.Information == FILE_CREATED)
|
||||||
{
|
{
|
||||||
FsRtlNotifyFullReportChange(DeviceExt->NotifySync,
|
FsRtlNotifyFullReportChange(DeviceExt->NotifySync,
|
||||||
|
|
|
@ -486,9 +486,12 @@ typedef struct _VFATFCB
|
||||||
ULONG LastOffset;
|
ULONG LastOffset;
|
||||||
} VFATFCB, *PVFATFCB;
|
} VFATFCB, *PVFATFCB;
|
||||||
|
|
||||||
|
#define CCB_DELETE_ON_CLOSE 0x0001
|
||||||
|
|
||||||
typedef struct _VFATCCB
|
typedef struct _VFATCCB
|
||||||
{
|
{
|
||||||
LARGE_INTEGER CurrentByteOffset;
|
LARGE_INTEGER CurrentByteOffset;
|
||||||
|
ULONG Flags;
|
||||||
/* for DirectoryControl */
|
/* for DirectoryControl */
|
||||||
ULONG Entry;
|
ULONG Entry;
|
||||||
/* for DirectoryControl */
|
/* for DirectoryControl */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue