mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
Mostly STDCALL fixes.
svn path=/trunk/; revision=1966
This commit is contained in:
@@ -11,16 +11,17 @@
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <wchar.h>
|
||||
#include <internal/string.h>
|
||||
#include <string.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "ext2fs.h"
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
NTSTATUS Ext2SetInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2SetInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
DPRINT("Ext2SetInformation(DeviceObject %x Irp %x)\n",DeviceObject,Irp);
|
||||
|
||||
@@ -32,7 +33,8 @@ NTSTATUS Ext2SetInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
return(STATUS_UNSUCCESSFUL);
|
||||
}
|
||||
|
||||
NTSTATUS Ext2QueryInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2QueryInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PIO_STACK_LOCATION Param;
|
||||
@@ -54,7 +56,7 @@ NTSTATUS Ext2QueryInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
FileObject = Param->FileObject;
|
||||
DeviceExt = DeviceObject->DeviceExtension;
|
||||
Length = Param->Parameters.QueryFile.Length;
|
||||
Buffer = Param->AssociatedIrp.SystemBuffer;
|
||||
Buffer = Irp->AssociatedIrp.SystemBuffer;
|
||||
|
||||
switch (Param->Parameters.QueryFile.FileInformationClass)
|
||||
{
|
||||
@@ -122,7 +124,7 @@ NTSTATUS Ext2QueryInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
|
||||
|
||||
Irp->IoStatus.Status = Status;
|
||||
if (NT_SUCCESS(Status)
|
||||
if (NT_SUCCESS(Status))
|
||||
Irp->IoStatus.Information =
|
||||
Param->Parameters.QueryFile.Length - Length;
|
||||
else
|
||||
|
||||
@@ -10,20 +10,19 @@
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "ext2fs.h"
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
BOOLEAN Ext2ReadSectors(IN PDEVICE_OBJECT pDeviceObject,
|
||||
IN ULONG DiskSector,
|
||||
IN ULONG SectorCount,
|
||||
IN PVOID Buffer)
|
||||
BOOLEAN
|
||||
Ext2ReadSectors(IN PDEVICE_OBJECT pDeviceObject,
|
||||
IN ULONG DiskSector,
|
||||
IN ULONG SectorCount,
|
||||
IN PVOID Buffer)
|
||||
{
|
||||
LARGE_INTEGER sectorNumber;
|
||||
PIRP irp;
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <wchar.h>
|
||||
#include <internal/string.h>
|
||||
#include <string.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "ext2fs.h"
|
||||
|
||||
@@ -97,7 +97,7 @@ PVOID Ext2ProcessDirEntry(PDEVICE_EXTENSION DeviceExt,
|
||||
}
|
||||
return(Buffer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
NTSTATUS Ext2QueryDirectory(PDEVICE_EXTENSION DeviceExt,
|
||||
PEXT2_FCB Fcb,
|
||||
@@ -157,7 +157,8 @@ NTSTATUS Ext2QueryDirectory(PDEVICE_EXTENSION DeviceExt,
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
NTSTATUS Ext2DirectoryControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2DirectoryControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
PFILE_OBJECT FileObject = Stack->FileObject;
|
||||
@@ -310,13 +311,14 @@ NTSTATUS Ext2OpenFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
||||
DPRINT("Found file\n");
|
||||
|
||||
Fcb->inode = current_inode;
|
||||
CcRosInitializeFileCache(FileObject, &Fcb->Bcb);
|
||||
CcRosInitializeFileCache(FileObject, &Fcb->Bcb, PAGESIZE*3);
|
||||
FileObject->FsContext = Fcb;
|
||||
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
NTSTATUS Ext2Create(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2Create(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
PFILE_OBJECT FileObject = Stack->FileObject;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntifs.h>
|
||||
|
||||
BOOLEAN Ext2ReadSectors(IN PDEVICE_OBJECT pDeviceObject,
|
||||
@@ -16,7 +17,7 @@ struct ext2_super_block {
|
||||
ULONG s_first_data_block; /* First Data Block */
|
||||
ULONG s_log_block_size; /* Block size */
|
||||
LONG s_log_frag_size; /* Fragment size */
|
||||
ULONG s_blocks_per_group; /* # Blocks per group */
|
||||
ULONG s_blocks_per_group; /* # Blocks per group */
|
||||
ULONG s_frags_per_group; /* # Fragments per group */
|
||||
ULONG s_inodes_per_group; /* # Inodes per group */
|
||||
ULONG s_mtime; /* Mount time */
|
||||
@@ -263,19 +264,19 @@ NTSTATUS Ext2ReadFile(PDEVICE_EXTENSION DeviceExt,
|
||||
PVOID Buffer,
|
||||
ULONG Length,
|
||||
LARGE_INTEGER Offset);
|
||||
NTSTATUS Ext2Create(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2DirectoryControl(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2QueryQuota(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2SetQuota(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2SetSecurity(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2QuerySecurity(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2SetInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2QueryInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2Read(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2Write(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2Cleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2FlushBuffers(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2Shutdown(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2Create(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2DirectoryControl(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2QueryQuota(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2SetQuota(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2SetSecurity(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2QuerySecurity(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2SetInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2QueryInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2Read(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2Write(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2Cleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2FlushBuffers(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL Ext2Shutdown(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS Ext2ReadPage(PDEVICE_EXTENSION DeviceExt,
|
||||
PEXT2_FCB Fcb,
|
||||
PVOID Buffer,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "ext2fs.h"
|
||||
|
||||
|
||||
@@ -11,11 +11,9 @@
|
||||
/* INCLUDES ****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "ext2fs.h"
|
||||
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
# $Id: makefile,v 1.9 2001/06/12 12:32:46 ekohl Exp $
|
||||
# $Id: makefile,v 1.10 2001/06/13 10:59:29 ekohl Exp $
|
||||
#
|
||||
# Linux Ext2 IFS Driver
|
||||
#
|
||||
BASE_CFLAGS = -I../../../include
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGETNAME=ext2fs
|
||||
|
||||
OBJECTS = super.o blockdev.o inode.o file.o dir.o rw.o quota.o security.o \
|
||||
attr.o ext2.coff ../../../ntoskrnl/ntoskrnl.a
|
||||
attr.o ext2.coff
|
||||
|
||||
LIBS = ../../../ntoskrnl/ntoskrnl.a
|
||||
|
||||
CFLAGS = -g -Wall
|
||||
|
||||
all: $(TARGETNAME).sys
|
||||
|
||||
@@ -23,7 +27,7 @@ clean:
|
||||
|
||||
.phony: clean
|
||||
|
||||
ext2fs.sys: $(OBJECTS)
|
||||
ext2fs.sys: $(OBJECTS) $(LIBS)
|
||||
$(CC) \
|
||||
-specs=../../svc_specs \
|
||||
-mdll \
|
||||
@@ -32,7 +36,7 @@ ext2fs.sys: $(OBJECTS)
|
||||
-Wl,--defsym,_edata=__data_end__ \
|
||||
-Wl,--defsym,_etext=etext \
|
||||
-Wl,--base-file,base.tmp \
|
||||
$(OBJECTS)
|
||||
$(OBJECTS) $(LIBS)
|
||||
$(RM) junk.tmp
|
||||
$(DLLTOOL) \
|
||||
--dllname $(TARGETNAME).sys \
|
||||
@@ -46,7 +50,7 @@ ext2fs.sys: $(OBJECTS)
|
||||
-specs=../../svc_specs \
|
||||
-mdll \
|
||||
-o $(TARGETNAME).sys \
|
||||
$(OBJECTS) \
|
||||
$(OBJECTS) $(LIBS) \
|
||||
-Wl,temp.exp
|
||||
$(RM) temp.exp
|
||||
|
||||
|
||||
@@ -11,16 +11,17 @@
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <wchar.h>
|
||||
#include <internal/string.h>
|
||||
#include <string.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "ext2fs.h"
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
NTSTATUS Ext2QueryQuota(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2QueryQuota(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
@@ -33,7 +34,8 @@ NTSTATUS Ext2QueryQuota(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
return(Status);
|
||||
}
|
||||
|
||||
NTSTATUS Ext2SetQuota(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2SetQuota(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "ext2fs.h"
|
||||
|
||||
@@ -146,7 +146,8 @@ NTSTATUS Ext2ReadFile(PDEVICE_EXTENSION DeviceExt,
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS Ext2Write(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2Write(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
DPRINT("Ext2Write(DeviceObject %x Irp %x)\n",DeviceObject,Irp);
|
||||
|
||||
@@ -155,7 +156,8 @@ NTSTATUS Ext2Write(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
return(STATUS_UNSUCCESSFUL);
|
||||
}
|
||||
|
||||
NTSTATUS Ext2FlushBuffers(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2FlushBuffers(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
DPRINT("Ext2FlushBuffers(DeviceObject %x Irp %x)\n",DeviceObject,Irp);
|
||||
|
||||
@@ -164,7 +166,8 @@ NTSTATUS Ext2FlushBuffers(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
return(STATUS_UNSUCCESSFUL);
|
||||
}
|
||||
|
||||
NTSTATUS Ext2Shutdown(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2Shutdown(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
DPRINT("Ext2Shutdown(DeviceObject %x Irp %x)\n",DeviceObject,Irp);
|
||||
|
||||
@@ -173,7 +176,8 @@ NTSTATUS Ext2Shutdown(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
return(STATUS_UNSUCCESSFUL);
|
||||
}
|
||||
|
||||
NTSTATUS Ext2Cleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2Cleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
DbgPrint("Ext2Cleanup(DeviceObject %x Irp %x)\n",DeviceObject,Irp);
|
||||
|
||||
@@ -185,7 +189,8 @@ NTSTATUS Ext2Cleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
return(STATUS_UNSUCCESSFUL);
|
||||
}
|
||||
|
||||
NTSTATUS Ext2Read(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2Read(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
ULONG Length;
|
||||
PVOID Buffer;
|
||||
|
||||
@@ -11,17 +11,18 @@
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <wchar.h>
|
||||
#include <internal/string.h>
|
||||
#include <string.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "ext2fs.h"
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
NTSTATUS Ext2QuerySecurity(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
NTSTATUS STDCALL
|
||||
Ext2QuerySecurity(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
DPRINT("Ext2QuerySecurity(DeviceObject %x Irp %x)\n",DeviceObject,Irp);
|
||||
|
||||
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
|
||||
@@ -29,8 +30,9 @@ NTSTATUS Ext2QuerySecurity(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
return(STATUS_UNSUCCESSFUL);
|
||||
}
|
||||
|
||||
NTSTATUS Ext2SetSecurity(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
NTSTATUS STDCALL
|
||||
Ext2SetSecurity(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
DPRINT("Ext2SetSecurity(DeviceObject %x Irp %x)\n",DeviceObject,Irp);
|
||||
|
||||
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
|
||||
|
||||
@@ -10,11 +10,9 @@
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <wchar.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "ext2fs.h"
|
||||
|
||||
@@ -24,9 +22,10 @@ static PDRIVER_OBJECT DriverObject;
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
NTSTATUS Ext2Close(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2Close(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack;
|
||||
PIO_STACK_LOCATION Stack;
|
||||
PFILE_OBJECT FileObject;
|
||||
PDEVICE_EXTENSION DeviceExtension;
|
||||
NTSTATUS Status;
|
||||
@@ -111,14 +110,16 @@ NTSTATUS Ext2Mount(PDEVICE_OBJECT DeviceToMount)
|
||||
DeviceExt->FileObject = IoCreateStreamFileObject(NULL, DeviceObject);
|
||||
DeviceExt->superblock = superblock;
|
||||
CcRosInitializeFileCache(DeviceExt->FileObject,
|
||||
&DeviceExt->Bcb);
|
||||
&DeviceExt->Bcb,
|
||||
PAGESIZE * 3);
|
||||
|
||||
DPRINT("Ext2Mount() = STATUS_SUCCESS\n");
|
||||
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
NTSTATUS Ext2FileSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
Ext2FileSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
PVPB vpb = Stack->Parameters.Mount.Vpb;
|
||||
@@ -134,8 +135,9 @@ NTSTATUS Ext2FileSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
return(Status);
|
||||
}
|
||||
|
||||
NTSTATUS DriverEntry(PDRIVER_OBJECT _DriverObject,
|
||||
PUNICODE_STRING RegistryPath)
|
||||
NTSTATUS STDCALL
|
||||
DriverEntry(PDRIVER_OBJECT _DriverObject,
|
||||
PUNICODE_STRING RegistryPath)
|
||||
/*
|
||||
* FUNCTION: Called by the system to initalize the driver
|
||||
* ARGUMENTS:
|
||||
@@ -146,19 +148,18 @@ NTSTATUS DriverEntry(PDRIVER_OBJECT _DriverObject,
|
||||
{
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
NTSTATUS ret;
|
||||
UNICODE_STRING DeviceNameU;
|
||||
ANSI_STRING DeviceNameA;
|
||||
UNICODE_STRING DeviceName;
|
||||
|
||||
DbgPrint("Ext2 FSD 0.0.1\n");
|
||||
|
||||
|
||||
DriverObject = _DriverObject;
|
||||
|
||||
RtlInitAnsiString(&DeviceNameA,"\\Device\\Ext2Fsd");
|
||||
RtlAnsiStringToUnicodeString(&DeviceNameU,&DeviceNameA,TRUE);
|
||||
RtlInitUnicodeString(&DeviceName,
|
||||
L"\\Device\\Ext2Fsd");
|
||||
ret = IoCreateDevice(DriverObject,
|
||||
0,
|
||||
&DeviceNameU,
|
||||
FILE_DEVICE_FILE_SYSTEM,
|
||||
&DeviceName,
|
||||
FILE_DEVICE_FILE_SYSTEM,
|
||||
0,
|
||||
FALSE,
|
||||
&DeviceObject);
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
minixfs.coff
|
||||
minix.coff
|
||||
minixfs.sys.unstripped
|
||||
@@ -1,11 +1,11 @@
|
||||
# $Id: Makefile,v 1.3 2001/06/12 12:33:10 ekohl Exp $
|
||||
# $Id: Makefile,v 1.4 2001/06/13 10:59:50 ekohl Exp $
|
||||
#
|
||||
#
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET=minixfs
|
||||
|
||||
OBJECTS = $(TARGET).o $(TARGET).coff ../../../ntoskrnl/ntoskrnl.a
|
||||
OBJECTS = $(TARGET).o minix.coff ../../../ntoskrnl/ntoskrnl.a
|
||||
|
||||
CFLAGS = -I. -g
|
||||
|
||||
@@ -15,10 +15,11 @@ all: $(TARGET).sys
|
||||
|
||||
clean:
|
||||
- $(RM) *.o
|
||||
- $(RM) $(TARGET).coff
|
||||
- $(RM) *.coff
|
||||
- $(RM) junk.tmp
|
||||
- $(RM) base.tmp
|
||||
- $(RM) temp.exp
|
||||
- $(RM) *.sym
|
||||
- $(RM) $(TARGET).sys
|
||||
- $(RM) $(TARGET).sys.unstripped
|
||||
|
||||
@@ -39,7 +40,9 @@ MOBJECTS = block.o blockdev.o cache.o dir.o inode.o mount.o rw.o bitops.o
|
||||
minixfs.o: $(MOBJECTS)
|
||||
$(LD) -r -o minixfs.o $(MOBJECTS)
|
||||
|
||||
$(TARGET).sys: $(OBJECTS)
|
||||
$(TARGET).sys: $(OBJECTS) minix.coff
|
||||
|
||||
minix.coff: ../../../include/reactos/buildno.h minix.rc
|
||||
|
||||
WITH_DEBUGGING=yes
|
||||
include ../../../rules.mak
|
||||
|
||||
@@ -156,7 +156,9 @@ NTSTATUS MinixOpen(PDEVICE_OBJECT DeviceObject,
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
NTSTATUS MinixClose(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
MinixClose(PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
PFILE_OBJECT FileObject = Stack->FileObject;
|
||||
@@ -172,8 +174,9 @@ NTSTATUS MinixClose(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
NTSTATUS MinixDirectoryControl(PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
MinixDirectoryControl(PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
// PFILE_OBJECT FileObject = Stack->FileObject;
|
||||
@@ -190,7 +193,9 @@ NTSTATUS MinixDirectoryControl(PDEVICE_OBJECT DeviceObject,
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
NTSTATUS MinixCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
MinixCreate(PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
PFILE_OBJECT FileObject = Stack->FileObject;
|
||||
|
||||
@@ -101,10 +101,11 @@ typedef struct
|
||||
struct minix_inode inode;
|
||||
} MINIX_FSCONTEXT, *PMINIX_FSCONTEXT;
|
||||
|
||||
NTSTATUS MinixCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS MinixClose(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS MinixWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS MinixRead(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL MinixCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL MinixClose(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL MinixWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL MinixRead(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
NTSTATUS STDCALL MinixDirectoryControl(PDEVICE_OBJECT DeviceObject, PIRP Irp);
|
||||
|
||||
ULONG MinixNewInode(PDEVICE_OBJECT Volume,
|
||||
MINIX_DEVICE_EXTENSION* DeviceExt,
|
||||
|
||||
@@ -63,7 +63,8 @@ VOID MinixMount(PDEVICE_OBJECT DeviceToMount)
|
||||
DeviceExt->FileObject = IoCreateStreamFileObject(NULL, DeviceObject);
|
||||
}
|
||||
|
||||
NTSTATUS MinixFileSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
MinixFileSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
// PVPB vpb = Stack->Parameters.Mount.Vpb;
|
||||
@@ -103,8 +104,9 @@ NTSTATUS MinixFileSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
return(Status);
|
||||
}
|
||||
|
||||
NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT _DriverObject,
|
||||
PUNICODE_STRING RegistryPath)
|
||||
NTSTATUS STDCALL
|
||||
DriverEntry(PDRIVER_OBJECT _DriverObject,
|
||||
PUNICODE_STRING RegistryPath)
|
||||
/*
|
||||
* FUNCTION: Called by the system to initalize the driver
|
||||
* ARGUMENTS:
|
||||
@@ -115,17 +117,18 @@ NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT _DriverObject,
|
||||
{
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
NTSTATUS ret;
|
||||
UNICODE_STRING ustr;
|
||||
|
||||
UNICODE_STRING DeviceName;
|
||||
|
||||
DbgPrint("Minix FSD 0.0.1\n");
|
||||
|
||||
|
||||
DriverObject = _DriverObject;
|
||||
|
||||
RtlInitUnicodeString(&ustr, L"\\Device\\Minix");
|
||||
RtlInitUnicodeString(&DeviceName,
|
||||
L"\\Device\\Minix");
|
||||
ret = IoCreateDevice(DriverObject,
|
||||
0,
|
||||
&ustr,
|
||||
FILE_DEVICE_FILE_SYSTEM,
|
||||
&DeviceName,
|
||||
FILE_DEVICE_FILE_SYSTEM,
|
||||
0,
|
||||
FALSE,
|
||||
&DeviceObject);
|
||||
@@ -141,6 +144,8 @@ NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT _DriverObject,
|
||||
DriverObject->MajorFunction[IRP_MJ_WRITE] = MinixWrite;
|
||||
DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] =
|
||||
MinixFileSystemControl;
|
||||
DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] =
|
||||
MinixDirectoryControl;
|
||||
DriverObject->DriverUnload = NULL;
|
||||
|
||||
IoRegisterFileSystem(DeviceObject);
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
NTSTATUS MinixWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
MinixWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
DPRINT("MinixWrite(DeviceObject %x Irp %x)\n",DeviceObject,Irp);
|
||||
|
||||
@@ -55,7 +56,8 @@ static NTSTATUS MinixReadFilePage(PDEVICE_OBJECT DeviceObject,
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
NTSTATUS MinixRead(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
NTSTATUS STDCALL
|
||||
MinixRead(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||
{
|
||||
ULONG Length;
|
||||
PVOID Buffer;
|
||||
|
||||
Reference in New Issue
Block a user