mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Implemented FileNetworkOpenInformation.
svn path=/trunk/; revision=3266
This commit is contained in:
parent
f91b107c89
commit
41598868d1
2 changed files with 80 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue