mirror of
https://github.com/reactos/reactos.git
synced 2024-09-03 17:19:20 +00:00
Added updating of directory entries in VfatCleanupFile/VfatCloseFile.
svn path=/trunk/; revision=3034
This commit is contained in:
parent
87e32585f2
commit
20a4914b89
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: cleanup.c,v 1.4 2002/05/15 18:05:00 ekohl Exp $
|
/* $Id: cleanup.c,v 1.5 2002/06/10 21:15:58 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -25,10 +25,27 @@ VfatCleanupFile(PDEVICE_EXTENSION DeviceExt,
|
||||||
* FUNCTION: Cleans up after a file has been closed.
|
* FUNCTION: Cleans up after a file has been closed.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
|
PVFATCCB pCcb;
|
||||||
|
PVFATFCB pFcb;
|
||||||
|
|
||||||
DPRINT("VfatCleanupFile(DeviceExt %x, FileObject %x)\n",
|
DPRINT("VfatCleanupFile(DeviceExt %x, FileObject %x)\n",
|
||||||
DeviceExt, FileObject);
|
DeviceExt, FileObject);
|
||||||
|
|
||||||
/* FIXME: handle file/directory deletion here */
|
/* FIXME: handle file/directory deletion here */
|
||||||
|
pCcb = (PVFATCCB) (FileObject->FsContext2);
|
||||||
|
if (pCcb == NULL)
|
||||||
|
{
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
pFcb = pCcb->pFcb;
|
||||||
|
if (FileObject->FileName.Buffer)
|
||||||
|
{
|
||||||
|
if (pFcb->Flags & FCB_UPDATE_DIRENTRY)
|
||||||
|
{
|
||||||
|
updEntry (DeviceExt, FileObject);
|
||||||
|
pFcb->Flags &= ~FCB_UPDATE_DIRENTRY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: close.c,v 1.11 2002/05/15 18:05:00 ekohl Exp $
|
/* $Id: close.c,v 1.12 2002/06/10 21:15:58 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -56,10 +56,16 @@ VfatCloseFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject)
|
||||||
if (pFcb->Flags & FCB_DELETE_PENDING)
|
if (pFcb->Flags & FCB_DELETE_PENDING)
|
||||||
{
|
{
|
||||||
delEntry (DeviceExt, FileObject);
|
delEntry (DeviceExt, FileObject);
|
||||||
|
pFcb->Flags &= ~FCB_UPDATE_DIRENTRY;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Status = STATUS_DELETE_PENDING;
|
Status = STATUS_DELETE_PENDING;
|
||||||
}
|
}
|
||||||
|
if (pFcb->Flags & FCB_UPDATE_DIRENTRY)
|
||||||
|
{
|
||||||
|
updEntry (DeviceExt, FileObject);
|
||||||
|
pFcb->Flags &= ~FCB_UPDATE_DIRENTRY;
|
||||||
|
}
|
||||||
FileObject->FsContext2 = NULL;
|
FileObject->FsContext2 = NULL;
|
||||||
vfatReleaseFCB (DeviceExt, pFcb);
|
vfatReleaseFCB (DeviceExt, pFcb);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: vfat.h,v 1.41 2002/05/05 20:18:33 hbirr Exp $ */
|
/* $Id: vfat.h,v 1.42 2002/06/10 21:15:58 hbirr Exp $ */
|
||||||
|
|
||||||
#include <ddk/ntifs.h>
|
#include <ddk/ntifs.h>
|
||||||
|
|
||||||
|
@ -153,6 +153,7 @@ extern PVFAT_GLOBAL_DATA VfatGlobalData;
|
||||||
#define FCB_IS_FAT 0x0004
|
#define FCB_IS_FAT 0x0004
|
||||||
#define FCB_IS_PAGE_FILE 0x0008
|
#define FCB_IS_PAGE_FILE 0x0008
|
||||||
#define FCB_IS_VOLUME 0x0010
|
#define FCB_IS_VOLUME 0x0010
|
||||||
|
#define FCB_UPDATE_DIRENTRY 0x0020
|
||||||
|
|
||||||
typedef struct _VFATFCB
|
typedef struct _VFATFCB
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue