diff --git a/reactos/drivers/fs/cdfs/finfo.c b/reactos/drivers/fs/cdfs/finfo.c index be444471c34..a71f8ed0799 100644 --- a/reactos/drivers/fs/cdfs/finfo.c +++ b/reactos/drivers/fs/cdfs/finfo.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: finfo.c,v 1.2 2002/05/01 13:15:42 ekohl Exp $ +/* $Id: finfo.c,v 1.3 2002/07/20 00:57:15 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -176,6 +176,38 @@ CdfsGetInternalInformation(PFCB Fcb, return(STATUS_SUCCESS); } +static NTSTATUS +CdfsGetNetworkOpenInformation(PFCB Fcb, + PFILE_NETWORK_OPEN_INFORMATION NetworkInfo, + PULONG BufferLength) +/* + * FUNCTION: Retrieve the file network open information + */ +{ + assert(NetworkInfo); + assert(Fcb); + + if (*BufferLength < sizeof(FILE_NETWORK_OPEN_INFORMATION)) + return(STATUS_BUFFER_OVERFLOW); + + CdfsDateTimeToFileTime(Fcb, + &NetworkInfo->CreationTime); + CdfsDateTimeToFileTime(Fcb, + &NetworkInfo->LastAccessTime); + CdfsDateTimeToFileTime(Fcb, + &NetworkInfo->LastWriteTime); + CdfsDateTimeToFileTime(Fcb, + &NetworkInfo->ChangeTime); + NetworkInfo->AllocationSize = Fcb->RFCB.AllocationSize; + NetworkInfo->EndOfFile = Fcb->RFCB.FileSize; + CdfsFileFlagsToAttributes(Fcb, + &NetworkInfo->FileAttributes); + + *BufferLength -= sizeof(FILE_NETWORK_OPEN_INFORMATION); + + return(STATUS_SUCCESS); +} + NTSTATUS STDCALL CdfsQueryInformation(PDEVICE_OBJECT DeviceObject, @@ -240,6 +272,12 @@ CdfsQueryInformation(PDEVICE_OBJECT DeviceObject, &BufferLength); break; + case FileNetworkOpenInformation: + Status = CdfsGetNetworkOpenInformation(Fcb, + SystemBuffer, + &BufferLength); + break; + case FileAlternateNameInformation: case FileAllInformation: Status = STATUS_NOT_IMPLEMENTED; diff --git a/reactos/drivers/fs/vfat/finfo.c b/reactos/drivers/fs/vfat/finfo.c index f73ffb8e1f5..b036c00435f 100644 --- a/reactos/drivers/fs/vfat/finfo.c +++ b/reactos/drivers/fs/vfat/finfo.c @@ -1,4 +1,4 @@ -/* $Id: finfo.c,v 1.12 2002/03/18 22:37:12 hbirr Exp $ +/* $Id: finfo.c,v 1.13 2002/07/20 00:57:36 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -239,6 +239,40 @@ VfatGetInternalInformation(PVFATFCB Fcb, } +static NTSTATUS +VfatGetNetworkOpenInformation(PVFATFCB Fcb, + PFILE_NETWORK_OPEN_INFORMATION NetworkInfo, + PULONG BufferLength) +/* + * FUNCTION: Retrieve the file network open information + */ +{ + assert (NetworkInfo); + assert (Fcb); + + if (*BufferLength < sizeof(FILE_NETWORK_OPEN_INFORMATION)) + return(STATUS_BUFFER_OVERFLOW); + + FsdDosDateTimeToFileTime(Fcb->entry.CreationDate, + Fcb->entry.CreationTime, + &NetworkInfo->CreationTime); + FsdDosDateTimeToFileTime(Fcb->entry.AccessDate, + 0, + &NetworkInfo->LastAccessTime); + FsdDosDateTimeToFileTime(Fcb->entry.UpdateDate, + Fcb->entry.UpdateTime, + &NetworkInfo->LastWriteTime); + FsdDosDateTimeToFileTime(Fcb->entry.UpdateDate, + Fcb->entry.UpdateTime, + &NetworkInfo->ChangeTime); + NetworkInfo->AllocationSize = Fcb->RFCB.AllocationSize; + NetworkInfo->EndOfFile = Fcb->RFCB.FileSize; + NetworkInfo->FileAttributes = Fcb->entry.Attrib; + + *BufferLength -= sizeof(FILE_NETWORK_OPEN_INFORMATION); + return STATUS_SUCCESS; +} + NTSTATUS VfatQueryInformation(PVFAT_IRP_CONTEXT IrpContext) /* @@ -305,6 +339,12 @@ NTSTATUS VfatQueryInformation(PVFAT_IRP_CONTEXT IrpContext) SystemBuffer, &BufferLength); break; + case FileNetworkOpenInformation: + RC = VfatGetNetworkOpenInformation(FCB, + SystemBuffer, + &BufferLength); + break; + case FileAlternateNameInformation: case FileAllInformation: RC = STATUS_NOT_IMPLEMENTED;