- Implement IoSetFileOrigin

svn path=/trunk/; revision=36263
This commit is contained in:
Stefan Ginsberg 2008-09-15 17:47:16 +00:00
parent 7660dc57be
commit 82234d5abf

View file

@ -2418,15 +2418,38 @@ IoQueryFileDosDeviceName(IN PFILE_OBJECT FileObject,
} }
/* /*
* @unimplemented * @implemented
*/ */
NTSTATUS NTSTATUS
NTAPI NTAPI
IoSetFileOrigin(IN PFILE_OBJECT FileObject, IoSetFileOrigin(IN PFILE_OBJECT FileObject,
IN BOOLEAN Remote) IN BOOLEAN Remote)
{ {
UNIMPLEMENTED; NTSTATUS Status = STATUS_SUCCESS;
return STATUS_NOT_IMPLEMENTED; BOOLEAN FlagSet;
/* Get the flag status */
FlagSet = FileObject->Flags & FO_REMOTE_ORIGIN ? TRUE : FALSE;
/* Don't set the flag if it was set already, and don't remove it if it wasn't set */
if (Remote && !FlagSet)
{
/* Set the flag */
FileObject->Flags |= FO_REMOTE_ORIGIN;
}
else if (!Remote && FlagSet)
{
/* Remove the flag */
FileObject->Flags &= ~FO_REMOTE_ORIGIN;
}
else
{
/* Fail */
Status = STATUS_INVALID_PARAMETER_MIX;
}
/* Return status */
return Status;
} }
/* /*