Io subsystem clean-up. Every exported symbols is not STDCALL.

NtCreateFile renamed IoCreateFile and Nt{Create,Open}File call IoCreateFile.
Io data items added (to be fixed).

svn path=/trunk/; revision=1090
This commit is contained in:
Emanuele Aliberti 2000-03-26 19:38:32 +00:00
parent 79eff41abb
commit 758ba695e1
45 changed files with 2429 additions and 958 deletions

View file

@ -105,12 +105,12 @@ NtQueryEaFile ZwQueryEaFile 36
NtQueryEvent ZwQueryEvent 20 NtQueryEvent ZwQueryEvent 20
NtQueryFullAttributesFile ZwQueryFullAttributesFile 8 NtQueryFullAttributesFile ZwQueryFullAttributesFile 8
NtQueryInformationFile ZwQueryInformationFile 20 NtQueryInformationFile ZwQueryInformationFile 20
NtQueryIoCompletion ZwQueryIoCompletion 20
NtQueryInformationPort ZwQueryInformationPort 20 NtQueryInformationPort ZwQueryInformationPort 20
NtQueryInformationProcess ZwQueryInformationProcess 20 NtQueryInformationProcess ZwQueryInformationProcess 20
NtQueryInformationThread ZwQueryInformationThread 20 NtQueryInformationThread ZwQueryInformationThread 20
NtQueryInformationToken ZwQueryInformationToken 20 NtQueryInformationToken ZwQueryInformationToken 20
NtQueryIntervalProfile ZwQueryIntervalProfile 8 NtQueryIntervalProfile ZwQueryIntervalProfile 8
NtQueryIoCompletion ZwQueryIoCompletion 20
NtQueryKey ZwQueryKey 20 NtQueryKey ZwQueryKey 20
NtQueryMultipleValueKey ZwQueryMultipleValueKey 24 NtQueryMultipleValueKey ZwQueryMultipleValueKey 24
NtQueryMutant ZwQueryMutant 20 NtQueryMutant ZwQueryMutant 20

View file

@ -3,11 +3,16 @@
/* GENERAL DEFINITIONS ****************************************************/ /* GENERAL DEFINITIONS ****************************************************/
#define _WIN32_WINNT 0x0400
#include <internal/hal/irq.h> #include <internal/hal/irq.h>
#include <ddk/kedef.h> #include <ddk/kedef.h>
#include <ddk/iodef.h> #include <ddk/iodef.h>
#define EXPORTED __declspec(dllexport)
#define IMPORTED __declspec(dllimport)
/* /*
* PURPOSE: Number of a thread priority levels * PURPOSE: Number of a thread priority levels
*/ */

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
/* $Id: iotypes.h,v 1.13 2000/03/12 01:22:37 ekohl Exp $ /* $Id: iotypes.h,v 1.14 2000/03/26 19:38:13 ea Exp $
* *
*/ */
@ -606,4 +606,26 @@ typedef struct
} CM_RESOURCE_LIST, *PCM_RESOURCE_LIST; } CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
typedef
IO_ALLOCATION_ACTION
(*PDRIVER_CONTROL) (
PDEVICE_OBJECT DeviceObject,
PIRP irp,
PVOID MapRegisterBase,
PVOID Context
);
#if (_WIN32_WINNT >= 0x0400)
typedef
VOID
(*PFSDNOTIFICATIONPROC) (
IN PDEVICE_OBJECT PtrTargetFileSystemDeviceObject,
IN BOOLEAN DriverActive
);
#endif // (_WIN32_WINNT >= 0x0400)
enum
{
IO_NO_INCREMENT,
};
#endif __INCLUDE_DDK_IOTYPES_H #endif __INCLUDE_DDK_IOTYPES_H

View file

@ -1,23 +1,23 @@
/* $Id: io.h,v 1.8 2000/03/05 19:17:39 ea Exp $ /* $Id: io.h,v 1.9 2000/03/26 19:38:14 ea Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: include/internal/iomgr.h * FILE: include/internal/io.h
* PURPOSE: Internal io manager declarations * PURPOSE: Internal io manager declarations
* PROGRAMMER: David Welch (welch@mcmail.com) * PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY: * UPDATE HISTORY:
* 28/05/97: Created * 28/05/97: Created
*/ */
#ifndef __INCLUDE_INTERNAL_IOMGR_H #ifndef __INCLUDE_INTERNAL_IO_H
#define __INCLUDE_INTERNAL_IOMGR_H #define __INCLUDE_INTERNAL_IO_H
#include <ddk/ntddk.h> #include <ddk/ntddk.h>
#include <internal/ob.h> #include <internal/ob.h>
extern POBJECT_TYPE IoDeviceType; extern POBJECT_TYPE EXPORTED IoDeviceObjectType;
extern POBJECT_TYPE IoFileType; extern POBJECT_TYPE EXPORTED IoFileObjectType;
extern POBJECT_TYPE IoSymbolicLinkType; extern POBJECT_TYPE IoSymbolicLinkObjectType;
/* /*
* FUNCTION: Called to initalize a loaded driver * FUNCTION: Called to initalize a loaded driver
@ -44,10 +44,13 @@ PIRP IoBuildFilesystemControlRequest(ULONG MinorFunction,
PDEVICE_OBJECT DeviceToMount); PDEVICE_OBJECT DeviceToMount);
VOID IoSecondStageCompletion(PIRP Irp, CCHAR PriorityBoost); VOID IoSecondStageCompletion(PIRP Irp, CCHAR PriorityBoost);
NTSTATUS IopCreateFile(PVOID ObjectBody, NTSTATUS
PVOID Parent, IopCreateFile (
PWSTR RemainingPath, PVOID ObjectBody,
POBJECT_ATTRIBUTES ObjectAttributes); PVOID Parent,
PWSTR RemainingPath,
POBJECT_ATTRIBUTES ObjectAttributes
);
NTSTATUS IopCreateDevice(PVOID ObjectBody, NTSTATUS IopCreateDevice(PVOID ObjectBody,
PVOID Parent, PVOID Parent,
PWSTR RemainingPath, PWSTR RemainingPath,

View file

@ -108,10 +108,6 @@ NTSTATUS MmCopyMmInfo(PEPROCESS Src, PEPROCESS Dest);
NTSTATUS MmReleaseMmInfo(PEPROCESS Process); NTSTATUS MmReleaseMmInfo(PEPROCESS Process);
NTSTATUS Mmi386ReleaseMmInfo(PEPROCESS Process); NTSTATUS Mmi386ReleaseMmInfo(PEPROCESS Process);
VOID MmDeletePageEntry(PEPROCESS Process, PVOID Address, BOOL FreePage); VOID MmDeletePageEntry(PEPROCESS Process, PVOID Address, BOOL FreePage);
NTSTATUS IoPageRead(PFILE_OBJECT FileObject,
PMDL Mdl,
PLARGE_INTEGER Offset,
PIO_STATUS_BLOCK StatusBlock);
VOID MmBuildMdlFromPages(PMDL Mdl); VOID MmBuildMdlFromPages(PMDL Mdl);
PVOID MmGetMdlPageAddress(PMDL Mdl, PVOID Offset); PVOID MmGetMdlPageAddress(PMDL Mdl, PVOID Offset);

View file

@ -875,9 +875,9 @@ _to_pmode:
mov ah,12 mov ah,12
int 10h int 10h
mov ax,1112h ;! Use 8x8 font ; mov ax,1112h ;! Use 8x8 font
xor bl,bl ; xor bl,bl
int 10h ; int 10h
mov ax,1200h ;! Use alternate print screen mov ax,1200h ;! Use alternate print screen
mov bl,20h mov bl,20h
int 10h int 10h

View file

@ -1,4 +1,4 @@
/* $Id: sysinfo.c,v 1.3 1999/08/11 23:27:58 ekohl Exp $ /* $Id: sysinfo.c,v 1.4 2000/03/26 19:38:18 ea Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -245,3 +245,6 @@ NtFlushInstructionCache (
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
/* EOF */

View file

@ -0,0 +1,74 @@
/* $Id: adapter.c,v 1.1 2000/03/26 19:38:18 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: hal/x86/adapter.c (from ntoskrnl/io/adapter.c)
* PURPOSE: DMA handling
* PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY:
* Created 22/05/98
*/
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <internal/debug.h>
/* FUNCTIONS *****************************************************************/
/* NOTE: IoAllocateAdapterChannel in NTOSKRNL.EXE */
BOOLEAN
STDCALL
IoFlushAdapterBuffers (
PADAPTER_OBJECT AdapterObject,
PMDL Mdl,
PVOID MapRegisterBase,
PVOID CurrentVa,
ULONG Length,
BOOLEAN WriteToDevice
)
{
UNIMPLEMENTED;
}
VOID
STDCALL
IoFreeAdapterChannel (
PADAPTER_OBJECT AdapterObject
)
{
UNIMPLEMENTED;
}
VOID
STDCALL
IoFreeMapRegisters (
PADAPTER_OBJECT AdapterObject,
PVOID MapRegisterBase,
ULONG NumberOfMapRegisters
)
{
UNIMPLEMENTED;
}
PHYSICAL_ADDRESS
STDCALL
IoMapTransfer (
PADAPTER_OBJECT AdapterObject,
PMDL Mdl,
PVOID MapRegisterBase,
PVOID CurrentVa,
PULONG Length,
BOOLEAN WriteToDevice
)
{
UNIMPLEMENTED;
}
/* EOF */

View file

@ -0,0 +1,33 @@
/* $Id: drive.c,v 1.1 2000/03/26 19:38:18 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: hal/x86/drive.c
* PURPOSE: Drive letters
* PROGRAMMER:
* UPDATE HISTORY:
* 2000-03-25
*/
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <internal/debug.h>
/* FUNCTIONS *****************************************************************/
VOID
STDCALL
IoAssignDriveLetters (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3
)
{
UNIMPLEMENTED;
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: irq.c,v 1.9 2000/03/20 17:59:42 ekohl Exp $ /* $Id: irq.c,v 1.10 2000/03/26 19:38:18 ea Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -233,7 +233,9 @@ static VOID KeDumpIrqList(VOID)
} }
} }
NTSTATUS IoConnectInterrupt(PKINTERRUPT* InterruptObject, NTSTATUS
STDCALL
IoConnectInterrupt(PKINTERRUPT* InterruptObject,
PKSERVICE_ROUTINE ServiceRoutine, PKSERVICE_ROUTINE ServiceRoutine,
PVOID ServiceContext, PVOID ServiceContext,
PKSPIN_LOCK SpinLock, PKSPIN_LOCK SpinLock,
@ -350,7 +352,9 @@ NTSTATUS IoConnectInterrupt(PKINTERRUPT* InterruptObject,
} }
VOID IoDisconnectInterrupt(PKINTERRUPT InterruptObject) VOID
STDCALL
IoDisconnectInterrupt(PKINTERRUPT InterruptObject)
/* /*
* FUNCTION: Releases a drivers isr * FUNCTION: Releases a drivers isr
* ARGUMENTS: * ARGUMENTS:

View file

@ -0,0 +1,59 @@
/* $Id: parttab.c,v 1.1 2000/03/26 19:38:18 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/parttab.c (was ntoskrnl/io/fdisk.c)
* PURPOSE: Handling fixed disks (partition table functions)
* PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY:
* Created 22/05/98
* 2000-03-25 (ea)
* Moved here from ntoskrnl/io/fdisk.c
*/
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <internal/debug.h>
/* FUNCTIONS *****************************************************************/
NTSTATUS
STDCALL
IoReadPartitionTable (
PDEVICE_OBJECT DeviceObject,
ULONG SectorSize,
BOOLEAN ReturnRecognizedPartitions,
struct _DRIVE_LAYOUT_INFORMATION ** PBuffer
)
{
UNIMPLEMENTED;
}
NTSTATUS
STDCALL
IoSetPartitionInformation (
PDEVICE_OBJECT DeviceObject,
ULONG SectorSize,
ULONG PartitionNumber,
ULONG PartitionType)
{
UNIMPLEMENTED;
}
NTSTATUS
STDCALL
IoWritePartitionTable (
PDEVICE_OBJECT DeviceObject,
ULONG SectorSize,
ULONG SectorsPerTrack,
ULONG NumberOfHeads,
struct _DRIVE_LAYOUT_INFORMATION * PBuffer
)
{
UNIMPLEMENTED;
}
/* EOF */

View file

@ -0,0 +1,114 @@
/* $Id: pwroff.c,v 1.1 2000/03/26 19:38:19 ea Exp $
*
* FILE : reactos/hal/x86/apm.c
* DESCRIPTION: Turn CPU off...
* PROJECT : ReactOS Operating System
* AUTHOR : D. Lindauer (July 11 1997)
* NOTE : This program is public domain
* REVISIONS :
* 1999-12-26
*/
#define APM_FUNCTION_AVAILABLE 0x5300
#define APM_FUNCTION_CONNREAL 0x5301
#define APM_FUNCTION_POWEROFF 0x5307
#define APM_FUNCTION_ENABLECPU 0x530d
#define APM_FUNCTION_ENABLEAPM 0x530e
#define APM_DEVICE_BIOS 0
#define APM_DEVICE_ALL 1
#define APM_MODE_DISABLE 0
#define APM_MODE_ENABLE 1
nopm db 'No power management functionality',10,13,'$'
errmsg db 'Power management error',10,13,'$'
wrongver db 'Need APM version 1.1 or better',10,13,'$'
;
; Entry point
;
go:
mov dx,offset nopm
jc error
cmp ax,101h ; See if version 1.1 or greater
mov dx,offset wrongver
jc error
mov [ver],ax
mov ax,5301h ; Do a real mode connection
mov bx,0 ; device = BIOS
int 15h
jnc noconerr
cmp ah,2 ; Pass if already connected
mov dx,offset errmsg ; else error
jnz error
noconerr:
mov ax,530eh ; Enable latest version of APM
mov bx,0 ; device = BIOS
mov cx,[ver] ; version
int 15h
mov dx,offset errmsg
jc error
mov ax,530dh ; Now engage and enable CPU management
mov bx,1 ; device = all
mov cx,1 ; enable
int 15h
mov dx,offset errmsg
jc error
mov ax,530fh
mov bx,1 ; device = ALL
mov cx,1 ; enable
int 15h
mov dx,offset errmsg
jc error
mov dx,offset errmsg
error:
call print
mov ax,4c01h
int 21h
int 3
end start
BOOLEAN
ApmCall (
DWORD Function,
DWORD Device,
DWORD Mode
)
{
/* AX <== Function */
/* BX <== Device */
/* CX <== Mode */
__asm__("int 21\n"); /* 0x15 */
}
BOOLEAN
HalPowerOff (VOID)
{
ApmCall (
APM_FUNCTION_AVAILABLE,
APM_DEVICE_BIOS,
0
);
ApmCall (
APM_FUNCTION_ENABLEAPM,
);
/* Shutdown CPU */
ApmCall (
APM_FUNCTION_POWEROFF,
APM_DEVICE_ALL,
3
);
return TRUE;
}
/* EOF */

View file

@ -4,4 +4,5 @@ HAL_OBJECTS = hal/x86/irq.o hal/x86/isa.o \
hal/x86/mp.o hal/x86/dma.o hal/x86/bus.o hal/x86/mbr.o \ hal/x86/mp.o hal/x86/dma.o hal/x86/bus.o hal/x86/mbr.o \
hal/x86/sysinfo.o hal/x86/time.o hal/x86/beep.o \ hal/x86/sysinfo.o hal/x86/time.o hal/x86/beep.o \
hal/x86/display.o hal/x86/reboot.o hal/x86/kdbg.o \ hal/x86/display.o hal/x86/reboot.o hal/x86/kdbg.o \
hal/x86/portio.o hal/x86/misc.o hal/x86/portio.o hal/x86/misc.o hal/x86/parttab.o \
hal/x86/adapter.o hal/x86/drive.o

View file

@ -1,4 +1,5 @@
/* /* $Id: adapter.c,v 1.2 2000/03/26 19:38:20 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/adapter.c * FILE: ntoskrnl/io/adapter.c
@ -14,45 +15,30 @@
#include <internal/debug.h> #include <internal/debug.h>
/* DATA **********************************************************************/
POBJECT_TYPE EXPORTED IoAdapterObjectType = NULL; /* FIXME */
POBJECT_TYPE EXPORTED IoDeviceHandlerObjectType = NULL; /* FIXME */
USHORT EXPORTED IoDeviceHandlerObjectSize = 0; /* FIXME */
ULONG EXPORTED IoReadOperationCount = 0; /* FIXME */
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
NTSTATUS IoAllocateAdapterChannel(PADAPTER_OBJECT AdapterObject, NTSTATUS
PDEVICE_OBJECT DeviceObject, STDCALL
ULONG NumberOfMapRegisters, IoAllocateAdapterChannel (
PDRIVER_CONTROL ExecutionRoutine, PADAPTER_OBJECT AdapterObject,
PVOID Context) PDEVICE_OBJECT DeviceObject,
ULONG NumberOfMapRegisters,
PDRIVER_CONTROL ExecutionRoutine,
PVOID Context
)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
BOOLEAN IoFlushAdapterBuffers(PADAPTER_OBJECT AdapterObject,
PMDL Mdl,
PVOID MapRegisterBase,
PVOID CurrentVa,
ULONG Length,
BOOLEAN WriteToDevice)
{
UNIMPLEMENTED;
}
PHYSICAL_ADDRESS IoMapTransfer(PADAPTER_OBJECT AdapterObject, /* NOTE: Missing IoXXXAdapter finctions in HAL.DLL */
PMDL Mdl,
PVOID MapRegisterBase,
PVOID CurrentVa,
PULONG Length,
BOOLEAN WriteToDevice)
{
UNIMPLEMENTED;
}
VOID IoFreeAdapterChannel(PADAPTER_OBJECT AdapterObject)
{
UNIMPLEMENTED;
}
VOID IoFreeMapRegisters(PADAPTER_OBJECT AdapterObject, /* EOF */
PVOID MapRegisterBase,
ULONG NumberOfMapRegisters)
{
UNIMPLEMENTED;
}

View file

@ -1,4 +1,5 @@
/* /* $Id: buildirp.c,v 1.20 2000/03/26 19:38:21 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/buildirp.c * FILE: ntoskrnl/io/buildirp.c
@ -121,7 +122,9 @@ PIRP IoBuildFilesystemControlRequest(ULONG MinorFunction,
return(Irp); return(Irp);
} }
PIRP IoBuildAsynchronousFsdRequest(ULONG MajorFunction, PIRP
STDCALL
IoBuildAsynchronousFsdRequest(ULONG MajorFunction,
PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT DeviceObject,
PVOID Buffer, PVOID Buffer,
ULONG Length, ULONG Length,
@ -208,7 +211,9 @@ PIRP IoBuildAsynchronousFsdRequest(ULONG MajorFunction,
return(Irp); return(Irp);
} }
PIRP IoBuildDeviceIoControlRequest(ULONG IoControlCode, PIRP
STDCALL
IoBuildDeviceIoControlRequest(ULONG IoControlCode,
PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT DeviceObject,
PVOID InputBuffer, PVOID InputBuffer,
ULONG InputBufferLength, ULONG InputBufferLength,
@ -367,7 +372,9 @@ PIRP IoBuildDeviceIoControlRequest(ULONG IoControlCode,
return(Irp); return(Irp);
} }
PIRP IoBuildSynchronousFsdRequest(ULONG MajorFunction, PIRP
STDCALL
IoBuildSynchronousFsdRequest(ULONG MajorFunction,
PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT DeviceObject,
PVOID Buffer, PVOID Buffer,
ULONG Length, ULONG Length,
@ -538,3 +545,6 @@ PIRP IoBuildSynchronousFsdRequestWithMdl(ULONG MajorFunction,
return(Irp); return(Irp);
} }
/* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: cancel.c,v 1.4 2000/03/26 19:38:21 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/cancel.c * FILE: ntoskrnl/io/cancel.c
@ -31,7 +32,7 @@ NtCancelIoFile (
UNIMPLEMENTED; UNIMPLEMENTED;
} }
BOOLEAN IoCancelIrp(PIRP Irp) BOOLEAN STDCALL IoCancelIrp(PIRP Irp)
{ {
KIRQL oldlvl; KIRQL oldlvl;
@ -53,12 +54,12 @@ VOID IoInitCancelHandling(VOID)
KeInitializeSpinLock(&CancelSpinLock); KeInitializeSpinLock(&CancelSpinLock);
} }
VOID IoAcquireCancelSpinLock(PKIRQL Irql) VOID STDCALL IoAcquireCancelSpinLock(PKIRQL Irql)
{ {
KeAcquireSpinLock(&CancelSpinLock,Irql); KeAcquireSpinLock(&CancelSpinLock,Irql);
} }
VOID IoReleaseCancelSpinLock(KIRQL Irql) VOID STDCALL IoReleaseCancelSpinLock(KIRQL Irql)
{ {
KeReleaseSpinLock(&CancelSpinLock,Irql); KeReleaseSpinLock(&CancelSpinLock,Irql);
} }
@ -68,3 +69,6 @@ PDRIVER_CANCEL IoSetCancelRoutine(PIRP Irp, PDRIVER_CANCEL CancelRoutine)
return((PDRIVER_CANCEL)InterlockedExchange((PULONG)&Irp->CancelRoutine, return((PDRIVER_CANCEL)InterlockedExchange((PULONG)&Irp->CancelRoutine,
(ULONG)CancelRoutine)); (ULONG)CancelRoutine));
} }
/* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: cntrller.c,v 1.4 2000/03/26 19:38:21 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/cntrller.c * FILE: ntoskrnl/io/cntrller.c
@ -29,7 +30,9 @@ typedef struct
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
VOID IoAllocateController(PCONTROLLER_OBJECT ControllerObject, VOID
STDCALL
IoAllocateController(PCONTROLLER_OBJECT ControllerObject,
PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT DeviceObject,
PDRIVER_CONTROL ExecutionRoutine, PDRIVER_CONTROL ExecutionRoutine,
PVOID Context) PVOID Context)
@ -71,7 +74,9 @@ VOID IoAllocateController(PCONTROLLER_OBJECT ControllerObject,
ExFreePool(entry); ExFreePool(entry);
} }
PCONTROLLER_OBJECT IoCreateController(ULONG Size) PCONTROLLER_OBJECT
STDCALL
IoCreateController(ULONG Size)
/* /*
* FUNCTION: Allocates memory and initializes a controller object * FUNCTION: Allocates memory and initializes a controller object
* ARGUMENTS: * ARGUMENTS:
@ -100,7 +105,9 @@ PCONTROLLER_OBJECT IoCreateController(ULONG Size)
return(controller); return(controller);
} }
VOID IoDeleteController(PCONTROLLER_OBJECT ControllerObject) VOID
STDCALL
IoDeleteController(PCONTROLLER_OBJECT ControllerObject)
/* /*
* FUNCTION: Removes a given controller object from the system * FUNCTION: Removes a given controller object from the system
* ARGUMENTS: * ARGUMENTS:
@ -113,7 +120,9 @@ VOID IoDeleteController(PCONTROLLER_OBJECT ControllerObject)
ExFreePool(ControllerObject); ExFreePool(ControllerObject);
} }
VOID IoFreeController(PCONTROLLER_OBJECT ControllerObject) VOID
STDCALL
IoFreeController(PCONTROLLER_OBJECT ControllerObject)
/* /*
* FUNCTION: Releases a previously allocated controller object when a * FUNCTION: Releases a previously allocated controller object when a
* device has finished an I/O request * device has finished an I/O request
@ -141,3 +150,5 @@ VOID IoFreeController(PCONTROLLER_OBJECT ControllerObject)
} while (Result == DeallocateObject); } while (Result == DeallocateObject);
} }
/* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: create.c,v 1.29 2000/03/26 19:38:21 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/create.c * FILE: ntoskrnl/io/create.c
@ -21,12 +22,279 @@
/* FUNCTIONS *************************************************************/ /* FUNCTIONS *************************************************************/
NTSTATUS STDCALL NtDeleteFile(IN POBJECT_ATTRIBUTES ObjectAttributes) /**********************************************************************
* NAME EXPORTED
* NtDeleteFile@4
*
* DESCRIPTION
*
* ARGUMENTS
* ObjectAttributes
* ?
*
* RETURN VALUE
*
* REVISIONS
*
*/
NTSTATUS
STDCALL
NtDeleteFile (
IN POBJECT_ATTRIBUTES ObjectAttributes
)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
/**********************************************************************
* NAME INTERNAL
* IopCreateFile
*
* DESCRIPTION
*
* ARGUMENTS
*
* RETURN VALUE
*
* REVISIONS
*
*/
NTSTATUS
IopCreateFile (
PVOID ObjectBody,
PVOID Parent,
PWSTR RemainingPath,
POBJECT_ATTRIBUTES ObjectAttributes
)
{
PDEVICE_OBJECT DeviceObject = (PDEVICE_OBJECT) Parent;
PFILE_OBJECT FileObject = (PFILE_OBJECT) ObjectBody;
NTSTATUS Status;
DPRINT(
"IopCreateFile(ObjectBody %x, Parent %x, RemainingPath %S)\n",
ObjectBody,
Parent,
RemainingPath
);
if (NULL == DeviceObject)
{
DPRINT("DeviceObject was NULL\n");
return (STATUS_SUCCESS);
}
if (IoDeviceObjectType != BODY_TO_HEADER(Parent)->ObjectType)
{
DPRINT ("Parent is not a device type\n");
return (STATUS_UNSUCCESSFUL);
}
Status = ObReferenceObjectByPointer (
DeviceObject,
STANDARD_RIGHTS_REQUIRED,
IoDeviceObjectType,
UserMode
);
if (STATUS_SUCCESS != Status)
{
CHECKPOINT;
return (Status);
}
DeviceObject = IoGetAttachedDevice (DeviceObject);
DPRINT ("DeviceObject %x\n", DeviceObject);
if (NULL == RemainingPath)
{
FileObject->Flags = FileObject->Flags | FO_DIRECT_DEVICE_OPEN;
FileObject->FileName.Buffer = ExAllocatePool(NonPagedPool,
(ObjectAttributes->ObjectName->Length+1)*2);
FileObject->FileName.Length = ObjectAttributes->ObjectName->Length;
FileObject->FileName.MaximumLength =
ObjectAttributes->ObjectName->MaximumLength;
RtlCopyUnicodeString(&(FileObject->FileName),
ObjectAttributes->ObjectName);
}
else
{
if ( (DeviceObject->DeviceType != FILE_DEVICE_FILE_SYSTEM)
&& (DeviceObject->DeviceType != FILE_DEVICE_DISK)
)
{
DPRINT ("Device was wrong type\n");
return (STATUS_UNSUCCESSFUL);
}
if (!(DeviceObject->Vpb->Flags & VPB_MOUNTED))
{
DPRINT("Trying to mount storage device\n");
Status = IoTryToMountStorageDevice (DeviceObject);
DPRINT("Status %x\n", Status);
if (!NT_SUCCESS(Status))
{
DPRINT(
"Failed to mount storage device (statux %x)\n",
Status
);
return (Status);
}
DeviceObject = IoGetAttachedDevice(DeviceObject);
}
RtlInitUnicodeString (
& (FileObject->FileName),
wcsdup (RemainingPath)
);
}
DPRINT(
"FileObject->FileName.Buffer %S\n",
FileObject->FileName.Buffer
);
FileObject->DeviceObject = DeviceObject;
DPRINT(
"FileObject %x DeviceObject %x\n",
FileObject,
DeviceObject
);
FileObject->Vpb = DeviceObject->Vpb;
FileObject->Type = InternalFileType;
return (STATUS_SUCCESS);
}
/**********************************************************************
* NAME EXPORTED
* IoCreateStreamFileObject@8
*
* DESCRIPTION
*
* ARGUMENTS
* FileObject
* ?
*
* DeviceObject
* ?
*
* RETURN VALUE
*
* NOTE
*
* REVISIONS
*
*/
PFILE_OBJECT
STDCALL
IoCreateStreamFileObject (
PFILE_OBJECT FileObject,
PDEVICE_OBJECT DeviceObject
)
{
HANDLE FileHandle;
PFILE_OBJECT CreatedFileObject;
DbgPrint("IoCreateStreamFileObject(FileObject %x, DeviceObject %x)\n",
FileObject,
DeviceObject
);
assert_irql (PASSIVE_LEVEL);
CreatedFileObject = ObCreateObject (
& FileHandle,
STANDARD_RIGHTS_REQUIRED,
NULL,
IoFileObjectType
);
if (NULL == CreatedFileObject)
{
return (NULL);
}
if (FileObject != NULL)
{
DeviceObject = FileObject->DeviceObject;
}
DeviceObject = IoGetAttachedDevice(DeviceObject);
CreatedFileObject->DeviceObject = DeviceObject;
CreatedFileObject->Vpb = DeviceObject->Vpb;
CreatedFileObject->Type = InternalFileType;
//CreatedFileObject->Flags = CreatedFileObject->Flags | FO_DIRECT_DEVICE_OPEN;
CreatedFileObject->Flags |= FO_DIRECT_DEVICE_OPEN;
ZwClose (FileHandle);
return (CreatedFileObject);
}
/**********************************************************************
* NAME EXPORTED
* IoCreateFile@56
*
* DESCRIPTION
* Either causes a new file or directory to be created, or it
* opens an existing file, device, directory or volume, giving
* the caller a handle for the file object. This handle can be
* used by subsequent calls to manipulate data within the file
* or the file object's state of attributes.
*
* ARGUMENTS
* FileHandle (OUT)
* Points to a variable which receives the file handle
* on return;
*
* DesiredAccess
* Desired access to the file;
*
* ObjectAttributes
* Structure describing the file;
*
* IoStatusBlock (OUT)
* Receives information about the operation on return;
*
* AllocationSize [OPTIONAL]
* Initial size of the file in bytes;
*
* FileAttributes
* Attributes to create the file with;
*
* ShareAccess
* Type of shared access the caller would like to the
* file;
*
* CreateDisposition
* Specifies what to do, depending on whether the
* file already exists;
*
* CreateOptions
* Options for creating a new file;
*
* EaBuffer [OPTIONAL]
* Undocumented;
*
* EaLength
* Undocumented;
*
* CreateFileType
* Undocumented;
*
* ExtraCreateParameters
* Undocumented;
*
* Options
* Undocumented.
*
* RETURN VALUE
* Status
*
* NOTE
* Prototype taken from Bo Branten's ntifs.h v15.
* Description taken from old NtCreateFile's which is
* now a wrapper of this call.
*
* REVISIONS
*
*/
NTSTATUS NTSTATUS
STDCALL STDCALL
IoCreateFile ( IoCreateFile (
@ -42,128 +310,135 @@ IoCreateFile (
IN PVOID EaBuffer OPTIONAL, IN PVOID EaBuffer OPTIONAL,
IN ULONG EaLength, IN ULONG EaLength,
IN CREATE_FILE_TYPE CreateFileType, IN CREATE_FILE_TYPE CreateFileType,
IN ULONG ExtraCreateParameters, IN PVOID ExtraCreateParameters OPTIONAL,
IN ULONG Options IN ULONG Options
) )
{ {
UNIMPLEMENTED; PFILE_OBJECT FileObject;
NTSTATUS Status;
PIRP Irp;
KEVENT Event;
PIO_STACK_LOCATION StackLoc;
DPRINT1("IoCreateFile(FileHandle %x, DesiredAccess %x, "
"ObjectAttributes %x ObjectAttributes->ObjectName->Buffer %S)\n",
FileHandle,DesiredAccess,ObjectAttributes,
ObjectAttributes->ObjectName->Buffer);
assert_irql(PASSIVE_LEVEL);
*FileHandle = 0;
FileObject = ObCreateObject (
FileHandle,
DesiredAccess,
ObjectAttributes,
IoFileObjectType
);
if (NULL == FileObject)
{
return (STATUS_UNSUCCESSFUL);
}
if (CreateOptions & FILE_SYNCHRONOUS_IO_ALERT)
{
//FileObject->Flags = FileObject->Flags | FO_ALERTABLE_IO;
//FileObject->Flags = FileObject->Flags | FO_SYNCHRONOUS_IO;
FileObject->Flags |= ( FO_ALERTABLE_IO
| FO_SYNCHRONOUS_IO
);
}
if (CreateOptions & FILE_SYNCHRONOUS_IO_NONALERT)
{
//FileObject->Flags |= FileObject->Flags | FO_SYNCHRONOUS_IO;
FileObject->Flags |= FO_SYNCHRONOUS_IO;
}
KeInitializeEvent (
& Event,
NotificationEvent,
FALSE
);
DPRINT("FileObject %x\n", FileObject);
DPRINT("FileObject->DeviceObject %x\n", FileObject->DeviceObject);
/*
* Create a new IRP to hand to
* the FS driver: this may fail
* due to resource shortage.
*/
Irp = IoAllocateIrp (
FileObject->DeviceObject->StackSize,
FALSE
);
if (NULL == Irp)
{
return (STATUS_UNSUCCESSFUL);
}
/*
* Get the stack location for the new
* IRP and prepare it.
*/
StackLoc = IoGetNextIrpStackLocation (Irp);
StackLoc->MajorFunction = IRP_MJ_CREATE;
StackLoc->MinorFunction = 0;
StackLoc->Flags = 0;
StackLoc->Control = 0;
StackLoc->DeviceObject = FileObject->DeviceObject;
StackLoc->FileObject = FileObject;
StackLoc->Parameters.Create.Options = (CreateOptions & FILE_VALID_OPTION_FLAGS);
StackLoc->Parameters.Create.Options |= (CreateDisposition << 24);
/*
* Now call the driver and
* possibly wait if it can
* not complete the request
* immediately.
*/
Status = IofCallDriver (
FileObject->DeviceObject,
Irp
);
if (STATUS_PENDING == Status)
{
KeWaitForSingleObject (
& Event,
Executive,
KernelMode,
FALSE,
NULL
);
Status = IoStatusBlock->Status;
}
if (!NT_SUCCESS(Status))
{
DPRINT("Failing create request with status %x\n", Status);
ZwClose (*FileHandle);
(*FileHandle) = 0;
}
assert_irql(PASSIVE_LEVEL);
DPRINT("Finished IoCreateFile() (*FileHandle) %x\n", (*FileHandle));
return (Status);
} }
NTSTATUS IopCreateFile(PVOID ObjectBody, /**********************************************************************
PVOID Parent, * NAME EXPORTED
PWSTR RemainingPath, * NtCreateFile@44
POBJECT_ATTRIBUTES ObjectAttributes) *
{ * DESCRIPTION
PDEVICE_OBJECT DeviceObject = (PDEVICE_OBJECT)Parent; * Entry point to call IoCreateFile with
PFILE_OBJECT FileObject = (PFILE_OBJECT)ObjectBody; * default parameters.
NTSTATUS Status; *
* ARGUMENTS
DPRINT("IopCreateFile(ObjectBody %x, Parent %x, RemainingPath %S)\n", * See IoCreateFile.
ObjectBody,Parent,RemainingPath); *
* RETURN VALUE
if (DeviceObject == NULL) * See IoCreateFile.
{ *
DPRINT("DeviceObject was NULL\n"); * REVISIONS
return(STATUS_SUCCESS); * 2000-03-25 (ea)
} * Code originally in NtCreateFile moved in IoCreateFile.
if( BODY_TO_HEADER( Parent )->ObjectType != IoDeviceType ) */
{
DPRINT( "Parent is not a device type\n" );
return STATUS_UNSUCCESSFUL;
}
Status = ObReferenceObjectByPointer(DeviceObject,
STANDARD_RIGHTS_REQUIRED,
IoDeviceType,
UserMode);
if (Status != STATUS_SUCCESS)
{
CHECKPOINT;
return(Status);
}
DeviceObject = IoGetAttachedDevice(DeviceObject);
DPRINT("DeviceObject %x\n",DeviceObject);
if (RemainingPath == NULL)
{
FileObject->Flags = FileObject->Flags | FO_DIRECT_DEVICE_OPEN;
FileObject->FileName.Buffer = ExAllocatePool(NonPagedPool,
(ObjectAttributes->ObjectName->Length+1)*2);
FileObject->FileName.Length = ObjectAttributes->ObjectName->Length;
FileObject->FileName.MaximumLength =
ObjectAttributes->ObjectName->MaximumLength;
RtlCopyUnicodeString(&(FileObject->FileName),
ObjectAttributes->ObjectName);
}
else
{
if (DeviceObject->DeviceType != FILE_DEVICE_FILE_SYSTEM &&
DeviceObject->DeviceType != FILE_DEVICE_DISK)
{
DPRINT("Device was wrong type\n");
return(STATUS_UNSUCCESSFUL);
}
if (!(DeviceObject->Vpb->Flags & VPB_MOUNTED))
{
DPRINT("Trying to mount storage device\n");
Status = IoTryToMountStorageDevice(DeviceObject);
DPRINT("Status %x\n", Status);
if (!NT_SUCCESS(Status))
{
DPRINT("Failed to mount storage device (statux %x)\n",
Status);
return(Status);
}
DeviceObject = IoGetAttachedDevice(DeviceObject);
}
RtlInitUnicodeString(&(FileObject->FileName),wcsdup(RemainingPath));
}
DPRINT("FileObject->FileName.Buffer %S\n",FileObject->FileName.Buffer);
FileObject->DeviceObject = DeviceObject;
DPRINT("FileObject %x DeviceObject %x\n", FileObject, DeviceObject);
FileObject->Vpb = DeviceObject->Vpb;
FileObject->Type = InternalFileType;
return(STATUS_SUCCESS);
}
PFILE_OBJECT IoCreateStreamFileObject(PFILE_OBJECT FileObject,
PDEVICE_OBJECT DeviceObject)
{
HANDLE FileHandle;
PFILE_OBJECT CreatedFileObject;
DbgPrint("IoCreateStreamFileObject(FileObject %x, DeviceObject %x)\n",
FileObject, DeviceObject);
assert_irql(PASSIVE_LEVEL);
CreatedFileObject = ObCreateObject(&FileHandle,
STANDARD_RIGHTS_REQUIRED,
NULL,
IoFileType);
if (CreatedFileObject == NULL)
{
return(NULL);
}
if (FileObject != NULL)
{
DeviceObject = FileObject->DeviceObject;
}
DeviceObject = IoGetAttachedDevice(DeviceObject);
CreatedFileObject->DeviceObject = DeviceObject;
CreatedFileObject->Vpb = DeviceObject->Vpb;
CreatedFileObject->Type = InternalFileType;
CreatedFileObject->Flags = CreatedFileObject->Flags | FO_DIRECT_DEVICE_OPEN;
ZwClose(FileHandle);
return(CreatedFileObject);
}
NTSTATUS NTSTATUS
STDCALL STDCALL
NtCreateFile ( NtCreateFile (
@ -179,134 +454,88 @@ NtCreateFile (
PVOID EaBuffer, PVOID EaBuffer,
ULONG EaLength ULONG EaLength
) )
/*
* FUNCTION: Either causes a new file or directory to be created, or it opens
* an existing file, device, directory or volume, giving the caller a handle
* for the file object. This handle can be used by subsequent calls to
* manipulate data within the file or the file object's state of attributes.
* ARGUMENTS:
* FileHandle (OUT) = Points to a variable which receives the file
* handle on return
* DesiredAccess = Desired access to the file
* ObjectAttributes = Structure describing the file
* IoStatusBlock (OUT) = Receives information about the operation on
* return
* AllocationSize = Initial size of the file in bytes
* FileAttributes = Attributes to create the file with
* ShareAccess = Type of shared access the caller would like to the file
* CreateDisposition = Specifies what to do, depending on whether the
* file already exists
* CreateOptions = Options for creating a new file
* EaBuffer = Undocumented
* EaLength = Undocumented
* RETURNS: Status
*/
{ {
PFILE_OBJECT FileObject; return IoCreateFile (
NTSTATUS Status; FileHandle,
PIRP Irp; DesiredAccess,
KEVENT Event; ObjectAttributes,
PIO_STACK_LOCATION StackLoc; IoStatusBlock,
AllocateSize,
DPRINT1("NtCreateFile(FileHandle %x, DesiredAccess %x, " FileAttributes,
"ObjectAttributes %x ObjectAttributes->ObjectName->Buffer %S)\n", ShareAccess,
FileHandle,DesiredAccess,ObjectAttributes, CreateDisposition,
ObjectAttributes->ObjectName->Buffer); CreateOptions,
EaBuffer,
assert_irql(PASSIVE_LEVEL); EaLength,
0, /* CreateFileType */
*FileHandle=0; NULL, /* ExtraCreateParameters */
0 /* Options */
);
FileObject = ObCreateObject(FileHandle,
DesiredAccess,
ObjectAttributes,
IoFileType);
if (FileObject == NULL)
{
return(STATUS_UNSUCCESSFUL);
}
if (CreateOptions & FILE_SYNCHRONOUS_IO_ALERT)
{
FileObject->Flags = FileObject->Flags | FO_ALERTABLE_IO;
FileObject->Flags = FileObject->Flags | FO_SYNCHRONOUS_IO;
}
if (CreateOptions & FILE_SYNCHRONOUS_IO_NONALERT)
{
FileObject->Flags = FileObject->Flags | FO_SYNCHRONOUS_IO;
}
KeInitializeEvent(&Event, NotificationEvent, FALSE);
DPRINT("FileObject %x\n", FileObject);
DPRINT("FileObject->DeviceObject %x\n", FileObject->DeviceObject);
Irp = IoAllocateIrp(FileObject->DeviceObject->StackSize, FALSE);
if (Irp==NULL)
{
return(STATUS_UNSUCCESSFUL);
}
StackLoc = IoGetNextIrpStackLocation(Irp);
StackLoc->MajorFunction = IRP_MJ_CREATE;
StackLoc->MinorFunction = 0;
StackLoc->Flags = 0;
StackLoc->Control = 0;
StackLoc->DeviceObject = FileObject->DeviceObject;
StackLoc->FileObject = FileObject;
StackLoc->Parameters.Create.Options = CreateOptions&FILE_VALID_OPTION_FLAGS;
StackLoc->Parameters.Create.Options |= CreateDisposition<<24;
Status = IoCallDriver(FileObject->DeviceObject,Irp);
if (Status == STATUS_PENDING)
{
KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL);
Status = IoStatusBlock->Status;
}
if (!NT_SUCCESS(Status))
{
DPRINT("Failing create request with status %x\n",Status);
ZwClose(*FileHandle);
(*FileHandle) = 0;
}
assert_irql(PASSIVE_LEVEL);
DPRINT("Finished NtCreateFile() (*FileHandle) %x\n",(*FileHandle));
return(Status);
} }
NTSTATUS STDCALL NtOpenFile(PHANDLE FileHandle, /**********************************************************************
ACCESS_MASK DesiredAccess, * NAME EXPORTED
POBJECT_ATTRIBUTES ObjectAttributes, * NtOpenFile@24
PIO_STATUS_BLOCK IoStatusBlock, *
ULONG ShareAccess, * DESCRIPTION
ULONG OpenOptions) * Opens a file (simpler than NtCreateFile).
/* *
* FUNCTION: Opens a file (simpler than ZwCreateFile) * ARGUMENTS
* ARGUMENTS: * FileHandle (OUT)
* FileHandle (OUT) = Variable that receives the file handle on return * Variable that receives the file handle on return;
* DesiredAccess = Access desired by the caller to the file *
* ObjectAttributes = Structue describing the file to be opened * DesiredAccess
* IoStatusBlock (OUT) = Receives details about the result of the * Access desired by the caller to the file;
* operation *
* ShareAccess = Type of shared access the caller requires * ObjectAttributes
* OpenOptions = Options for the file open * Structue describing the file to be opened;
* RETURNS: Status *
* NOTE: Undocumented * IoStatusBlock (OUT)
* Receives details about the result of the
* operation;
*
* ShareAccess
* Type of shared access the caller requires;
*
* OpenOptions
* Options for the file open.
*
* RETURN VALUE
* Status.
*
* NOTE
* Undocumented.
*/ */
NTSTATUS
STDCALL
NtOpenFile (
PHANDLE FileHandle,
ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes,
PIO_STATUS_BLOCK IoStatusBlock,
ULONG ShareAccess,
ULONG OpenOptions
)
{ {
return(ZwCreateFile(FileHandle, return IoCreateFile (
DesiredAccess, FileHandle,
ObjectAttributes, DesiredAccess,
IoStatusBlock, ObjectAttributes,
NULL, IoStatusBlock,
0, NULL,
ShareAccess, 0,
FILE_OPEN, ShareAccess,
OpenOptions, FILE_OPEN,
NULL, OpenOptions,
0)); NULL,
0,
0, /* CreateFileType */
NULL, /* ExtraCreateParameters */
0 /* Options */
);
} }
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: device.c,v 1.15 2000/03/05 19:17:42 ea Exp $ /* $Id: device.c,v 1.16 2000/03/26 19:38:22 ea Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -22,6 +22,7 @@
#define NDEBUG #define NDEBUG
#include <internal/debug.h> #include <internal/debug.h>
/* FUNCTIONS ***************************************************************/ /* FUNCTIONS ***************************************************************/
@ -54,14 +55,18 @@ NTSTATUS STDCALL NtLoadDriver (PUNICODE_STRING DriverServiceName)
} }
NTSTATUS IoAttachDeviceByPointer(PDEVICE_OBJECT SourceDevice, NTSTATUS
STDCALL
IoAttachDeviceByPointer(PDEVICE_OBJECT SourceDevice,
PDEVICE_OBJECT TargetDevice) PDEVICE_OBJECT TargetDevice)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
VOID IoDeleteDevice(PDEVICE_OBJECT DeviceObject) VOID
STDCALL
IoDeleteDevice(PDEVICE_OBJECT DeviceObject)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
@ -77,7 +82,9 @@ IoGetRelatedDeviceObject (
} }
NTSTATUS IoGetDeviceObjectPointer(PUNICODE_STRING ObjectName, NTSTATUS
STDCALL
IoGetDeviceObjectPointer(PUNICODE_STRING ObjectName,
ACCESS_MASK DesiredAccess, ACCESS_MASK DesiredAccess,
PFILE_OBJECT* FileObject, PFILE_OBJECT* FileObject,
PDEVICE_OBJECT* DeviceObject) PDEVICE_OBJECT* DeviceObject)
@ -85,12 +92,16 @@ NTSTATUS IoGetDeviceObjectPointer(PUNICODE_STRING ObjectName,
UNIMPLEMENTED; UNIMPLEMENTED;
} }
VOID IoDetachDevice(PDEVICE_OBJECT TargetDevice) VOID
STDCALL
IoDetachDevice(PDEVICE_OBJECT TargetDevice)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
PDEVICE_OBJECT IoGetAttachedDevice(PDEVICE_OBJECT DeviceObject) PDEVICE_OBJECT
STDCALL
IoGetAttachedDevice(PDEVICE_OBJECT DeviceObject)
{ {
PDEVICE_OBJECT Current = DeviceObject; PDEVICE_OBJECT Current = DeviceObject;
@ -106,7 +117,9 @@ PDEVICE_OBJECT IoGetAttachedDevice(PDEVICE_OBJECT DeviceObject)
return(Current); return(Current);
} }
PDEVICE_OBJECT IoAttachDeviceToDeviceStack(PDEVICE_OBJECT SourceDevice, PDEVICE_OBJECT
STDCALL
IoAttachDeviceToDeviceStack(PDEVICE_OBJECT SourceDevice,
PDEVICE_OBJECT TargetDevice) PDEVICE_OBJECT TargetDevice)
{ {
PDEVICE_OBJECT AttachedDevice; PDEVICE_OBJECT AttachedDevice;
@ -122,7 +135,9 @@ PDEVICE_OBJECT IoAttachDeviceToDeviceStack(PDEVICE_OBJECT SourceDevice,
return(AttachedDevice); return(AttachedDevice);
} }
VOID IoRegisterDriverReinitialization(PDRIVER_OBJECT DriverObject, VOID
STDCALL
IoRegisterDriverReinitialization(PDRIVER_OBJECT DriverObject,
PDRIVER_REINITIALIZE ReinitRoutine, PDRIVER_REINITIALIZE ReinitRoutine,
PVOID Context) PVOID Context)
{ {
@ -174,7 +189,9 @@ NTSTATUS IoInitializeDriver(PDRIVER_INITIALIZE DriverEntry)
return(Status); return(Status);
} }
NTSTATUS IoAttachDevice(PDEVICE_OBJECT SourceDevice, NTSTATUS
STDCALL
IoAttachDevice(PDEVICE_OBJECT SourceDevice,
PUNICODE_STRING TargetDevice, PUNICODE_STRING TargetDevice,
PDEVICE_OBJECT* AttachedDevice) PDEVICE_OBJECT* AttachedDevice)
/* /*
@ -210,7 +227,9 @@ NTSTATUS IopCreateDevice(PVOID ObjectBody,
} }
NTSTATUS IoCreateDevice(PDRIVER_OBJECT DriverObject, NTSTATUS
STDCALL
IoCreateDevice(PDRIVER_OBJECT DriverObject,
ULONG DeviceExtensionSize, ULONG DeviceExtensionSize,
PUNICODE_STRING DeviceName, PUNICODE_STRING DeviceName,
DEVICE_TYPE DeviceType, DEVICE_TYPE DeviceType,
@ -258,14 +277,14 @@ NTSTATUS IoCreateDevice(PDRIVER_OBJECT DriverObject,
CreatedDeviceObject = ObCreateObject(&DeviceHandle, CreatedDeviceObject = ObCreateObject(&DeviceHandle,
0, 0,
&ObjectAttributes, &ObjectAttributes,
IoDeviceType); IoDeviceObjectType);
} }
else else
{ {
CreatedDeviceObject = ObCreateObject(&DeviceHandle, CreatedDeviceObject = ObCreateObject(&DeviceHandle,
0, 0,
NULL, NULL,
IoDeviceType); IoDeviceObjectType);
} }
*DeviceObject = NULL; *DeviceObject = NULL;
@ -316,4 +335,41 @@ NTSTATUS IoCreateDevice(PDRIVER_OBJECT DriverObject,
} }
NTSTATUS
STDCALL
IoOpenDeviceInstanceKey (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4
)
{
UNIMPLEMENTED;
return (STATUS_NOT_IMPLEMENTED);
}
DWORD
STDCALL
IoQueryDeviceEnumInfo (
DWORD Unknown0,
DWORD Unknown1
)
{
UNIMPLEMENTED;
return 0;
}
VOID
STDCALL
IoSetDeviceToVerify (
DWORD Unknown0,
DWORD Unknown1
)
{
UNIMPLEMENTED;
}
/* EOF */ /* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: dir.c,v 1.10 2000/03/26 19:38:22 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/dir.c * FILE: ntoskrnl/io/dir.c
@ -91,7 +92,7 @@ NtQueryDirectoryFile(
Status = ObReferenceObjectByHandle(FileHandle, Status = ObReferenceObjectByHandle(FileHandle,
FILE_LIST_DIRECTORY, FILE_LIST_DIRECTORY,
IoFileType, IoFileObjectType,
UserMode, UserMode,
(PVOID *)&FileObject, (PVOID *)&FileObject,
NULL); NULL);
@ -163,3 +164,6 @@ NTSTATUS STDCALL NtQueryOleDirectoryFile(VOID)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
/* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: errlog.c,v 1.4 2000/03/26 19:38:22 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/errlog.c * FILE: ntoskrnl/io/errlog.c
@ -198,12 +199,12 @@ NTSTATUS IoInitErrorLog(VOID)
} }
PVOID IoAllocateErrorLogEntry(PVOID IoObject, UCHAR EntrySize) PVOID STDCALL IoAllocateErrorLogEntry(PVOID IoObject, UCHAR EntrySize)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
VOID IoWriteErrorLogEntry(PVOID ElEntry) VOID STDCALL IoWriteErrorLogEntry(PVOID ElEntry)
{ {
KIRQL oldIrql; KIRQL oldIrql;
PIO_ERROR_LOG_MESSAGE Message; PIO_ERROR_LOG_MESSAGE Message;
@ -223,3 +224,5 @@ VOID IoWriteErrorLogEntry(PVOID ElEntry)
KeReleaseSpinLock(&ErrorLogListLock, oldIrql); KeReleaseSpinLock(&ErrorLogListLock, oldIrql);
} }
/* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: error.c,v 1.2 2000/03/26 19:38:22 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: kernel/base/bug.c * FILE: kernel/base/bug.c
@ -32,12 +33,12 @@ BOOLEAN IoIsErrorUserInduced(NTSTATUS Status)
return(FALSE); return(FALSE);
} }
VOID IoSetHardErrorOrVerifyDevice(PIRP Irp, PDEVICE_OBJECT DeviceObject) VOID STDCALL IoSetHardErrorOrVerifyDevice(PIRP Irp, PDEVICE_OBJECT DeviceObject)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
VOID IoRaiseHardError(PIRP Irp, PVPB Vpb, PDEVICE_OBJECT RealDeviceObject) VOID STDCALL IoRaiseHardError(PIRP Irp, PVPB Vpb, PDEVICE_OBJECT RealDeviceObject)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
@ -47,9 +48,12 @@ BOOLEAN IoIsTotalDeviceFailure(NTSTATUS Status)
UNIMPLEMENTED; UNIMPLEMENTED;
} }
BOOLEAN IoRaiseInformationalHardError(NTSTATUS ErrorStatus, BOOLEAN STDCALL IoRaiseInformationalHardError(NTSTATUS ErrorStatus,
PUNICODE_STRING String, PUNICODE_STRING String,
PKTHREAD Thread) PKTHREAD Thread)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
/* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: event.c,v 1.2 2000/03/26 19:38:22 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/event.c * FILE: ntoskrnl/io/event.c
@ -16,15 +17,21 @@
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
PKEVENT IoCreateNotificationEvent(PUNICODE_STRING EventName, PKEVENT
STDCALL
IoCreateNotificationEvent(PUNICODE_STRING EventName,
PHANDLE EventHandle) PHANDLE EventHandle)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
PKEVENT IoCreateSynchronizationEvent(PUNICODE_STRING EventName, PKEVENT
STDCALL
IoCreateSynchronizationEvent(PUNICODE_STRING EventName,
PHANDLE EventHandle) PHANDLE EventHandle)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: file.c,v 1.9 1999/08/29 06:59:06 ea Exp $ /* $Id: file.c,v 1.10 2000/03/26 19:38:22 ea Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -19,6 +19,7 @@
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
NTSTATUS NTSTATUS
STDCALL STDCALL
NtQueryInformationFile ( NtQueryInformationFile (
@ -45,7 +46,7 @@ NtQueryInformationFile (
Status = ObReferenceObjectByHandle(FileHandle, Status = ObReferenceObjectByHandle(FileHandle,
FILE_READ_ATTRIBUTES, FILE_READ_ATTRIBUTES,
IoFileType, IoFileObjectType,
UserMode, UserMode,
(PVOID *)&FileObject, (PVOID *)&FileObject,
NULL); NULL);
@ -91,6 +92,21 @@ NtQueryInformationFile (
} }
NTSTATUS
STDCALL
IoQueryFileInformation (
IN PFILE_OBJECT FileObject,
IN FILE_INFORMATION_CLASS FileInformationClass,
IN ULONG Length,
OUT PVOID FileInformation,
OUT PULONG ReturnedLength
)
{
UNIMPLEMENTED;
return (STATUS_NOT_IMPLEMENTED);
}
NTSTATUS NTSTATUS
STDCALL STDCALL
NtSetInformationFile ( NtSetInformationFile (
@ -120,7 +136,7 @@ NtSetInformationFile (
Status = ObReferenceObjectByHandle( Status = ObReferenceObjectByHandle(
FileHandle, FileHandle,
FILE_WRITE_ATTRIBUTES, FILE_WRITE_ATTRIBUTES,
IoFileType, IoFileObjectType,
UserMode, UserMode,
(PVOID *) & FileObject, (PVOID *) & FileObject,
NULL NULL
@ -189,6 +205,7 @@ NtSetInformationFile (
PGENERIC_MAPPING PGENERIC_MAPPING
STDCALL
IoGetFileObjectGenericMapping(VOID) IoGetFileObjectGenericMapping(VOID)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;

View file

@ -1,4 +1,4 @@
/* $Id: fs.c,v 1.11 2000/03/06 01:02:30 ea Exp $ /* $Id: fs.c,v 1.12 2000/03/26 19:38:24 ea Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -234,7 +234,9 @@ NTSTATUS IoTryToMountStorageDevice(PDEVICE_OBJECT DeviceObject)
return(STATUS_UNRECOGNIZED_VOLUME); return(STATUS_UNRECOGNIZED_VOLUME);
} }
VOID IoRegisterFileSystem(PDEVICE_OBJECT DeviceObject) VOID
STDCALL
IoRegisterFileSystem(PDEVICE_OBJECT DeviceObject)
{ {
FILE_SYSTEM_OBJECT* fs; FILE_SYSTEM_OBJECT* fs;
@ -248,7 +250,9 @@ VOID IoRegisterFileSystem(PDEVICE_OBJECT DeviceObject)
&FileSystemListLock); &FileSystemListLock);
} }
VOID IoUnregisterFileSystem(PDEVICE_OBJECT DeviceObject) VOID
STDCALL
IoUnregisterFileSystem(PDEVICE_OBJECT DeviceObject)
{ {
KIRQL oldlvl; KIRQL oldlvl;
PLIST_ENTRY current_entry; PLIST_ENTRY current_entry;
@ -334,4 +338,27 @@ IoGetBaseFileSystemDeviceObject (
} }
NTSTATUS
STDCALL
IoRegisterFsRegistrationChange (
IN PDRIVER_OBJECT DriverObject,
IN PFSDNOTIFICATIONPROC FSDNotificationProc
)
{
UNIMPLEMENTED;
return (STATUS_NOT_IMPLEMENTED);
}
VOID
STDCALL
IoUnregisterFsRegistrationChange (
DWORD Unknown0,
DWORD Unknown1
)
{
UNIMPLEMENTED;
}
/* EOF */ /* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: iomgr.c,v 1.9 2000/03/26 19:38:25 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/iomgr.c * FILE: ntoskrnl/io/iomgr.c
@ -19,9 +20,14 @@
/* GLOBALS *******************************************************************/ /* GLOBALS *******************************************************************/
POBJECT_TYPE IoDeviceType = NULL; /* DATA ********************************************************************/
POBJECT_TYPE IoFileType = NULL;
POBJECT_TYPE EXPORTED IoDeviceObjectType = NULL;
POBJECT_TYPE EXPORTED IoFileObjectType = NULL;
ULONG EXPORTED IoWriteTransferCount = 0; /* FIXME: unknown type */
ULONG EXPORTED IoStatisticsLock = 0; /* FIXME: unknown type */
/* FUNCTIONS ****************************************************************/ /* FUNCTIONS ****************************************************************/
VOID IopCloseFile(PVOID ObjectBody, ULONG HandleCount) VOID IopCloseFile(PVOID ObjectBody, ULONG HandleCount)
@ -40,7 +46,7 @@ VOID IopCloseFile(PVOID ObjectBody, ULONG HandleCount)
ObReferenceObjectByPointer(FileObject, ObReferenceObjectByPointer(FileObject,
STANDARD_RIGHTS_REQUIRED, STANDARD_RIGHTS_REQUIRED,
IoFileType, IoFileObjectType,
UserMode); UserMode);
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_CLEANUP, Irp = IoBuildSynchronousFsdRequest(IRP_MJ_CLEANUP,
@ -67,7 +73,7 @@ VOID IopDeleteFile(PVOID ObjectBody)
ObReferenceObjectByPointer(ObjectBody, ObReferenceObjectByPointer(ObjectBody,
STANDARD_RIGHTS_REQUIRED, STANDARD_RIGHTS_REQUIRED,
IoFileType, IoFileObjectType,
UserMode); UserMode);
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_CLOSE, Irp = IoBuildSynchronousFsdRequest(IRP_MJ_CLOSE,
@ -93,72 +99,137 @@ VOID IoShutdownIoManager(VOID)
{ {
} }
VOID IoInit(VOID)
VOID IoInit (VOID)
{ {
OBJECT_ATTRIBUTES attr; OBJECT_ATTRIBUTES attr;
HANDLE handle; HANDLE handle;
UNICODE_STRING UnicodeString; UNICODE_STRING UnicodeString;
ANSI_STRING AnsiString; ANSI_STRING AnsiString;
/*
* Register iomgr types
*/
IoDeviceType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
IoDeviceType->TotalObjects = 0;
IoDeviceType->TotalHandles = 0;
IoDeviceType->MaxObjects = ULONG_MAX;
IoDeviceType->MaxHandles = ULONG_MAX;
IoDeviceType->PagedPoolCharge = 0;
IoDeviceType->NonpagedPoolCharge = sizeof(DEVICE_OBJECT);
IoDeviceType->Dump = NULL;
IoDeviceType->Open = NULL;
IoDeviceType->Close = NULL;
IoDeviceType->Delete = NULL;
IoDeviceType->Parse = NULL;
IoDeviceType->Security = NULL;
IoDeviceType->QueryName = NULL;
IoDeviceType->OkayToClose = NULL;
IoDeviceType->Create = IopCreateDevice;
RtlInitAnsiString(&AnsiString,"Device");
RtlAnsiStringToUnicodeString(&IoDeviceType->TypeName,&AnsiString,TRUE);
IoFileType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
IoFileType->TotalObjects = 0;
IoFileType->TotalHandles = 0;
IoFileType->MaxObjects = ULONG_MAX;
IoFileType->MaxHandles = ULONG_MAX;
IoFileType->PagedPoolCharge = 0;
IoFileType->NonpagedPoolCharge = sizeof(FILE_OBJECT);
IoFileType->Dump = NULL;
IoFileType->Open = NULL;
IoFileType->Close = IopCloseFile;
IoFileType->Delete = IopDeleteFile;
IoFileType->Parse = NULL;
IoFileType->Security = NULL;
IoFileType->QueryName = NULL;
IoFileType->OkayToClose = NULL;
IoFileType->Create = IopCreateFile;
RtlInitAnsiString(&AnsiString,"File");
RtlAnsiStringToUnicodeString(&IoFileType->TypeName,&AnsiString,TRUE);
/* /*
* Create the device directory * Register iomgr types: DeviceObjectType
*/ */
RtlInitAnsiString(&AnsiString,"\\Device"); IoDeviceObjectType = ExAllocatePool (
RtlAnsiStringToUnicodeString(&UnicodeString,&AnsiString,TRUE); NonPagedPool,
InitializeObjectAttributes(&attr,&UnicodeString,0,NULL,NULL); sizeof (OBJECT_TYPE)
ZwCreateDirectoryObject(&handle,0,&attr); );
RtlInitAnsiString(&AnsiString,"\\??"); IoDeviceObjectType->TotalObjects = 0;
RtlAnsiStringToUnicodeString(&UnicodeString,&AnsiString,TRUE); IoDeviceObjectType->TotalHandles = 0;
InitializeObjectAttributes(&attr,&UnicodeString,0,NULL,NULL); IoDeviceObjectType->MaxObjects = ULONG_MAX;
ZwCreateDirectoryObject(&handle,0,&attr); IoDeviceObjectType->MaxHandles = ULONG_MAX;
IoDeviceObjectType->PagedPoolCharge = 0;
IoDeviceObjectType->NonpagedPoolCharge = sizeof (DEVICE_OBJECT);
IoDeviceObjectType->Dump = NULL;
IoDeviceObjectType->Open = NULL;
IoDeviceObjectType->Close = NULL;
IoDeviceObjectType->Delete = NULL;
IoDeviceObjectType->Parse = NULL;
IoDeviceObjectType->Security = NULL;
IoDeviceObjectType->QueryName = NULL;
IoDeviceObjectType->OkayToClose = NULL;
IoDeviceObjectType->Create = IopCreateDevice;
RtlInitAnsiString (
& AnsiString,
"Device"
);
RtlAnsiStringToUnicodeString (
& IoDeviceObjectType->TypeName,
& AnsiString,
TRUE
);
/*
* Register iomgr types: FileObjectType
* (alias DriverObjectType)
*/
IoFileObjectType = ExAllocatePool (
NonPagedPool,
sizeof (OBJECT_TYPE)
);
IoFileObjectType->TotalObjects = 0;
IoFileObjectType->TotalHandles = 0;
IoFileObjectType->MaxObjects = ULONG_MAX;
IoFileObjectType->MaxHandles = ULONG_MAX;
IoFileObjectType->PagedPoolCharge = 0;
IoFileObjectType->NonpagedPoolCharge = sizeof(FILE_OBJECT);
IoFileObjectType->Dump = NULL;
IoFileObjectType->Open = NULL;
IoFileObjectType->Close = IopCloseFile;
IoFileObjectType->Delete = IopDeleteFile;
IoFileObjectType->Parse = NULL;
IoFileObjectType->Security = NULL;
IoFileObjectType->QueryName = NULL;
IoFileObjectType->OkayToClose = NULL;
IoFileObjectType->Create = IopCreateFile;
RtlInitAnsiString (
& AnsiString,
"File"
);
RtlAnsiStringToUnicodeString (
& IoFileObjectType->TypeName,
& AnsiString,
TRUE
);
IoInitCancelHandling(); /*
IoInitSymbolicLinkImplementation(); * Create the device directory
IoInitFileSystemImplementation(); */
RtlInitAnsiString (
& AnsiString,
"\\Device"
);
RtlAnsiStringToUnicodeString (
& UnicodeString,
& AnsiString,
TRUE
);
InitializeObjectAttributes (
& attr,
& UnicodeString,
0,
NULL,
NULL
);
ZwCreateDirectoryObject (
& handle,
0,
& attr
);
/*
* Create the \?? directory
*/
RtlInitAnsiString (
& AnsiString,
"\\??"
);
RtlAnsiStringToUnicodeString (
& UnicodeString,
& AnsiString,
TRUE
);
InitializeObjectAttributes (
& attr,
& UnicodeString,
0,
NULL,
NULL
);
ZwCreateDirectoryObject (
& handle,
0,
& attr
);
/*
* Initialize remaining subsubsystem
*/
IoInitCancelHandling ();
IoInitSymbolicLinkImplementation ();
IoInitFileSystemImplementation ();
} }
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: irp.c,v 1.26 2000/03/06 01:02:30 ea Exp $ /* $Id: irp.c,v 1.27 2000/03/26 19:38:25 ea Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -458,4 +458,45 @@ IoIsOperationSynchronous (
} }
VOID
STDCALL
IoEnqueueIrp (
PIRP Irp
)
{
UNIMPLEMENTED;
}
VOID
STDCALL
IoSetTopLevelIrp (
IN PIRP Irp
)
{
UNIMPLEMENTED;
}
PIRP
STDCALL
IoGetTopLevelIrp (
VOID
)
{
UNIMPLEMENTED;
return (NULL);
}
VOID
STDCALL
IoQueueThreadIrp (
PVOID Unknown0
)
{
UNIMPLEMENTED;
}
/* EOF */ /* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: mdl.c,v 1.4 2000/03/05 19:17:43 ea Exp $ /* $Id: mdl.c,v 1.5 2000/03/26 19:38:25 ea Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -18,7 +18,9 @@
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
PMDL IoAllocateMdl(PVOID VirtualAddress, PMDL
STDCALL
IoAllocateMdl(PVOID VirtualAddress,
ULONG Length, ULONG Length,
BOOLEAN SecondaryBuffer, BOOLEAN SecondaryBuffer,
BOOLEAN ChargeQuota, BOOLEAN ChargeQuota,
@ -44,7 +46,9 @@ PMDL IoAllocateMdl(PVOID VirtualAddress,
return(Mdl); return(Mdl);
} }
VOID IoBuildPartialMdl(PMDL SourceMdl, VOID
STDCALL
IoBuildPartialMdl(PMDL SourceMdl,
PMDL TargetMdl, PMDL TargetMdl,
PVOID VirtualAddress, PVOID VirtualAddress,
ULONG Length) ULONG Length)
@ -61,7 +65,9 @@ VOID IoBuildPartialMdl(PMDL SourceMdl,
} }
} }
VOID IoFreeMdl(PMDL Mdl) VOID
STDCALL
IoFreeMdl(PMDL Mdl)
{ {
MmUnmapLockedPages(MmGetSystemAddressForMdl(Mdl),Mdl); MmUnmapLockedPages(MmGetSystemAddressForMdl(Mdl),Mdl);
MmUnlockPages(Mdl); MmUnlockPages(Mdl);

View file

@ -1,4 +1,5 @@
/* /* $Id: page.c,v 1.6 2000/03/26 19:38:26 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/bug.c * FILE: ntoskrnl/ke/bug.c
@ -18,10 +19,15 @@
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
NTSTATUS IoPageRead(PFILE_OBJECT FileObject, NTSTATUS
PMDL Mdl, STDCALL
PLARGE_INTEGER Offset, IoPageRead (
PIO_STATUS_BLOCK StatusBlock) PFILE_OBJECT FileObject,
PMDL Mdl,
PLARGE_INTEGER Offset,
PIO_STATUS_BLOCK StatusBlock,
DWORD Unknown4
)
{ {
PIRP Irp; PIRP Irp;
KEVENT Event; KEVENT Event;
@ -33,7 +39,7 @@ NTSTATUS IoPageRead(PFILE_OBJECT FileObject,
ObReferenceObjectByPointer(FileObject, ObReferenceObjectByPointer(FileObject,
STANDARD_RIGHTS_REQUIRED, STANDARD_RIGHTS_REQUIRED,
IoFileType, IoFileObjectType,
UserMode); UserMode);
KeInitializeEvent(&Event,NotificationEvent,FALSE); KeInitializeEvent(&Event,NotificationEvent,FALSE);
@ -64,3 +70,21 @@ NTSTATUS IoPageRead(PFILE_OBJECT FileObject,
} }
return(Status); return(Status);
} }
NTSTATUS
STDCALL
IoSynchronousPageWrite (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4
)
{
UNIMPLEMENTED;
return (STATUS_NOT_IMPLEMENTED);
}
/* EOF */

View file

@ -1,7 +1,8 @@
/* /* $Id: process.c,v 1.2 2000/03/26 19:38:26 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: kernel/iomgr/process.c * FILE: ntoskrnl/io/process.c
* PURPOSE: Process functions that, bizarrely, are in the iomgr * PURPOSE: Process functions that, bizarrely, are in the iomgr
* PROGRAMMER: David Welch (welch@mcmail.com) * PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY: * UPDATE HISTORY:
@ -16,12 +17,68 @@
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
struct _EPROCESS* IoGetCurrentProcess() PEPROCESS
STDCALL
IoGetCurrentProcess (
VOID
)
{ {
return(PsGetCurrentProcess()); return (PsGetCurrentProcess());
} }
PVOID IoGetInitialStack()
PVOID
STDCALL
IoGetInitialStack (
VOID
)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
VOID
STDCALL
IoGetStackLimits (
PVOID * Minimum, /* guess */
PVOID * Maximum /* guess */
)
{
/* FIXME: */
*Minimum = NULL;
*Maximum = NULL;
}
PEPROCESS
STDCALL
IoThreadToProcess (
IN PETHREAD Thread
)
{
UNIMPLEMENTED;
return (NULL);
}
PEPROCESS
STDCALL
IoGetRequestorProcess (
IN PIRP Irp
)
{
return (Irp->Tail.Overlay.Thread->ThreadsProcess);
}
VOID
STDCALL
IoSetThreadHardErrorMode (
IN PVOID Unknown0
)
{
UNIMPLEMENTED;
}
/* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: queue.c,v 1.10 2000/03/26 19:38:26 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/queue.c * FILE: ntoskrnl/io/queue.c
@ -15,7 +16,9 @@
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
VOID IoStartNextPacketByKey(PDEVICE_OBJECT DeviceObject, VOID
STDCALL
IoStartNextPacketByKey(PDEVICE_OBJECT DeviceObject,
BOOLEAN Cancelable, BOOLEAN Cancelable,
ULONG Key) ULONG Key)
/* /*
@ -50,7 +53,9 @@ VOID IoStartNextPacketByKey(PDEVICE_OBJECT DeviceObject,
} }
} }
VOID IoStartNextPacket(PDEVICE_OBJECT DeviceObject, BOOLEAN Cancelable) VOID
STDCALL
IoStartNextPacket(PDEVICE_OBJECT DeviceObject, BOOLEAN Cancelable)
/* /*
* FUNCTION: Removes the next packet from the device's queue and calls * FUNCTION: Removes the next packet from the device's queue and calls
* the driver's StartIO * the driver's StartIO
@ -79,7 +84,9 @@ VOID IoStartNextPacket(PDEVICE_OBJECT DeviceObject, BOOLEAN Cancelable)
} }
} }
VOID IoStartPacket(PDEVICE_OBJECT DeviceObject, VOID
STDCALL
IoStartPacket(PDEVICE_OBJECT DeviceObject,
PIRP Irp, PULONG Key, PDRIVER_CANCEL CancelFunction) PIRP Irp, PULONG Key, PDRIVER_CANCEL CancelFunction)
/* /*
* FUNCTION: Either call the device's StartIO routine with the packet or, * FUNCTION: Either call the device's StartIO routine with the packet or,
@ -128,3 +135,4 @@ VOID IoStartPacket(PDEVICE_OBJECT DeviceObject,
} }
/* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: resource.c,v 1.3 2000/03/26 19:38:26 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/resource.c * FILE: ntoskrnl/io/resource.c
@ -21,12 +22,16 @@ static CONFIGURATION_INFORMATION SystemConfigurationInformation =
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
PCONFIGURATION_INFORMATION IoGetConfigurationInformation(VOID) PCONFIGURATION_INFORMATION
STDCALL
IoGetConfigurationInformation(VOID)
{ {
return(&SystemConfigurationInformation); return(&SystemConfigurationInformation);
} }
NTSTATUS IoReportResourceUsage(PUNICODE_STRING DriverClassName, NTSTATUS
STDCALL
IoReportResourceUsage(PUNICODE_STRING DriverClassName,
PDRIVER_OBJECT DriverObject, PDRIVER_OBJECT DriverObject,
PCM_RESOURCE_LIST DriverList, PCM_RESOURCE_LIST DriverList,
ULONG DriverListSize, ULONG DriverListSize,
@ -39,7 +44,9 @@ NTSTATUS IoReportResourceUsage(PUNICODE_STRING DriverClassName,
UNIMPLEMENTED; UNIMPLEMENTED;
} }
NTSTATUS IoAssignResources(PUNICODE_STRING RegistryPath, NTSTATUS
STDCALL
IoAssignResources(PUNICODE_STRING RegistryPath,
PUNICODE_STRING DriverClassName, PUNICODE_STRING DriverClassName,
PDRIVER_OBJECT DriverObject, PDRIVER_OBJECT DriverObject,
PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT DeviceObject,
@ -49,7 +56,9 @@ NTSTATUS IoAssignResources(PUNICODE_STRING RegistryPath,
UNIMPLEMENTED; UNIMPLEMENTED;
} }
NTSTATUS IoQueryDeviceDescription(PINTERFACE_TYPE BusType, NTSTATUS
STDCALL
IoQueryDeviceDescription(PINTERFACE_TYPE BusType,
PULONG BusNumber, PULONG BusNumber,
PCONFIGURATION_TYPE ControllerType, PCONFIGURATION_TYPE ControllerType,
PULONG ControllerNumber, PULONG ControllerNumber,
@ -60,3 +69,5 @@ NTSTATUS IoQueryDeviceDescription(PINTERFACE_TYPE BusType,
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: rw.c,v 1.27 1999/11/02 08:55:40 dwelch Exp $ /* $Id: rw.c,v 1.28 2000/03/26 19:38:26 ea Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -20,6 +20,10 @@
#define NDEBUG #define NDEBUG
#include <internal/debug.h> #include <internal/debug.h>
/* DATA ********************************************************************/
/* FUNCTIONS ***************************************************************/ /* FUNCTIONS ***************************************************************/
@ -61,7 +65,7 @@ NTSTATUS STDCALL NtReadFile(HANDLE FileHandle,
Status = ObReferenceObjectByHandle(FileHandle, Status = ObReferenceObjectByHandle(FileHandle,
FILE_READ_DATA, FILE_READ_DATA,
IoFileType, IoFileObjectType,
UserMode, UserMode,
(PVOID *) & FileObject, (PVOID *) & FileObject,
NULL); NULL);
@ -187,7 +191,7 @@ NtWriteFile (
Status = ObReferenceObjectByHandle( Status = ObReferenceObjectByHandle(
FileHandle, FileHandle,
FILE_WRITE_DATA, FILE_WRITE_DATA,
IoFileType, IoFileObjectType,
UserMode, UserMode,
(PVOID *) & FileObject, (PVOID *) & FileObject,
NULL NULL

View file

@ -1,8 +1,9 @@
/* /* $Id: share.c,v 1.2 2000/03/26 19:38:26 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: kernel/base/bug.c * FILE: ntoskrnl/io/share.c
* PURPOSE: Graceful system shutdown if a bug is detected * PURPOSE:
* PROGRAMMER: David Welch (welch@mcmail.com) * PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY: * UPDATE HISTORY:
* Created 22/05/98 * Created 22/05/98
@ -16,30 +17,113 @@
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
VOID IoUpdateShareAccess(PFILE_OBJECT FileObject, PSHARE_ACCESS ShareAccess) VOID
STDCALL
IoUpdateShareAccess(PFILE_OBJECT FileObject, PSHARE_ACCESS ShareAccess)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
NTSTATUS IoCheckShareAccess(ACCESS_MASK DesiredAccess,
VOID
STDCALL
IoCheckDesiredAccess (
DWORD Unknown0,
DWORD Unknown1
)
{
UNIMPLEMENTED;
}
NTSTATUS
STDCALL
IoCheckEaBufferValidity (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2
)
{
UNIMPLEMENTED;
return (STATUS_NOT_IMPLEMENTED);
}
NTSTATUS
STDCALL
IoCheckFunctionAccess (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4,
DWORD Unknown5
)
{
UNIMPLEMENTED;
return (STATUS_NOT_IMPLEMENTED);
}
NTSTATUS
STDCALL
IoCheckShareAccess(ACCESS_MASK DesiredAccess,
ULONG DesiredShareAccess, ULONG DesiredShareAccess,
PFILE_OBJECT FileObject, PFILE_OBJECT FileObject,
PSHARE_ACCESS ShareAccess, PSHARE_ACCESS ShareAccess,
BOOLEAN Update) BOOLEAN Update)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
return (STATUS_NOT_IMPLEMENTED);
} }
VOID IoRemoveShareAccess(PFILE_OBJECT FileObject,
VOID
STDCALL
IoRemoveShareAccess(PFILE_OBJECT FileObject,
PSHARE_ACCESS ShareAccess) PSHARE_ACCESS ShareAccess)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
VOID IoSetShareAccess(ACCESS_MASK DesiredAccess,
VOID
STDCALL
IoSetShareAccess(ACCESS_MASK DesiredAccess,
ULONG DesiredShareAccess, ULONG DesiredShareAccess,
PFILE_OBJECT FileObject, PFILE_OBJECT FileObject,
PSHARE_ACCESS ShareAccess) PSHARE_ACCESS ShareAccess)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
NTSTATUS
STDCALL
IoSetInformation (
IN PFILE_OBJECT FileObject,
IN FILE_INFORMATION_CLASS FileInformationClass,
IN ULONG Length,
OUT PVOID FileInformation
)
{
UNIMPLEMENTED;
return (STATUS_NOT_IMPLEMENTED);
}
VOID
STDCALL
IoFastQueryNetworkAttributes (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4
)
{
UNIMPLEMENTED;
}
/* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: shutdown.c,v 1.2 2000/03/26 19:38:26 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/shutdown.c * FILE: ntoskrnl/io/shutdown.c
@ -16,12 +17,14 @@
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
NTSTATUS IoRegisterShutdownNotification(PDEVICE_OBJECT DeviceObject) NTSTATUS STDCALL IoRegisterShutdownNotification(PDEVICE_OBJECT DeviceObject)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
VOID IoUnregisterShutdownNotification(PDEVICE_OBJECT DeviceObject) VOID STDCALL IoUnregisterShutdownNotification(PDEVICE_OBJECT DeviceObject)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
/* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: timer.c,v 1.5 2000/03/26 19:38:26 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/timer.c * FILE: ntoskrnl/io/timer.c
@ -17,7 +18,9 @@
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
NTSTATUS IoInitializeTimer(PDEVICE_OBJECT DeviceObject, NTSTATUS
STDCALL
IoInitializeTimer(PDEVICE_OBJECT DeviceObject,
PIO_TIMER_ROUTINE TimerRoutine, PIO_TIMER_ROUTINE TimerRoutine,
PVOID Context) PVOID Context)
/* /*
@ -39,7 +42,9 @@ NTSTATUS IoInitializeTimer(PDEVICE_OBJECT DeviceObject,
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }
VOID IoStartTimer(PDEVICE_OBJECT DeviceObject) VOID
STDCALL
IoStartTimer(PDEVICE_OBJECT DeviceObject)
/* /*
* FUNCTION: Starts a timer so the driver-supplied IoTimer routine will be * FUNCTION: Starts a timer so the driver-supplied IoTimer routine will be
* called once per second * called once per second
@ -59,7 +64,9 @@ VOID IoStartTimer(PDEVICE_OBJECT DeviceObject)
&(DeviceObject->Timer->dpc)); &(DeviceObject->Timer->dpc));
} }
VOID IoStopTimer(PDEVICE_OBJECT DeviceObject) VOID
STDCALL
IoStopTimer(PDEVICE_OBJECT DeviceObject)
/* /*
* FUNCTION: Disables for a specified device object so the driver-supplied * FUNCTION: Disables for a specified device object so the driver-supplied
* IoTimer is not called * IoTimer is not called
@ -69,3 +76,6 @@ VOID IoStopTimer(PDEVICE_OBJECT DeviceObject)
{ {
KeCancelTimer(&(DeviceObject->Timer->timer)); KeCancelTimer(&(DeviceObject->Timer->timer));
} }
/* EOF */

View file

@ -1,4 +1,5 @@
/* /* $Id: vpb.c,v 1.9 2000/03/26 19:38:26 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/vpb.c * FILE: ntoskrnl/io/vpb.c
@ -95,9 +96,11 @@ PIRP IoBuildVolumeInformationIrp(ULONG MajorFunction,
return(Irp); return(Irp);
} }
NTSTATUS NTSTATUS
STDCALL STDCALL
NtQueryVolumeInformationFile ( NtQueryVolumeInformationFile (
IN HANDLE FileHandle, IN HANDLE FileHandle,
OUT PIO_STATUS_BLOCK IoStatusBlock, OUT PIO_STATUS_BLOCK IoStatusBlock,
OUT PVOID FSInformation, OUT PVOID FSInformation,
@ -167,6 +170,22 @@ NtQueryVolumeInformationFile (
return(Status); return(Status);
} }
NTSTATUS
STDCALL
IoQueryVolumeInformation (
IN PFILE_OBJECT FileObject,
IN FS_INFORMATION_CLASS FsInformationClass,
IN ULONG Length,
OUT PVOID FsInformation,
OUT PULONG ReturnedLength
)
{
UNIMPLEMENTED;
return (STATUS_NOT_IMPLEMENTED);
}
NTSTATUS NTSTATUS
STDCALL STDCALL
NtSetVolumeInformationFile ( NtSetVolumeInformationFile (
@ -211,3 +230,38 @@ NtSetVolumeInformationFile (
} }
return(Status); return(Status);
} }
VOID
STDCALL
IoAcquireVpbSpinLock (
PKIRQL Irpl
)
{
UNIMPLEMENTED;
}
VOID
STDCALL
IoReleaseVpbSpinLock (
IN KIRQL Irql
)
{
UNIMPLEMENTED;
}
NTSTATUS
STDCALL
IoVerifyVolume (
IN PDEVICE_OBJECT DeviceObject,
IN BOOLEAN AllowRawMount
)
{
UNIMPLEMENTED;
return (STATUS_NOT_IMPLEMENTED);
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: main.c,v 1.41 2000/03/20 18:00:24 ekohl Exp $ /* $Id: main.c,v 1.42 2000/03/26 19:38:27 ea Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -30,10 +30,8 @@
/* DATA *********************************************************************/ /* DATA *********************************************************************/
USHORT __declspec(dllexport) NtBuildNumber = KERNEL_VERSION_BUILD; USHORT EXPORTED NtBuildNumber = KERNEL_VERSION_BUILD;
/* EXPORTED */ ULONG EXPORTED NtGlobalFlag = 0;
ULONG __declspec(dllexport) NtGlobalFlag = 0; /* FIXME: EXPORTED */
/* FUNCTIONS ****************************************************************/ /* FUNCTIONS ****************************************************************/

View file

@ -1,4 +1,4 @@
# $Id: makefile_rex,v 1.63 2000/03/24 22:25:37 dwelch Exp $ # $Id: makefile_rex,v 1.64 2000/03/26 19:38:17 ea Exp $
# #
# ReactOS Operating System # ReactOS Operating System
# #
@ -44,7 +44,7 @@ MM_I386_OBJECTS = mm/i386/page.o mm/i386/memsafe.o
IO_OBJECTS = io/iomgr.o io/create.o io/irp.o io/device.o io/rw.o \ IO_OBJECTS = io/iomgr.o io/create.o io/irp.o io/device.o io/rw.o \
io/queue.o io/drvlck.o io/timer.o io/share.o io/errlog.o \ io/queue.o io/drvlck.o io/timer.o io/share.o io/errlog.o \
io/shutdown.o io/fdisk.o io/cancel.o io/error.o io/arc.o \ io/shutdown.o io/cancel.o io/error.o io/arc.o \
io/dpc.o io/symlink.o io/adapter.o io/cntrller.o io/mdl.o \ io/dpc.o io/symlink.o io/adapter.o io/cntrller.o io/mdl.o \
io/resource.o io/event.o io/process.o io/file.o io/ioctrl.o \ io/resource.o io/event.o io/process.o io/file.o io/ioctrl.o \
io/fs.o io/vpb.o io/buildirp.o io/flush.o io/dir.o io/iocomp.o \ io/fs.o io/vpb.o io/buildirp.o io/flush.o io/dir.o io/iocomp.o \

View file

@ -1,4 +1,4 @@
/* $Id: mm.c,v 1.24 2000/03/20 18:00:55 ekohl Exp $ /* $Id: mm.c,v 1.25 2000/03/26 19:38:30 ea Exp $
* *
* COPYRIGHT: See COPYING in the top directory * COPYRIGHT: See COPYING in the top directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -203,7 +203,9 @@ NTSTATUS MmSectionHandleFault(MEMORY_AREA* MemoryArea,
Status = IoPageRead(MemoryArea->Data.SectionData.Section->FileObject, Status = IoPageRead(MemoryArea->Data.SectionData.Section->FileObject,
Mdl, Mdl,
&Offset, &Offset,
&IoStatus); &IoStatus,
0 /* FIXME: UNKNOWN ARG */
);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {

View file

@ -1,4 +1,5 @@
/* /* $Id: pagefile.c,v 1.3 2000/03/26 19:38:32 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/pagefile.c * FILE: ntoskrnl/mm/pagefile.c
@ -194,7 +195,7 @@ NTSTATUS STDCALL NtCreatePagingFile(IN PUNICODE_STRING PageFileName,
Status = ObReferenceObjectByHandle(FileHandle, Status = ObReferenceObjectByHandle(FileHandle,
FILE_ALL_ACCESS, FILE_ALL_ACCESS,
IoFileType, IoFileObjectType,
UserMode, UserMode,
(PVOID*)&FileObject, (PVOID*)&FileObject,
NULL); NULL);
@ -245,3 +246,6 @@ NTSTATUS STDCALL NtCreatePagingFile(IN PUNICODE_STRING PageFileName,
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: section.c,v 1.24 2000/03/19 09:14:51 ea Exp $ /* $Id: section.c,v 1.25 2000/03/26 19:38:32 ea Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -202,7 +202,7 @@ NTSTATUS STDCALL NtCreateSection (OUT PHANDLE SectionHandle,
{ {
Status = ObReferenceObjectByHandle(FileHandle, Status = ObReferenceObjectByHandle(FileHandle,
FILE_READ_DATA, FILE_READ_DATA,
IoFileType, IoFileObjectType,
UserMode, UserMode,
(PVOID*)&Section->FileObject, (PVOID*)&Section->FileObject,
NULL); NULL);

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.def,v 1.62 2000/03/19 13:35:37 ekohl Exp $ ; $Id: ntoskrnl.def,v 1.63 2000/03/26 19:38:17 ea Exp $
; ;
; reactos/ntoskrnl/ntoskrnl.def ; reactos/ntoskrnl/ntoskrnl.def
; ;
@ -164,44 +164,114 @@ FsRtlUninitializeFileLock@4
FsRtlUninitializeLargeMcb@4 FsRtlUninitializeLargeMcb@4
FsRtlUninitializeMcb@4 FsRtlUninitializeMcb@4
FsRtlUninitializeOplock@4 FsRtlUninitializeOplock@4
IoAcquireCancelSpinLock@4
IoAcquireVpbSpinLock@4
IoAllocateAdapterChannel@20
IoAllocateController@16
IoAllocateErrorLogEntry@8
IoAllocateIrp@8 IoAllocateIrp@8
IoAllocateController IoAllocateMdl@20
IoAttachDeviceToDeviceStack IoAssignResources@24
IoBuildDeviceIoControlRequest IoAttachDevice@12
IoBuildSynchronousFsdRequest IoAttachDeviceByPointer@8
IoAttachDeviceToDeviceStack@8
IoBuildAsynchronousFsdRequest@24
IoBuildDeviceIoControlRequest@36
IoBuildPartialMdl@16
IoBuildSynchronousFsdRequest@28
IoCallDriver@8 IoCallDriver@8
IoCancelIrp@4
IoCheckDesiredAccess@8
IoCheckEaBufferValidity@12
IoCheckFunctionAccess@24
IoCheckShareAccess@20
IoCompleteRequest@8 IoCompleteRequest@8
IoConnectInterrupt IoConnectInterrupt@44
IoCreateController IoCreateController@4
IoCreateDevice IoCreateDevice@28
IoCreateFile@56 IoCreateFile@56
IoCreateStreamFileObject IoCreateNotificationEvent@8
IoCreateStreamFileObject@8
IoCreateSymbolicLink@8 IoCreateSymbolicLink@8
IoDeleteController IoCreateSynchronizationEvent@8
IoDeleteDevice IoCreateUnprotectedSymbolicLink@8
IoDisconnectInterrupt IoDeleteController@4
IoFreeController IoDeleteDevice@4
IoDeleteSymbolicLink@4
IoDetachDevice@4
IoDeviceHandlerObjectSize DATA
IoDeviceHandlerObjectType DATA
IoDeviceObjectType DATA
IoDisconnectInterrupt@4
IoDeviceObjectType DATA
IoDriverObjectType=IoFileObjectType DATA
IoEnqueueIrp@4
IoFastQueryNetworkAttributes@20
IoFileObjectType DATA
IoFreeController@4
IoFreeIrp@4 IoFreeIrp@4
IoFreeMdl@4
IoGetAttachedDevice@4
IoGetBaseFileSystemDeviceObject@4 IoGetBaseFileSystemDeviceObject@4
IoGetCurrentIrpStackLocation IoGetConfigurationInformation@0
IoGetCurrentProcess@0
IoGetDeviceObjectPointer@16
IoGetDeviceToVerify@4 IoGetDeviceToVerify@4
IoGetFileObjectGenericMapping@0
IoGetInitialStack@0
IoGetRelatedDeviceObject@4 IoGetRelatedDeviceObject@4
IoInitializeDpcRequest IoGetRequestorProcess@4
IoGetStackLimits@8
IoGetTopLevelIrp@0
IoInitializeIrp@12 IoInitializeIrp@12
IoInitializeTimer IoInitializeTimer@12
IoIsOperationSynchronous@4 IoIsOperationSynchronous@4
IoMakeAssociatedIrp@8 IoMakeAssociatedIrp@8
IoMarkIrpPending IoOpenDeviceInstanceKey@20
IoRegisterFileSystem IoPageRead@20
IoRequestDpc IoQueryDeviceDescription@32
IoStartPacket IoQueryDeviceEnumInfo@8
IoStartNextPacket IoQueryFileInformation@20
IoStartNextPacketByKey IoQueryVolumeInformation@20
IoStartTimer IoQueueThreadIrp@4
IoStopTimer IoRaiseHardError@12
;@IofCallDriver@0 IoRaiseInformationalHardError@12
IoReadOperationCount DATA
IoReadTransferCount=IoAdapterObjectType DATA
IoRegisterDriverReinitialization@12
IoRegisterFileSystem@4
IoRegisterFsRegistrationChange@8
IoRegisterShutdownNotification@4
IoReleaseCancelSpinLock@4
IoReleaseVpbSpinLock@4
IoRemoveShareAccess@8
;IoReportHalResourceUsage
IoReportResourceUsage@36
IoSetDeviceToVerify@8
IoSetHardErrorOrVerifyDevice@8
IoSetInformation@16
IoSetShareAccess@16
IoSetThreadHardErrorMode@4
IoSetTopLevelIrp@4
IoStartNextPacket@8
IoStartNextPacketByKey@12
IoStartPacket@16
IoStartTimer@4
IoStatisticsLock DATA
IoStopTimer@4
IoSynchronousPageWrite@20
IoThreadToProcess@4
IoUnregisterFileSystem@4
IoUnregisterFsRegistrationChange@8
IoUnregisterShutdownNotification@4
IoUpdateShareAccess@8
IoVerifyVolume@8
IoWriteErrorLogEntry@4
IoWriteOperationCount=IoDeviceObjectType DATA
IoWriteTransferCount DATA
;@IofCallDriver@8
IofCallDriver@8 IofCallDriver@8
;@IofCompleteRequest@0 ;@IofCompleteRequest@8
IofCompleteRequest@8 IofCompleteRequest@8
KdDebuggerEnabled DATA KdDebuggerEnabled DATA
KdDebuggerNotPresent DATA KdDebuggerNotPresent DATA
@ -652,6 +722,13 @@ wcsstr
wcstombs wcstombs
wctomb wctomb
; ;
; ReactOS Extensions
;
IoGetCurrentIrpStackLocation
IoInitializeDpcRequest
IoMarkIrpPending
IoRequestDpc
;
; ;
; exports from hal.dll ; exports from hal.dll
; ;
@ -704,14 +781,14 @@ HalSetRealTimeClock@4
;HalStopProfileInterrupt ;HalStopProfileInterrupt
;HalSystemVectorDispatchEntry ;HalSystemVectorDispatchEntry
HalTranslateBusAddress@24 HalTranslateBusAddress@24
;IoAssignDriveLetters IoAssignDriveLetters@16
;IoFlushAdapterBuffers IoFlushAdapterBuffers@24
;IoFreeAdapterChannel IoFreeAdapterChannel@4
;IoFreeMapRegisters IoFreeMapRegisters@12
;IoMapTransfer IoMapTransfer@24
;IoReadPartitionTable IoReadPartitionTable@16
;IoSetPartitionInformation IoSetPartitionInformation@16
;IoWritePartitionTable IoWritePartitionTable@20
KdComPortInUse DATA KdComPortInUse DATA
KdPortGetByte@4 KdPortGetByte@4
KdPortInitialize@12 KdPortInitialize@12
@ -748,3 +825,4 @@ WRITE_PORT_ULONG@8
WRITE_PORT_USHORT@8 WRITE_PORT_USHORT@8
InsertTailList InsertTailList
RemoveEntryList RemoveEntryList

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.edf,v 1.49 2000/03/19 13:35:38 ekohl Exp $ ; $Id: ntoskrnl.edf,v 1.50 2000/03/26 19:38:18 ea Exp $
; ;
; reactos/ntoskrnl/ntoskrnl.def ; reactos/ntoskrnl/ntoskrnl.def
; ;
@ -164,41 +164,110 @@ FsRtlUninitializeFileLock=FsRtlUninitializeFileLock@4
FsRtlUninitializeLargeMcb=FsRtlUninitializeLargeMcb@4 FsRtlUninitializeLargeMcb=FsRtlUninitializeLargeMcb@4
FsRtlUninitializeMcb=FsRtlUninitializeMcb@4 FsRtlUninitializeMcb=FsRtlUninitializeMcb@4
FsRtlUninitializeOplock=FsRtlUninitializeOplock@4 FsRtlUninitializeOplock=FsRtlUninitializeOplock@4
IoAcquireCancelSpinLock=IoAcquireCancelSpinLock@4
IoAcquireVpbSpinLock=IoAcquireVpbSpinLock@4
IoAllocateAdapterChannel=IoAllocateAdapterChannel@20
IoAllocateIrp=IoAllocateIrp@8 IoAllocateIrp=IoAllocateIrp@8
IoAllocateController IoAllocateMdl=IoAllocateMdl@20
IoAttachDeviceToDeviceStack IoAllocateController=IoAllocateController@16
IoBuildDeviceIoControlRequest IoAllocateErrorLogEntry=IoAllocateErrorLogEntry@8
IoBuildSynchronousFsdRequest IoAssignResources=IoAssignResources@24
IoAttachDevice=IoAttachDevice@12
IoAttachDeviceByPointer=IoAttachDeviceByPointer@8
IoAttachDeviceToDeviceStack=IoAttachDeviceToDeviceStack@8
IoBuildAsynchronousFsdRequest=IoBuildAsynchronousFsdRequest@24
IoBuildDeviceIoControlRequest=IoBuildDeviceIoControlRequest@36
IoBuildPartialMdl=IoBuildPartialMdl@16
IoBuildSynchronousFsdRequest=IoBuildSynchronousFsdRequest@28
IoCallDriver=IoCallDriver@8 IoCallDriver=IoCallDriver@8
IoCancelIrp=IoCancelIrp@4
IoCheckDesiredAccess=IoCheckDesiredAccess@8
IoCheckEaBufferValidity=IoCheckEaBufferValidity@12
IoCheckFunctionAccess=IoCheckFunctionAccess@24
IoCheckShareAccess=IoCheckShareAccess@20
IoCompleteRequest=IoCompleteRequest@8 IoCompleteRequest=IoCompleteRequest@8
IoConnectInterrupt IoConnectInterrupt=IoConnectInterrupt@44
IoCreateController IoCreateController=IoCreateController@4
IoCreateDevice IoCreateDevice=IoCreateDevice@28
IoCreateFile=IoCreateFile@56 IoCreateFile=IoCreateFile@56
IoCreateStreamFileObject IoCreateNotificationEvent=IoCreateNotificationEvent@8
IoCreateStreamFileObject=IoCreateStreamFileObject@8
IoCreateSymbolicLink=IoCreateSymbolicLink@8 IoCreateSymbolicLink=IoCreateSymbolicLink@8
IoDeleteController IoCreateSynchronizationEvent=IoCreateSynchronizationEvent@8
IoDeleteDevice IoCreateUnprotectedSymbolicLink=IoCreateUnprotectedSymbolicLink@8
IoDisconnectInterrupt IoDeleteController=IoDeleteController@4
IoFreeController IoDeleteDevice=IoDeleteDevice@4
IoDeleteSymbolicLink=IoDeleteSymbolicLink@4
IoDetachDevice=IoDetachDevice@4
IoDeviceHandlerObjectSize DATA
IoDeviceHandlerObjectType DATA
IoDeviceObjectType DATA
IoDisconnectInterrupt=IoDisconnectInterrupt@4
IoDriverObjectType=IoFileObjectType DATA
IoEnqueueIrp=IoEnqueueIrp@4
IoFastQueryNetworkAttributes=IoFastQueryNetworkAttributes@20
IoFileObjectType DATA
IoFreeController=IoFreeController@4
IoFreeIrp=IoFreeIrp@4 IoFreeIrp=IoFreeIrp@4
IoFreeMdl=IoFreeMdl@4
IoGetAttachedDevice=IoGetAttachedDevice@4
IoGetBaseFileSystemDeviceObject=IoGetBaseFileSystemDeviceObject@4 IoGetBaseFileSystemDeviceObject=IoGetBaseFileSystemDeviceObject@4
IoGetCurrentIrpStackLocation IoGetConfigurationInformation=IoGetConfigurationInformation@0
IoGetCurrentProcess=IoGetCurrentProcess@0
IoGetDeviceObjectPointer=IoGetDeviceObjectPointer@16
IoGetDeviceToVerify=IoGetDeviceToVerify@4 IoGetDeviceToVerify=IoGetDeviceToVerify@4
IoGetFileObjectGenericMapping=IoGetFileObjectGenericMapping@0
IoGetInitialStack=IoGetInitialStack@0
IoGetRelatedDeviceObject=IoGetRelatedDeviceObject@4 IoGetRelatedDeviceObject=IoGetRelatedDeviceObject@4
IoInitializeDpcRequest IoGetRequestorProcess=IoGetRequestorProcess@4
IoGetStackLimits=IoGetStackLimits@8
IoGetTopLevelIrp=IoGetTopLevelIrp@0
IoInitializeIrp=IoInitializeIrp@12 IoInitializeIrp=IoInitializeIrp@12
IoInitializeTimer IoInitializeTimer=IoInitializeTimer@12
IoIsOperationSynchronous=IoIsOperationSynchronous@4 IoIsOperationSynchronous=IoIsOperationSynchronous@4
IoMakeAssociatedIrp@8 IoMakeAssociatedIrp=IoMakeAssociatedIrp@8
IoMarkIrpPending IoOpenDeviceInstanceKey=IoOpenDeviceInstanceKey@20
IoRegisterFileSystem IoPageRead=IoPageRead@20
IoRequestDpc IoQueryDeviceDescription=IoQueryDeviceDescription@32
IoStartPacket IoQueryDeviceEnumInfo=IoQueryDeviceEnumInfo@8
IoStartNextPacket IoQueryFileInformation=IoQueryFileInformation@20
IoStartNextPacketByKey IoQueryVolumeInformation=IoQueryVolumeInformation@20
IoStartTimer IoQueueThreadIrp=IoQueueThreadIrp@4
IoStopTimer IoRaiseHardError=IoRaiseHardError@12
IoRaiseInformationalHardError=IoRaiseInformationalHardError@12
IoReadOperationCount DATA
IoReadTransferCount=IoAdapterObjectType DATA
IoRegisterDriverReinitialization=IoRegisterDriverReinitialization@12
IoRegisterFileSystem=IoRegisterFileSystem@4
IoRegisterFsRegistrationChange=IoRegisterFsRegistrationChange@8
IoRegisterShutdownNotification=IoRegisterShutdownNotification@4
IoReleaseCancelSpinLock=IoReleaseCancelSpinLock@4
IoReleaseVpbSpinLock=IoReleaseVpbSpinLock@4
IoRemoveShareAccess=IoRemoveShareAccess@8
;IoReportHalResourceUsage
IoReportResourceUsage=IoReportResourceUsage@36
IoSetDeviceToVerify=IoSetDeviceToVerify@8
IoSetHardErrorOrVerifyDevice=IoSetHardErrorOrVerifyDevice@8
IoSetInformation=IoSetInformation@16
IoSetShareAccess=IoSetShareAccess@16
IoSetThreadHardErrorMode=IoSetThreadHardErrorMode@4
IoSetTopLevelIrp=IoSetTopLevelIrp@4
IoStartNextPacket=IoStartNextPacket@8
IoStartNextPacketByKey=IoStartNextPacketByKey@12
IoStartPacket=IoStartPacket@16
IoStartTimer=IoStartTimer@4
IoStatisticsLock DATA
IoStopTimer=IoStopTimer@4
IoSynchronousPageWrite=IoSynchronousPageWrite@20
IoThreadToProcess=IoThreadToProcess@4
IoUnregisterFileSystem=IoUnregisterFileSystem@4
IoUnregisterFsRegistrationChange=IoUnregisterFsRegistrationChange@8
IoUnregisterShutdownNotification=IoUnregisterShutdownNotification@4
IoUpdateShareAccess=IoUpdateShareAccess@8
IoVerifyVolume=IoVerifyVolume@8
IoWriteErrorLogEntry=IoWriteErrorLogEntry@4
IoWriteOperationCount=IoDeviceObjectType DATA
IoWriteTransferCount DATA
;IofCallDriver=@IofCallDriver@0 ;IofCallDriver=@IofCallDriver@0
IofCallDriver=IofCallDriver@8 IofCallDriver=IofCallDriver@8
;IofCompleteRequest=@IofCompleteRequest@0 ;IofCompleteRequest=@IofCompleteRequest@0
@ -579,6 +648,13 @@ wcsstr
wcstombs wcstombs
wctomb wctomb
; ;
; ReactOS Extensions
;
IoGetCurrentIrpStackLocation
IoInitializeDpcRequest
IoMarkIrpPending
IoRequestDpc
;
; ;
; exports from hal.dll ; exports from hal.dll
; ;
@ -631,14 +707,14 @@ HalSetRealTimeClock=HalSetRealTimeClock@4
;HalStopProfileInterrupt ;HalStopProfileInterrupt
;HalSystemVectorDispatchEntry ;HalSystemVectorDispatchEntry
HalTranslateBusAddress=HalTranslateBusAddress@24 HalTranslateBusAddress=HalTranslateBusAddress@24
;IoAssignDriveLetters IoAssignDriveLetters=IoAssignDriveLetters@16
;IoFlushAdapterBuffers IoFlushAdapterBuffers=IoFlushAdapterBuffers@24
;IoFreeAdapterChannel IoFreeAdapterChannel=IoFreeAdapterChannel@4
;IoFreeMapRegisters IoFreeMapRegisters=IoFreeMapRegisters@12
;IoMapTransfer IoMapTransfer=IoMapTransfer@24
;IoReadPartitionTable IoReadPartitionTable=IoReadPartitionTable@16
;IoSetPartitionInformation IoSetPartitionInformation=IoSetPartitionInformation@16
;IoWritePartitionTable IoWritePartitionTable=IoWritePartitionTable@20
KdComPortInUse DATA KdComPortInUse DATA
KdPortGetByte=KdPortGetByte@4 KdPortGetByte=KdPortGetByte@4
KdPortInitialize=KdPortInitialize@12 KdPortInitialize=KdPortInitialize@12
@ -675,3 +751,4 @@ WRITE_PORT_ULONG=WRITE_PORT_ULONG@8
WRITE_PORT_USHORT=WRITE_PORT_USHORT@8 WRITE_PORT_USHORT=WRITE_PORT_USHORT@8
InsertTailList InsertTailList
RemoveEntryList RemoveEntryList