fixed warnings when compiled with -Wmissing-declarations

svn path=/trunk/; revision=18302
This commit is contained in:
Thomas Bluemel 2005-10-06 21:39:18 +00:00
parent 03e3c42104
commit 5bd4220e33
84 changed files with 453 additions and 362 deletions

View file

@ -239,7 +239,7 @@ acpi_ds_create_operand (
ACPI_OPERAND_OBJECT *obj_desc;
ACPI_PARSE_OBJECT *parent_op;
u16 opcode;
u32 flags;
u32 flags = 0;
OPERATING_MODE interpreter_mode;

View file

@ -74,7 +74,7 @@ acpi_aml_unlink_mutex (
*
******************************************************************************/
void
static void
acpi_aml_link_mutex (
ACPI_OPERAND_OBJECT *obj_desc,
ACPI_OPERAND_OBJECT *list_head)

View file

@ -53,7 +53,7 @@
*
******************************************************************************/
ACPI_STATUS
static ACPI_STATUS
acpi_aml_check_object_type (
ACPI_OBJECT_TYPE type_needed,
ACPI_OBJECT_TYPE this_type,

View file

@ -108,13 +108,14 @@ static inline UCHAR ReadData(VOID)
return READ_PORT_UCHAR(IsaPnPReadPort);
}
UCHAR ReadUchar(UCHAR Index)
static UCHAR ReadUchar(UCHAR Index)
{
WriteAddress(Index);
return ReadData();
}
USHORT ReadUshort(UCHAR Index)
#if 0
static USHORT ReadUshort(UCHAR Index)
{
USHORT Value;
@ -123,7 +124,7 @@ USHORT ReadUshort(UCHAR Index)
return Value;
}
ULONG ReadUlong(UCHAR Index)
static ULONG ReadUlong(UCHAR Index)
{
ULONG Value;
@ -133,26 +134,29 @@ ULONG ReadUlong(UCHAR Index)
Value = (Value << 8) + ReadUchar(Index + 3);
return Value;
}
#endif
VOID WriteUchar(UCHAR Index, UCHAR Value)
static VOID WriteUchar(UCHAR Index, UCHAR Value)
{
WriteAddress(Index);
WriteData(Value);
}
VOID WriteUshort(UCHAR Index, USHORT Value)
#if 0
static VOID WriteUshort(UCHAR Index, USHORT Value)
{
WriteUchar(Index, Value >> 8);
WriteUchar(Index + 1, Value);
}
VOID WriteUlong(UCHAR Index, ULONG Value)
static VOID WriteUlong(UCHAR Index, ULONG Value)
{
WriteUchar(Index, Value >> 24);
WriteUchar(Index + 1, Value >> 16);
WriteUchar(Index + 2, Value >> 8);
WriteUchar(Index + 3, Value);
}
#endif
static inline VOID SetReadDataPort(ULONG Port)
{
@ -187,29 +191,31 @@ static VOID SendWait(VOID)
WriteUchar(0x02, 0x02);
}
VOID SendWake(UCHAR csn)
static VOID SendWake(UCHAR csn)
{
WriteUchar(ISAPNP_CARD_WAKECSN, csn);
}
VOID SelectLogicalDevice(UCHAR LogicalDevice)
#if 0
static VOID SelectLogicalDevice(UCHAR LogicalDevice)
{
WriteUchar(ISAPNP_CARD_LOG_DEVICE_NUM, LogicalDevice);
}
VOID ActivateLogicalDevice(UCHAR LogicalDevice)
static VOID ActivateLogicalDevice(UCHAR LogicalDevice)
{
SelectLogicalDevice(LogicalDevice);
WriteUchar(ISAPNP_CONTROL_ACTIVATE, 0x1);
KeStallExecutionProcessor(250);
}
VOID DeactivateLogicalDevice(UCHAR LogicalDevice)
static VOID DeactivateLogicalDevice(UCHAR LogicalDevice)
{
SelectLogicalDevice(LogicalDevice);
WriteUchar(ISAPNP_CONTROL_ACTIVATE, 0x0);
KeStallExecutionProcessor(500);
}
#endif
#define READ_DATA_PORT_STEP 32 /* Minimum is 4 */
@ -357,7 +363,7 @@ next:
}
VOID Peek(PUCHAR Data, ULONG Count)
static VOID Peek(PUCHAR Data, ULONG Count)
{
ULONG i, j;
UCHAR d = 0;
@ -1414,7 +1420,7 @@ static NTSTATUS BuildDeviceList(PISAPNP_DEVICE_EXTENSION DeviceExtension)
}
NTSTATUS
static NTSTATUS
ISAPNPQueryBusRelations(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@ -1482,7 +1488,7 @@ ISAPNPQueryBusRelations(
}
NTSTATUS
static NTSTATUS
ISAPNPQueryDeviceRelations(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@ -1511,7 +1517,7 @@ ISAPNPQueryDeviceRelations(
}
NTSTATUS
static NTSTATUS
ISAPNPStartDevice(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@ -1550,7 +1556,7 @@ ISAPNPStartDevice(
}
NTSTATUS
static NTSTATUS
ISAPNPStopDevice(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@ -1571,7 +1577,7 @@ ISAPNPStopDevice(
}
NTSTATUS
static NTSTATUS
STDCALL
ISAPNPDispatchOpenClose(
IN PDEVICE_OBJECT DeviceObject,
@ -1587,7 +1593,7 @@ ISAPNPDispatchOpenClose(
}
NTSTATUS
static NTSTATUS
STDCALL
ISAPNPDispatchReadWrite(
IN PDEVICE_OBJECT PhysicalDeviceObject,
@ -1603,7 +1609,7 @@ ISAPNPDispatchReadWrite(
}
NTSTATUS
static NTSTATUS
STDCALL
ISAPNPDispatchDeviceControl(
IN PDEVICE_OBJECT DeviceObject,
@ -1635,7 +1641,7 @@ ISAPNPDispatchDeviceControl(
}
NTSTATUS
static NTSTATUS
STDCALL
ISAPNPControl(
IN PDEVICE_OBJECT DeviceObject,
@ -1677,7 +1683,7 @@ ISAPNPControl(
}
NTSTATUS
static NTSTATUS
STDCALL
ISAPNPAddDevice(
IN PDRIVER_OBJECT DriverObject,

View file

@ -324,6 +324,12 @@ typedef struct _ISAPNP_DEVICE_EXTENSION
ISAPNP_DEVICE_STATE State;
} ISAPNP_DEVICE_EXTENSION, *PISAPNP_DEVICE_EXTENSION;
NTSTATUS
STDCALL
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath);
#ifdef __cplusplus
}
#endif

View file

@ -9,6 +9,7 @@
*/
#include <ddk/ntddk.h>
#include <ddk/ntifs.h>
#include <stdio.h>
#include "pcidef.h"
@ -32,7 +33,7 @@
/*** PRIVATE *****************************************************************/
NTSTATUS
static NTSTATUS
STDCALL
PciDispatchDeviceControl(
IN PDEVICE_OBJECT DeviceObject,
@ -67,7 +68,7 @@ PciDispatchDeviceControl(
}
NTSTATUS
static NTSTATUS
STDCALL
PciPnpControl(
IN PDEVICE_OBJECT DeviceObject,
@ -98,7 +99,7 @@ PciPnpControl(
}
NTSTATUS
static NTSTATUS
STDCALL
PciPowerControl(
IN PDEVICE_OBJECT DeviceObject,
@ -127,7 +128,7 @@ PciPowerControl(
}
NTSTATUS
static NTSTATUS
STDCALL
PciAddDevice(
IN PDRIVER_OBJECT DriverObject,
@ -184,65 +185,6 @@ DriverEntry(
}
BOOLEAN
PciCreateUnicodeString(
PUNICODE_STRING Destination,
PWSTR Source,
POOL_TYPE PoolType)
{
ULONG Length;
if (!Source)
{
RtlInitUnicodeString(Destination, NULL);
return TRUE;
}
Length = (wcslen(Source) + 1) * sizeof(WCHAR);
Destination->Buffer = ExAllocatePool(PoolType, Length);
if (Destination->Buffer == NULL)
{
return FALSE;
}
RtlCopyMemory(Destination->Buffer, Source, Length);
Destination->MaximumLength = Length;
Destination->Length = Length - sizeof(WCHAR);
return TRUE;
}
NTSTATUS
PciDuplicateUnicodeString(
PUNICODE_STRING Destination,
PUNICODE_STRING Source,
POOL_TYPE PoolType)
{
if (Source == NULL)
{
RtlInitUnicodeString(Destination, NULL);
return STATUS_SUCCESS;
}
Destination->Buffer = ExAllocatePool(PoolType, Source->MaximumLength);
if (Destination->Buffer == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
Destination->MaximumLength = Source->MaximumLength;
Destination->Length = Source->Length;
RtlCopyMemory(Destination->Buffer, Source->Buffer, Source->MaximumLength);
return STATUS_SUCCESS;
}
BOOLEAN
PciCreateDeviceIDString(PUNICODE_STRING DeviceID,
PPCI_DEVICE Device)
@ -257,7 +199,7 @@ PciCreateDeviceIDString(PUNICODE_STRING DeviceID,
Device->PciConfig.u.type0.SubVendorID,
Device->PciConfig.RevisionID);
if (!PciCreateUnicodeString(DeviceID, Buffer, PagedPool))
if (!RtlCreateUnicodeString(DeviceID, Buffer))
{
return FALSE;
}
@ -311,12 +253,12 @@ PciCreateInstanceIDString(PUNICODE_STRING InstanceID,
{
//DPRINT("xbox ohci controler found at bus 0x%lX, dev num %d, func num %d\n", Device->BusNumber, Device->SlotNumber.u.bits.DeviceNumber, Device->SlotNumber.u.bits.FunctionNumber);
if (Device->SlotNumber.u.bits.DeviceNumber == 2)
return PciCreateUnicodeString(InstanceID, L"0000", PagedPool);
return RtlCreateUnicodeString(InstanceID, L"0000");
else
return PciCreateUnicodeString(InstanceID, L"0001", PagedPool);
return RtlCreateUnicodeString(InstanceID, L"0001");
}
else
return PciCreateUnicodeString(InstanceID, L"0000", PagedPool);
return RtlCreateUnicodeString(InstanceID, L"0000");
}

View file

@ -112,12 +112,6 @@ PciCreateUnicodeString(
PWSTR Source,
POOL_TYPE PoolType);
NTSTATUS
PciDuplicateUnicodeString(
PUNICODE_STRING Destination,
PUNICODE_STRING Source,
POOL_TYPE PoolType);
BOOLEAN
PciCreateDeviceIDString(
PUNICODE_STRING DeviceID,
@ -160,4 +154,10 @@ PdoPowerControl(
PDEVICE_OBJECT DeviceObject,
PIRP Irp);
NTSTATUS
STDCALL
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath);
#endif /* __PCI_H */

View file

@ -9,6 +9,7 @@
*/
#include <ddk/ntddk.h>
#include <ddk/ntifs.h>
#include <initguid.h>
#include <ddk/wdmguid.h>
#include "pcidef.h"
@ -77,10 +78,10 @@ PdoQueryId(
switch (IrpSp->Parameters.QueryId.IdType) {
case BusQueryDeviceID:
Status = PciDuplicateUnicodeString(
&String,
Status = RtlDuplicateUnicodeString(
RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
&DeviceExtension->DeviceID,
PagedPool);
&String);
DPRINT("DeviceID: %S\n", String.Buffer);
@ -88,28 +89,28 @@ PdoQueryId(
break;
case BusQueryHardwareIDs:
Status = PciDuplicateUnicodeString(
&String,
Status = RtlDuplicateUnicodeString(
RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
&DeviceExtension->HardwareIDs,
PagedPool);
&String);
Irp->IoStatus.Information = (ULONG_PTR)String.Buffer;
break;
case BusQueryCompatibleIDs:
Status = PciDuplicateUnicodeString(
&String,
Status = RtlDuplicateUnicodeString(
RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
&DeviceExtension->CompatibleIDs,
PagedPool);
&String);
Irp->IoStatus.Information = (ULONG_PTR)String.Buffer;
break;
case BusQueryInstanceID:
Status = PciDuplicateUnicodeString(
&String,
Status = RtlDuplicateUnicodeString(
RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
&DeviceExtension->InstanceID,
PagedPool);
&String);
DPRINT("InstanceID: %S\n", String.Buffer);

View file

@ -167,15 +167,15 @@ ReportDetectedDevice(
FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
RtlZeroMemory(PdoDeviceExtension, sizeof(PDO_DEVICE_EXTENSION));
PdoDeviceExtension->Common.IsFDO = FALSE;
Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->DeviceDescription, DeviceDescription, PagedPool);
Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, DeviceDescription, &PdoDeviceExtension->DeviceDescription);
if (!NT_SUCCESS(Status)) goto ByeBye;
Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->DeviceId, DeviceId, PagedPool);
Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, DeviceId, &PdoDeviceExtension->DeviceId);
if (!NT_SUCCESS(Status)) goto ByeBye;
Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->InstanceId, InstanceId, PagedPool);
Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, InstanceId, &PdoDeviceExtension->InstanceId);
if (!NT_SUCCESS(Status)) goto ByeBye;
Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->HardwareIds, HardwareIds, PagedPool);
Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, HardwareIds, &PdoDeviceExtension->HardwareIds);
if (!NT_SUCCESS(Status)) goto ByeBye;
Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->CompatibleIds, CompatibleIds, PagedPool);
Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, CompatibleIds, &PdoDeviceExtension->CompatibleIds);
if (!NT_SUCCESS(Status)) goto ByeBye;
/* Device attached to serial port (Pdo) may delegate work to

View file

@ -68,7 +68,7 @@ SerenumAddDevice(
return STATUS_SUCCESS;
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
SerenumFdoStartDevice(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
@ -93,7 +93,7 @@ SerenumFdoStartDevice(
return STATUS_SUCCESS;
}
NTSTATUS
static NTSTATUS
SerenumFdoQueryBusRelations(
IN PDEVICE_OBJECT DeviceObject,
OUT PDEVICE_RELATIONS* pDeviceRelations)

View file

@ -11,33 +11,6 @@
#include "serenum.h"
#include <stdarg.h>
NTSTATUS
SerenumDuplicateUnicodeString(
OUT PUNICODE_STRING Destination,
IN PUNICODE_STRING Source,
IN POOL_TYPE PoolType)
{
ASSERT(Destination);
if (Source == NULL)
{
RtlInitUnicodeString(Destination, NULL);
return STATUS_SUCCESS;
}
Destination->Buffer = ExAllocatePoolWithTag(PoolType, Source->MaximumLength, SERENUM_TAG);
if (Destination->Buffer == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
Destination->MaximumLength = Source->MaximumLength;
Destination->Length = Source->Length;
RtlCopyMemory(Destination->Buffer, Source->Buffer, Source->MaximumLength);
return STATUS_SUCCESS;
}
/* I really want PCSZ strings as last arguments because
* PnP ids are ANSI-encoded in PnP device string
* identification */
@ -113,7 +86,7 @@ SerenumInitMultiSzString(
return Status;
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
ForwardIrpAndWaitCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,

View file

@ -69,10 +69,10 @@ SerenumPdoQueryId(
return STATUS_NOT_SUPPORTED;
}
Status = SerenumDuplicateUnicodeString(
&String,
Status = RtlDuplicateUnicodeString(
RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
SourceString,
PagedPool);
&String);
*Information = (ULONG_PTR)String.Buffer;
return Status;
}

View file

@ -11,7 +11,7 @@
#define INITGUID
#include "serenum.h"
NTSTATUS STDCALL
static NTSTATUS STDCALL
SerenumPnp(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
@ -22,13 +22,13 @@ SerenumPnp(
return SerenumPdoPnp(DeviceObject, Irp);
}
VOID STDCALL
static VOID STDCALL
DriverUnload(IN PDRIVER_OBJECT DriverObject)
{
// nothing to do here yet
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
IrpStub(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)

View file

@ -8,6 +8,7 @@
*/
#include <ntddk.h>
#include <ntifs.h>
#include <ntddser.h>
#include <stdio.h>
@ -106,12 +107,6 @@ SerenumFdoPnp(
/************************************ misc.c */
NTSTATUS
SerenumDuplicateUnicodeString(
OUT PUNICODE_STRING Destination,
IN PUNICODE_STRING Source,
IN POOL_TYPE PoolType);
NTSTATUS
SerenumInitMultiSzString(
OUT PUNICODE_STRING Destination,
@ -143,3 +138,10 @@ NTSTATUS
SerenumPdoPnp(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/************************************ serenum.c */
NTSTATUS STDCALL
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegPath);

View file

@ -18,6 +18,10 @@
#define NDEBUG
#include <debug.h>
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
/* TYEPEDEFS ***************************************************************/
typedef struct _BEEP_DEVICE_EXTENSION

View file

@ -67,6 +67,9 @@ typedef struct _DEVICE_EXTENSION
/* FUNCTIONS **************************************************************/
NTSTATUS STDCALL
DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
static NTSTATUS STDCALL
ScrCreate(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
@ -156,7 +159,7 @@ ScrCreate(PDEVICE_OBJECT DeviceObject,
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
ScrWrite(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
@ -298,7 +301,7 @@ ScrWrite(PDEVICE_OBJECT DeviceObject,
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
ScrIoControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
@ -626,7 +629,7 @@ ScrIoControl(PDEVICE_OBJECT DeviceObject,
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
ScrDispatch(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{

View file

@ -221,7 +221,7 @@ InbvInitVGAMode(VOID)
}
BOOL STDCALL
static BOOL STDCALL
VidResetDisplay(VOID)
{
/*
@ -233,7 +233,7 @@ VidResetDisplay(VOID)
}
VOID STDCALL
static VOID STDCALL
VidCleanUp(VOID)
{
InbvUnmapVideoMemory();
@ -580,7 +580,7 @@ VidInitialize(VOID)
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
VidDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
{
PIO_STACK_LOCATION IrpSp;

View file

@ -121,4 +121,7 @@ typedef struct _VGA_REGISTERS
extern VOID
InbvPutPixels(int x, int y, unsigned long c);
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
#endif /* _BOOTVID_H */

View file

@ -24,8 +24,11 @@
/* INCLUDES */
#include <ddk/ntddk.h>
/* FUNCTIONS */
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
/* FUNCTIONS */
static NTSTATUS STDCALL
DebugOutDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
{
PIO_STACK_LOCATION piosStack = IoGetCurrentIrpStackLocation(Irp);
@ -82,7 +85,7 @@ DebugOutDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
return nErrCode;
}
VOID STDCALL
static VOID STDCALL
DebugOutUnload(PDRIVER_OBJECT DriverObject)
{
}

View file

@ -28,7 +28,7 @@ UINT DeviceCount = 0;
/* FUNCTIONS ***************************************************************/
NTSTATUS InitDevice(
static NTSTATUS InitDevice(
IN PUNICODE_STRING RegistryPath,
IN PVOID Context)
{

View file

@ -148,4 +148,8 @@ NTSTATUS STDCALL LoadSettings(
IN PVOID Context,
IN PVOID EntryContext);
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
#endif

View file

@ -17,8 +17,8 @@
#include <debug.h>
#include "sbdebug.h" // our own debug helper
NTSTATUS
#if 0
static NTSTATUS
OpenDevicesKey(
IN PWSTR RegistryPath,
OUT PHANDLE Key)
@ -67,7 +67,7 @@ OpenDevicesKey(
return s;
}
#endif
NTSTATUS STDCALL EnumDeviceKeys(
@ -275,8 +275,8 @@ NTSTATUS STDCALL LoadSettings(
}
NTSTATUS SaveSettings(
#if 0
static NTSTATUS SaveSettings(
IN PWSTR RegistryPath,
IN ULONG Port,
IN ULONG IRQ,
@ -303,3 +303,5 @@ NTSTATUS SaveSettings(
return STATUS_SUCCESS;
}
#endif

View file

@ -23,7 +23,7 @@ static const NULL_EXTENSION nxNull = NullBitBucket;
static const NULL_EXTENSION nxZero = NullZeroStream;
/* FUNCTIONS */
NTSTATUS STDCALL
static NTSTATUS STDCALL
NullDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PIO_STACK_LOCATION piosStack = IoGetCurrentIrpStackLocation(Irp);
@ -141,7 +141,7 @@ NullDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
return (nErrCode);
}
VOID STDCALL
static VOID STDCALL
NullUnload(PDRIVER_OBJECT DriverObject)
{
}

View file

@ -16,4 +16,7 @@ typedef enum __tagNULL_EXTENSION{
#define NULL_DEVICE_TYPE(__DEVICE__) (*((PNULL_EXTENSION)((__DEVICE__)->DeviceExtension)))
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
/* EOF */

View file

@ -24,6 +24,9 @@
#define LP_S (READ_PORT_UCHAR((PUCHAR)(LP_B+1)))
#define LP_C (LP_B+2)
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
static void Parallel_Reset(void)
/*
* FUNCTION: Resets the device attached to the parallel port
@ -68,7 +71,7 @@ static void Parallel_putchar(unsigned char ch)
WRITE_PORT_UCHAR((PUCHAR)LP_C, LP_PSELECP | LP_PINITP);
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
/*
* FUNCTION: Handles user mode requests

View file

@ -4,7 +4,7 @@
#include <debug.h>
#include "../../lib/bzip2/bzlib.h"
NTSTATUS STDCALL RamdrvDispatchDeviceControl(PDEVICE_OBJECT DeviceObject,
static NTSTATUS STDCALL RamdrvDispatchDeviceControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PIO_STACK_LOCATION IrpStack;
@ -45,7 +45,7 @@ NTSTATUS STDCALL RamdrvDispatchDeviceControl(PDEVICE_OBJECT DeviceObject,
return Status;
}
NTSTATUS STDCALL RamdrvDispatchReadWrite(PDEVICE_OBJECT DeviceObject,
static NTSTATUS STDCALL RamdrvDispatchReadWrite(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PRAMDRV_DEVICE_EXTENSION devext = (PRAMDRV_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
@ -74,7 +74,7 @@ NTSTATUS STDCALL RamdrvDispatchReadWrite(PDEVICE_OBJECT DeviceObject,
return STATUS_SUCCESS;
}
NTSTATUS STDCALL RamdrvDispatchOpenClose(PDEVICE_OBJECT DeviceObject,
static NTSTATUS STDCALL RamdrvDispatchOpenClose(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
DPRINT("RamdrvDispatchOpenClose\n");

View file

@ -3,3 +3,6 @@ typedef struct _RAMDRV_DEVICE_EXTENSION {
unsigned long Size;
} RAMDRV_DEVICE_EXTENSION, *PRAMDRV_DEVICE_EXTENSION;
NTSTATUS STDCALL DriverEntry(IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath);

View file

@ -154,7 +154,7 @@ SerialSetLineControl(
return Status;
}
BOOLEAN
static BOOLEAN
SerialClearPerfStats(
IN PSERIAL_DEVICE_EXTENSION DeviceExtension)
{
@ -165,7 +165,7 @@ SerialClearPerfStats(
return TRUE;
}
BOOLEAN
static BOOLEAN
SerialGetPerfStats(IN PIRP pIrp)
{
PSERIAL_DEVICE_EXTENSION pDeviceExtension;
@ -186,7 +186,7 @@ SerialGetPerfStats(IN PIRP pIrp)
return TRUE;
}
NTSTATUS
static NTSTATUS
SerialGetCommProp(
OUT PSERIAL_COMMPROP pCommProp,
IN PSERIAL_DEVICE_EXTENSION DeviceExtension)
@ -232,7 +232,7 @@ SerialGetCommProp(
return STATUS_SUCCESS;
}
NTSTATUS
static NTSTATUS
SerialGetCommStatus(
OUT PSERIAL_STATUS pSerialStatus,
IN PSERIAL_DEVICE_EXTENSION DeviceExtension)

View file

@ -11,7 +11,7 @@
#define NDEBUG
#include "serial.h"
NTSTATUS STDCALL
static NTSTATUS STDCALL
ForwardIrpAndWaitCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,

View file

@ -10,7 +10,7 @@
//#define NDEBUG
#include "serial.h"
VOID STDCALL
static VOID STDCALL
DriverUnload(IN PDRIVER_OBJECT DriverObject)
{
// nothing to do here yet

View file

@ -345,3 +345,9 @@ SerialWrite(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/************************************ serial.c */
NTSTATUS STDCALL
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegPath);

View file

@ -5,7 +5,7 @@
#include <ddk/ntddk.h>
#include "sndblst.h"
#if 0
BOOLEAN CheckDMA(PDEVICE_EXTENSION Device)
{
// Don't forget to check for Compaq machines (they can't be configured
@ -31,9 +31,10 @@ BOOLEAN CheckDMA(PDEVICE_EXTENSION Device)
return FALSE;
}
#endif
IO_ALLOCATION_ACTION STDCALL SoundProgramDMA(
static IO_ALLOCATION_ACTION STDCALL SoundProgramDMA(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN PVOID MapRegisterBase,
@ -199,3 +200,4 @@ BOOLEAN CreateDMA(PDEVICE_OBJECT DeviceObject)
// DeviceObject); // Context
return TRUE;
}

View file

@ -1,7 +1,7 @@
#include <ddk/ntddk.h>
#include "sndblst.h"
#if 0
BOOLEAN CheckIRQ(PDEVICE_EXTENSION Parameters)
{
static CONST ULONG ValidIRQs[] = VALID_IRQS;
@ -89,3 +89,5 @@ NTSTATUS EnableIRQ(PDEVICE_OBJECT DeviceObject)
return Status == STATUS_INVALID_PARAMETER ?
STATUS_DEVICE_CONFIGURATION_ERROR : Status;
}
#endif

View file

@ -14,6 +14,7 @@
#include "sbdebug.h" // our own debug helper
#if 0
NTSTATUS
OpenDevicesKey(
IN PWSTR RegistryPath,
@ -63,7 +64,7 @@ OpenDevicesKey(
return s;
}
#endif
NTSTATUS STDCALL EnumDeviceKeys(
@ -271,7 +272,7 @@ NTSTATUS STDCALL LoadSettings(
}
#if 0
NTSTATUS SaveSettings(
IN PWSTR RegistryPath,
IN ULONG Port,
@ -297,3 +298,4 @@ NTSTATUS SaveSettings(
return STATUS_SUCCESS;
}
#endif

View file

@ -14,6 +14,9 @@
#include <ddk/ntddk.h>
#include "sndblst.h"
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
/* INTERNAL VARIABLES ******************************************************/
@ -22,7 +25,7 @@ UINT DeviceCount = 0;
/* FUNCTIONS ***************************************************************/
NTSTATUS InitDevice(
static NTSTATUS InitDevice(
IN PWSTR RegistryPath,
IN PVOID Context)
{

View file

@ -14,6 +14,10 @@
#include <ddk/ntddk.h>
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
#define NDEBUG
#include <debug.h>

View file

@ -1,3 +1,5 @@
#if 0
void write_wave()
{
}
#endif

View file

@ -26,7 +26,8 @@
SB16 sb16;
sb_status sb16_getenvironment(void);
NTSTATUS STDCALL Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
#if 0
static NTSTATUS STDCALL Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
/*
* FUNCTION: Handles user mode requests
* ARGUMENTS:
@ -100,6 +101,7 @@ NTSTATUS ModuleEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
#endif
return(STATUS_SUCCESS);
}
#endif
sb_status sb16_getenvironment(void)
{

View file

@ -29,7 +29,8 @@ SB16 sb16;
ULONG OldIRQ;
PKINTERRUPT IrqObject;
BOOLEAN STDCALL DMAOutputISR(PKINTERRUPT Interrupt, PVOID ServiceContext)
static BOOLEAN STDCALL DMAOutputISR(PKINTERRUPT Interrupt, PVOID ServiceContext)
{
DPRINT1("interrupt\n");
return FALSE;

View file

@ -408,4 +408,10 @@ NTSTATUS STDCALL
CdfsSetVolumeInformation(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
/* cdfs.c */
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
#endif //CDFS_H

View file

@ -34,7 +34,7 @@
/* FUNCTIONS ****************************************************************/
NTSTATUS STDCALL
static NTSTATUS STDCALL
FsRecCreate(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
@ -52,7 +52,7 @@ FsRecCreate(IN PDEVICE_OBJECT DeviceObject,
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
FsRecClose(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
@ -64,7 +64,7 @@ FsRecClose(IN PDEVICE_OBJECT DeviceObject,
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
FsRecFsControl(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
@ -102,7 +102,7 @@ FsRecFsControl(IN PDEVICE_OBJECT DeviceObject,
}
VOID STDCALL
static VOID STDCALL
FsRecUnload(IN PDRIVER_OBJECT DriverObject)
{
PDEVICE_OBJECT NextDevice;

View file

@ -112,4 +112,10 @@ NTSTATUS
FsRecUdfsFsControl(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/* fs_rec.c */
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
/* EOF */

View file

@ -76,4 +76,8 @@ NTSTATUS DEFAULTAPI MsfsWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp);
NTSTATUS DEFAULTAPI MsfsFileSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp);
NTSTATUS NTAPI
DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
#endif /* __SERVICES_FS_NP_NPFS_H */

View file

@ -23,6 +23,10 @@ NTSTATUS STDCALL
MupCreate(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
/* mup.c */
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
#endif /* MUP_H */

View file

@ -114,4 +114,8 @@ NTSTATUS STDCALL NpfsSetInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp);
NTSTATUS STDCALL NpfsQueryVolumeInformation (PDEVICE_OBJECT DeviceObject, PIRP Irp);
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
#endif /* __DRIVERS_FS_NP_NPFS_H */

View file

@ -40,14 +40,14 @@
ULONG
static ULONG
RunLength(PUCHAR run)
{
return(*run & 0x0f) + ((*run >> 4) & 0x0f) + 1;
}
LONGLONG
static LONGLONG
RunLCN(PUCHAR run)
{
UCHAR n1 = *run & 0x0f;
@ -62,7 +62,7 @@ RunLCN(PUCHAR run)
ULONGLONG
static ULONGLONG
RunCount(PUCHAR run)
{
UCHAR n = *run & 0xf;

View file

@ -446,7 +446,7 @@ NtfsAttachFCBToFileObject(PDEVICE_EXTENSION Vcb,
}
NTSTATUS
static NTSTATUS
NtfsDirFindFile(PDEVICE_EXTENSION DeviceExt,
PFCB DirectoryFcb,
PWSTR FileToFind,

View file

@ -279,10 +279,12 @@ ReadVCN (PDEVICE_EXTENSION Vcb,
}
#if 0
BOOL bitset(PUCHAR bitmap, ULONG i)
{
return (bitmap[i>>3] & (1 << (i & 7))) !=0;
}
#endif
VOID FixupUpdateSequenceArray(PFILE_RECORD_HEADER file)

View file

@ -430,6 +430,9 @@ ReadAttribute(PATTRIBUTE attr, PVOID buffer, PDEVICE_EXTENSION Vcb,
ULONG
AttributeDataLength(PATTRIBUTE attr);
ULONG
AttributeAllocatedLength (PATTRIBUTE Attribute);
NTSTATUS
ReadFileRecord (PDEVICE_EXTENSION Vcb,
ULONG index,
@ -515,4 +518,10 @@ NTSTATUS STDCALL
NtfsSetVolumeInformation(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
/* ntfs.c */
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
#endif /* NTFS_H */

View file

@ -432,7 +432,7 @@ VfatOpenFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject, PVFATFCB* Pa
return Status;
}
NTSTATUS
static NTSTATUS
VfatCreateFile (PDEVICE_OBJECT DeviceObject, PIRP Irp)
/*
* FUNCTION: Create or open a file

View file

@ -73,7 +73,7 @@ FsdSystemTimeToDosDateTime (PDEVICE_EXTENSION DeviceExt, PLARGE_INTEGER SystemTi
#define ULONG_ROUND_UP(x) ROUND_UP((x), (sizeof(ULONG)))
NTSTATUS
static NTSTATUS
VfatGetFileNameInformation (PVFAT_DIRENTRY_CONTEXT DirContext,
PFILE_NAMES_INFORMATION pInfo, ULONG BufferLength)
{
@ -86,7 +86,7 @@ VfatGetFileNameInformation (PVFAT_DIRENTRY_CONTEXT DirContext,
return STATUS_SUCCESS;
}
NTSTATUS
static NTSTATUS
VfatGetFileDirectoryInformation (PVFAT_DIRENTRY_CONTEXT DirContext,
PDEVICE_EXTENSION DeviceExt,
PFILE_DIRECTORY_INFORMATION pInfo,
@ -156,7 +156,7 @@ VfatGetFileDirectoryInformation (PVFAT_DIRENTRY_CONTEXT DirContext,
return STATUS_SUCCESS;
}
NTSTATUS
static NTSTATUS
VfatGetFileFullDirectoryInformation (PVFAT_DIRENTRY_CONTEXT DirContext,
PDEVICE_EXTENSION DeviceExt,
PFILE_FULL_DIR_INFORMATION pInfo,
@ -210,7 +210,7 @@ VfatGetFileFullDirectoryInformation (PVFAT_DIRENTRY_CONTEXT DirContext,
return STATUS_SUCCESS;
}
NTSTATUS
static NTSTATUS
VfatGetFileBothInformation (PVFAT_DIRENTRY_CONTEXT DirContext,
PDEVICE_EXTENSION DeviceExt,
PFILE_BOTH_DIR_INFORMATION pInfo,
@ -290,7 +290,7 @@ VfatGetFileBothInformation (PVFAT_DIRENTRY_CONTEXT DirContext,
return STATUS_SUCCESS;
}
NTSTATUS DoQuery (PVFAT_IRP_CONTEXT IrpContext)
static NTSTATUS DoQuery (PVFAT_IRP_CONTEXT IrpContext)
{
NTSTATUS RC = STATUS_SUCCESS;
long BufferLength = 0;

View file

@ -37,7 +37,7 @@ vfatDirEntryGetFirstCluster (PDEVICE_EXTENSION pDeviceExt,
return cluster;
}
BOOLEAN FATIsDirectoryEmpty(PVFATFCB Fcb)
static BOOLEAN FATIsDirectoryEmpty(PVFATFCB Fcb)
{
LARGE_INTEGER FileOffset;
PVOID Context = NULL;
@ -90,7 +90,7 @@ BOOLEAN FATIsDirectoryEmpty(PVFATFCB Fcb)
return TRUE;
}
BOOLEAN FATXIsDirectoryEmpty(PVFATFCB Fcb)
static BOOLEAN FATXIsDirectoryEmpty(PVFATFCB Fcb)
{
LARGE_INTEGER FileOffset;
PVOID Context = NULL;

View file

@ -180,7 +180,7 @@ vfatFindDirSpace(PDEVICE_EXTENSION DeviceExt,
return TRUE;
}
NTSTATUS
static NTSTATUS
FATAddEntry (PDEVICE_EXTENSION DeviceExt,
PUNICODE_STRING NameU,
PVFATFCB* Fcb,
@ -513,7 +513,7 @@ FATAddEntry (PDEVICE_EXTENSION DeviceExt,
return STATUS_SUCCESS;
}
NTSTATUS
static NTSTATUS
FATXAddEntry (PDEVICE_EXTENSION DeviceExt,
PUNICODE_STRING NameU,
PVFATFCB* Fcb,
@ -627,7 +627,7 @@ VfatAddEntry (PDEVICE_EXTENSION DeviceExt,
return FATAddEntry(DeviceExt, NameU, Fcb, ParentFcb, RequestedOptions, ReqAttr);
}
NTSTATUS
static NTSTATUS
FATDelEntry (PDEVICE_EXTENSION DeviceExt, PVFATFCB pFcb)
/*
* deleting an existing FAT entry
@ -681,7 +681,7 @@ FATDelEntry (PDEVICE_EXTENSION DeviceExt, PVFATFCB pFcb)
return STATUS_SUCCESS;
}
NTSTATUS
static NTSTATUS
FATXDelEntry (PDEVICE_EXTENSION DeviceExt, PVFATFCB pFcb)
/*
* deleting an existing FAT entry

View file

@ -10,7 +10,7 @@
#define NDEBUG
#include "vfat.h"
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoCheckIfPossible(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN ULONG Lenght,
@ -25,7 +25,7 @@ VfatFastIoCheckIfPossible(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoRead(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN ULONG Length,
@ -39,7 +39,7 @@ VfatFastIoRead(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoWrite(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN ULONG Length,
@ -53,7 +53,7 @@ VfatFastIoWrite(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoQueryBasicInfo(IN PFILE_OBJECT FileObject,
IN BOOLEAN Wait,
OUT PFILE_BASIC_INFORMATION Buffer,
@ -64,7 +64,7 @@ VfatFastIoQueryBasicInfo(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoQueryStandardInfo(IN PFILE_OBJECT FileObject,
IN BOOLEAN Wait,
OUT PFILE_STANDARD_INFORMATION Buffer,
@ -75,7 +75,7 @@ VfatFastIoQueryStandardInfo(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoLock(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN PLARGE_INTEGER Length,
@ -90,7 +90,7 @@ VfatFastIoLock(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoUnlockSingle(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN PLARGE_INTEGER Length,
@ -103,7 +103,7 @@ VfatFastIoUnlockSingle(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoUnlockAll(IN PFILE_OBJECT FileObject,
PEPROCESS ProcessId,
OUT PIO_STATUS_BLOCK IoStatus,
@ -113,7 +113,7 @@ VfatFastIoUnlockAll(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoUnlockAllByKey(IN PFILE_OBJECT FileObject,
PEPROCESS ProcessId,
ULONG Key,
@ -124,7 +124,7 @@ VfatFastIoUnlockAllByKey(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoDeviceControl(IN PFILE_OBJECT FileObject,
IN BOOLEAN Wait,
IN PVOID InputBuffer OPTIONAL,
@ -139,26 +139,26 @@ VfatFastIoDeviceControl(IN PFILE_OBJECT FileObject,
return FALSE;
}
VOID NTAPI
static VOID NTAPI
VfatAcquireFileForNtCreateSection(IN PFILE_OBJECT FileObject)
{
DPRINT("VfatAcquireFileForNtCreateSection\n");
}
VOID NTAPI
static VOID NTAPI
VfatReleaseFileForNtCreateSection(IN PFILE_OBJECT FileObject)
{
DPRINT("VfatReleaseFileForNtCreateSection\n");
}
VOID NTAPI
static VOID NTAPI
VfatFastIoDetachDevice(IN PDEVICE_OBJECT SourceDevice,
IN PDEVICE_OBJECT TargetDevice)
{
DPRINT("VfatFastIoDetachDevice\n");
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoQueryNetworkOpenInfo(IN PFILE_OBJECT FileObject,
IN BOOLEAN Wait,
OUT PFILE_NETWORK_OPEN_INFORMATION Buffer,
@ -169,7 +169,7 @@ VfatFastIoQueryNetworkOpenInfo(IN PFILE_OBJECT FileObject,
return FALSE;
}
NTSTATUS NTAPI
static NTSTATUS NTAPI
VfatAcquireForModWrite(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER EndingOffset,
OUT PERESOURCE* ResourceToRelease,
@ -179,7 +179,7 @@ VfatAcquireForModWrite(IN PFILE_OBJECT FileObject,
return STATUS_UNSUCCESSFUL;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatMdlRead(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN ULONG Length,
@ -192,7 +192,7 @@ VfatMdlRead(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatMdlReadComplete(IN PFILE_OBJECT FileObject,
IN PMDL MdlChain,
IN PDEVICE_OBJECT DeviceObject)
@ -201,7 +201,7 @@ VfatMdlReadComplete(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatPrepareMdlWrite(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN ULONG Length,
@ -214,7 +214,7 @@ VfatPrepareMdlWrite(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatMdlWriteComplete(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN PMDL MdlChain,
@ -224,7 +224,7 @@ VfatMdlWriteComplete(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoReadCompressed(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN ULONG Length,
@ -240,7 +240,7 @@ VfatFastIoReadCompressed(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoWriteCompressed(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN ULONG Length,
@ -256,7 +256,7 @@ VfatFastIoWriteCompressed(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatMdlReadCompleteCompressed(IN PFILE_OBJECT FileObject,
IN PMDL MdlChain,
IN PDEVICE_OBJECT DeviceObject)
@ -265,7 +265,7 @@ VfatMdlReadCompleteCompressed(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatMdlWriteCompleteCompressed(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN PMDL MdlChain,
@ -275,7 +275,7 @@ VfatMdlWriteCompleteCompressed(IN PFILE_OBJECT FileObject,
return FALSE;
}
BOOLEAN NTAPI
static BOOLEAN NTAPI
VfatFastIoQueryOpen(IN PIRP Irp,
OUT PFILE_NETWORK_OPEN_INFORMATION NetworkInformation,
IN PDEVICE_OBJECT DeviceObject)
@ -284,7 +284,7 @@ VfatFastIoQueryOpen(IN PIRP Irp,
return FALSE;
}
NTSTATUS NTAPI
static NTSTATUS NTAPI
VfatReleaseForModWrite(IN PFILE_OBJECT FileObject,
IN PERESOURCE ResourceToRelease,
IN PDEVICE_OBJECT DeviceObject)
@ -293,7 +293,7 @@ VfatReleaseForModWrite(IN PFILE_OBJECT FileObject,
return STATUS_UNSUCCESSFUL;
}
NTSTATUS NTAPI
static NTSTATUS NTAPI
VfatAcquireForCcFlush(IN PFILE_OBJECT FileObject,
IN PDEVICE_OBJECT DeviceObject)
{
@ -301,7 +301,7 @@ VfatAcquireForCcFlush(IN PFILE_OBJECT FileObject,
return STATUS_UNSUCCESSFUL;
}
NTSTATUS NTAPI
static NTSTATUS NTAPI
VfatReleaseForCcFlush(IN PFILE_OBJECT FileObject,
IN PDEVICE_OBJECT DeviceObject)
{

View file

@ -297,7 +297,7 @@ FAT32FindAndMarkAvailableCluster (PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
return (STATUS_DISK_FULL);
}
NTSTATUS
static NTSTATUS
FAT12CountAvailableClusters(PDEVICE_EXTENSION DeviceExt)
/*
* FUNCTION: Counts free cluster in a FAT12 table
@ -343,7 +343,7 @@ FAT12CountAvailableClusters(PDEVICE_EXTENSION DeviceExt)
}
NTSTATUS
static NTSTATUS
FAT16CountAvailableClusters(PDEVICE_EXTENSION DeviceExt)
/*
* FUNCTION: Counts free clusters in a FAT16 table
@ -391,7 +391,7 @@ FAT16CountAvailableClusters(PDEVICE_EXTENSION DeviceExt)
}
NTSTATUS
static NTSTATUS
FAT32CountAvailableClusters(PDEVICE_EXTENSION DeviceExt)
/*
* FUNCTION: Counts free clusters in a FAT32 table

View file

@ -22,7 +22,7 @@
/* -------------------------------------------------------- PUBLICS */
ULONG vfatNameHash(ULONG hash, PUNICODE_STRING NameU)
static ULONG vfatNameHash(ULONG hash, PUNICODE_STRING NameU)
{
PWCHAR last;
PWCHAR curr;
@ -65,7 +65,7 @@ vfatSplitPathName(PUNICODE_STRING PathNameU, PUNICODE_STRING DirNameU, PUNICODE_
}
}
VOID
static VOID
vfatInitFcb(PVFATFCB Fcb, PUNICODE_STRING NameU)
{
USHORT PathNameBufferLength;
@ -310,7 +310,7 @@ vfatGrabFCBFromTable(PDEVICE_EXTENSION pVCB, PUNICODE_STRING PathNameU)
return NULL;
}
NTSTATUS
static NTSTATUS
vfatFCBInitializeCacheFromVolume (PVCB vcb, PVFATFCB fcb)
{
#ifdef USE_ROS_CC_AND_FS

View file

@ -479,7 +479,7 @@ VfatGetAllInformation(PFILE_OBJECT FileObject,
return STATUS_SUCCESS;
}
VOID UpdateFileSize(PFILE_OBJECT FileObject, PVFATFCB Fcb, ULONG Size, ULONG ClusterSize)
static VOID UpdateFileSize(PFILE_OBJECT FileObject, PVFATFCB Fcb, ULONG Size, ULONG ClusterSize)
{
if (Size > 0)
{

View file

@ -13,7 +13,7 @@
/* FUNCTIONS ****************************************************************/
NTSTATUS VfatFlushFile(PDEVICE_EXTENSION DeviceExt, PVFATFCB Fcb)
static NTSTATUS VfatFlushFile(PDEVICE_EXTENSION DeviceExt, PVFATFCB Fcb)
{
IO_STATUS_BLOCK IoStatus;
NTSTATUS Status;

View file

@ -51,7 +51,7 @@ const char* MajorFunctionNames[] =
static LONG QueueCount = 0;
NTSTATUS VfatLockControl(
static NTSTATUS VfatLockControl(
IN PVFAT_IRP_CONTEXT IrpContext
)
{
@ -91,7 +91,7 @@ Fail:;
return Status;
}
NTSTATUS
static NTSTATUS
VfatDispatchRequest (IN PVFAT_IRP_CONTEXT IrpContext)
{
DPRINT ("VfatDispatchRequest (IrpContext %x), is called for %s\n", IrpContext,
@ -222,7 +222,7 @@ PVFAT_IRP_CONTEXT VfatAllocateIrpContext(PDEVICE_OBJECT DeviceObject, PIRP Irp)
return IrpContext;
}
VOID NTAPI VfatDoRequest (PVOID IrpContext)
static VOID NTAPI VfatDoRequest (PVOID IrpContext)
{
InterlockedDecrement(&QueueCount);
DPRINT ("VfatDoRequest (IrpContext %x), MajorFunction %x, %d\n", IrpContext, ((PVFAT_IRP_CONTEXT)IrpContext)->MajorFunction, QueueCount);

View file

@ -107,7 +107,7 @@ OffsetToCluster(PDEVICE_EXTENSION DeviceExt,
}
}
NTSTATUS
static NTSTATUS
VfatReadFileData (PVFAT_IRP_CONTEXT IrpContext,
ULONG Length,
LARGE_INTEGER ReadOffset,
@ -323,7 +323,7 @@ VfatReadFileData (PVFAT_IRP_CONTEXT IrpContext,
return Status;
}
NTSTATUS
static NTSTATUS
VfatWriteFileData(PVFAT_IRP_CONTEXT IrpContext,
ULONG Length,
LARGE_INTEGER WriteOffset)

View file

@ -13,7 +13,7 @@
/* FUNCTIONS ****************************************************************/
NTSTATUS
static NTSTATUS
VfatDiskShutDown(PVCB Vcb)
{
PIRP Irp;

View file

@ -460,14 +460,14 @@ hookworkitemdone:
DPRINT("HookWorkItem done\n");
}
VOID STDCALL I8042StartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static VOID STDCALL I8042StartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
if (!I8042StartIoKbd(DeviceObject, Irp)) {
DPRINT1("Unhandled StartIo!\n");
}
}
NTSTATUS STDCALL I8042InternalDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static NTSTATUS STDCALL I8042InternalDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
NTSTATUS Status = STATUS_INVALID_DEVICE_REQUEST;
PFDO_DEVICE_EXTENSION FdoDevExt = DeviceObject->DeviceExtension;
@ -493,7 +493,7 @@ NTSTATUS STDCALL I8042InternalDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Ir
return Status;
}
NTSTATUS STDCALL I8042CreateDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static NTSTATUS STDCALL I8042CreateDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
NTSTATUS Status;

View file

@ -298,6 +298,9 @@ VOID STDCALL I8042SendHookWorkItem(PDEVICE_OBJECT DeviceObject,
BOOLEAN I8042Write(PDEVICE_EXTENSION DevExt, PUCHAR addr, UCHAR data);
NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
/* keyboard.c */
VOID STDCALL I8042IsrWritePortKbd(PVOID Context,
UCHAR Value);

View file

@ -577,7 +577,7 @@ BOOLEAN STDCALL I8042KeyboardEnable(PDEVICE_EXTENSION DevExt)
return TRUE;
}
BOOLEAN STDCALL I8042KeyboardDefaultsAndDisable(PDEVICE_EXTENSION DevExt)
static BOOLEAN STDCALL I8042KeyboardDefaultsAndDisable(PDEVICE_EXTENSION DevExt)
{
DPRINT("Disabling keyboard\n");
if (STATUS_SUCCESS != I8042SynchWritePort(DevExt,

View file

@ -22,21 +22,23 @@
* These functions are callbacks for filter driver custom interrupt
* service routines.
*/
VOID STDCALL I8042IsrWritePortMouse(PVOID Context,
UCHAR Value)
static VOID STDCALL I8042IsrWritePortMouse(PVOID Context,
UCHAR Value)
{
I8042IsrWritePort(Context, Value, 0xD4);
}
NTSTATUS STDCALL I8042SynchWritePortMouse(PVOID Context,
UCHAR Value,
BOOLEAN WaitForAck)
#if 0
static NTSTATUS STDCALL I8042SynchWritePortMouse(PVOID Context,
UCHAR Value,
BOOLEAN WaitForAck)
{
return I8042SynchWritePort((PDEVICE_EXTENSION)Context,
0xD4,
Value,
WaitForAck);
}
#endif
/* Test if packets are taking too long to come in. If they do, we
* might have gotten out of sync and should just drop what we have.
@ -77,10 +79,10 @@ static VOID STDCALL I8042MouseInputTestTimeout(PDEVICE_EXTENSION DevExt)
* we should return (indicating to the system wether someone else
* should try to handle the interrupt)
*/
BOOLEAN STDCALL I8042MouseCallIsrHook(PDEVICE_EXTENSION DevExt,
UCHAR Status,
PUCHAR Input,
PBOOLEAN ToReturn)
static BOOLEAN STDCALL I8042MouseCallIsrHook(PDEVICE_EXTENSION DevExt,
UCHAR Status,
PUCHAR Input,
PBOOLEAN ToReturn)
{
BOOLEAN HookReturn, HookContinue;
@ -105,9 +107,9 @@ BOOLEAN STDCALL I8042MouseCallIsrHook(PDEVICE_EXTENSION DevExt,
return FALSE;
}
BOOLEAN STDCALL I8042MouseResetIsr(PDEVICE_EXTENSION DevExt,
UCHAR Status,
PUCHAR Value)
static BOOLEAN STDCALL I8042MouseResetIsr(PDEVICE_EXTENSION DevExt,
UCHAR Status,
PUCHAR Value)
{
BOOLEAN ToReturn = FALSE;
@ -663,7 +665,8 @@ VOID STDCALL I8042DpcRoutineMouseTimeout(PKDPC Dpc,
* returns FALSE if it doesn't understand the
* call so someone else can handle it.
*/
BOOLEAN STDCALL I8042StartIoMouse(PDEVICE_OBJECT DeviceObject, PIRP Irp)
#if 0
static BOOLEAN STDCALL I8042StartIoMouse(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PIO_STACK_LOCATION Stk;
PFDO_DEVICE_EXTENSION FdoDevExt = DeviceObject->DeviceExtension;
@ -687,6 +690,7 @@ BOOLEAN STDCALL I8042StartIoMouse(PDEVICE_OBJECT DeviceObject, PIRP Irp)
return TRUE;
}
#endif
/*
* Runs the mouse IOCTL_INTERNAL dispatch.

View file

@ -19,6 +19,9 @@
/* GLOBALS *******************************************************************/
NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
/*
* Driver data
*/
@ -102,7 +105,7 @@ static VOID STDCALL KbdClassServiceCallback (
}
}
VOID STDCALL KbdStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static VOID STDCALL KbdStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
/* We only do this for read irps */
DPRINT("KeyboardStartIo(DeviceObject %x Irp %x)\n",DeviceObject,Irp);
@ -114,7 +117,7 @@ VOID STDCALL KbdStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
* These are just passed down the stack but we must change the IOCTL to be
* INTERNAL. MSDN says there might be more...
*/
NTSTATUS STDCALL KbdDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static NTSTATUS STDCALL KbdDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PDEVICE_EXTENSION DevExt = DeviceObject->DeviceExtension;
PIO_STACK_LOCATION Stk = IoGetCurrentIrpStackLocation(Irp);

View file

@ -17,9 +17,12 @@
#define NDEBUG
#include <debug.h>
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
PDEVICE_OBJECT MouclassDeviceObject;
BOOLEAN MouseClassCallBack(
static BOOLEAN MouseClassCallBack(
PDEVICE_OBJECT ClassDeviceObject, PMOUSE_INPUT_DATA MouseDataStart,
PMOUSE_INPUT_DATA MouseDataEnd, PULONG ConsumedCount)
{
@ -103,7 +106,7 @@ BOOLEAN MouseClassCallBack(
return TRUE;
}
NTSTATUS ConnectMousePortDriver(PDEVICE_OBJECT ClassDeviceObject)
static NTSTATUS ConnectMousePortDriver(PDEVICE_OBJECT ClassDeviceObject)
{
PDEVICE_OBJECT PortDeviceObject = NULL;
PFILE_OBJECT FileObject = NULL;
@ -156,7 +159,7 @@ NTSTATUS ConnectMousePortDriver(PDEVICE_OBJECT ClassDeviceObject)
return ioStatus.Status;
}
NTSTATUS STDCALL MouseClassDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static NTSTATUS STDCALL MouseClassDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
NTSTATUS Status;
@ -194,7 +197,7 @@ NTSTATUS STDCALL MouseClassDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
return Status;
}
VOID STDCALL
static VOID STDCALL
MouseClassStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PDEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;

View file

@ -106,10 +106,13 @@ typedef struct _DEVICE_EXTENSION
* Functions
*/
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
/* Waits until the mouse calms down but also quits out after a while
* in case some destructive user wants to keep moving the mouse
* before we're done */
VOID ClearMouse(ULONG Port)
static VOID ClearMouse(ULONG Port)
{
ULONG Restarts = 0;
ULONG i;
@ -129,7 +132,7 @@ VOID ClearMouse(ULONG Port)
}
}
BOOLEAN STDCALL
static BOOLEAN STDCALL
SerialMouseInterruptService(IN PKINTERRUPT Interrupt, PVOID ServiceContext)
{
PDEVICE_OBJECT DeviceObject = (PDEVICE_OBJECT)ServiceContext;
@ -249,18 +252,18 @@ SerialMouseInterruptService(IN PKINTERRUPT Interrupt, PVOID ServiceContext)
return TRUE;
}
VOID
static VOID
SerialMouseInitializeDataQueue(PVOID Context)
{
}
BOOLEAN STDCALL
static BOOLEAN STDCALL
MouseSynchronizeRoutine(PVOID Context)
{
return TRUE;
}
VOID STDCALL
static VOID STDCALL
SerialMouseStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PDEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
@ -285,7 +288,7 @@ SerialMouseStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
}
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
SerialMouseInternalDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
{
PDEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
@ -339,7 +342,7 @@ SerialMouseInternalDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
return Status;
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
SerialMouseDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
@ -372,7 +375,7 @@ SerialMouseDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
return Status;
}
VOID SerialMouseIsrDpc(PKDPC Dpc, PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
static VOID SerialMouseIsrDpc(PKDPC Dpc, PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
{
PDEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
ULONG Queue;
@ -388,7 +391,7 @@ VOID SerialMouseIsrDpc(PKDPC Dpc, PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID C
DeviceExtension->InputDataCount[Queue] = 0;
}
VOID InitializeSerialPort(ULONG Port)
static VOID InitializeSerialPort(ULONG Port)
{
/* DLAB off */
WRITE_PORT_UCHAR((PUCHAR)Port + 3, 0);
@ -403,7 +406,7 @@ VOID InitializeSerialPort(ULONG Port)
WRITE_PORT_UCHAR((PUCHAR)Port + 3, 2);
}
BOOLEAN UARTReadChar(ULONG Port, CHAR *Value, ULONG Timeout)
static BOOLEAN UARTReadChar(ULONG Port, CHAR *Value, ULONG Timeout)
{
ULONG i, j;
@ -429,7 +432,7 @@ BOOLEAN UARTReadChar(ULONG Port, CHAR *Value, ULONG Timeout)
return FALSE;
}
ULONG DetectMicrosoftMouse(ULONG Port)
static ULONG DetectMicrosoftMouse(ULONG Port)
{
CHAR Buffer[8];
ULONG Count, i;
@ -507,7 +510,7 @@ ULONG DetectMicrosoftMouse(ULONG Port)
return MOUSE_TYPE_NONE;
}
PDEVICE_OBJECT
static PDEVICE_OBJECT
AllocatePointerDevice(PDRIVER_OBJECT DriverObject)
{
PDEVICE_OBJECT DeviceObject;
@ -558,7 +561,7 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject)
return DeviceObject;
}
BOOLEAN
static BOOLEAN
InitializeMouse(ULONG Port, ULONG Irq, PDRIVER_OBJECT DriverObject)
{
PDEVICE_EXTENSION DeviceExtension;

View file

@ -1,4 +1,5 @@
#ifdef BZ_DECOMPRESS_ONLY
int _stdcall DriverEntry( void *a, void *b );
int _stdcall DriverEntry( void *a, void *b )
{
@ -10,6 +11,8 @@ int _stdcall DllMain( unsigned long a, unsigned long b, unsigned long c )
return 1;
}
#endif
void bz_internal_error ( int errcode );
void bz_internal_error ( int errcode )
{
return;

View file

@ -65,7 +65,7 @@ NTSTATUS MakeSocketIntoConnection( PAFD_FCB FCB ) {
return Status;
}
NTSTATUS DDKAPI StreamSocketConnectComplete
static NTSTATUS DDKAPI StreamSocketConnectComplete
( PDEVICE_OBJECT DeviceObject,
PIRP Irp,
PVOID Context ) {

View file

@ -12,10 +12,10 @@
#include "tdiconn.h"
#include "debug.h"
VOID SatisfyAccept( PAFD_DEVICE_EXTENSION DeviceExt,
PIRP Irp,
PFILE_OBJECT NewFileObject,
PAFD_TDI_OBJECT_QELT Qelt ) {
static VOID SatisfyAccept( PAFD_DEVICE_EXTENSION DeviceExt,
PIRP Irp,
PFILE_OBJECT NewFileObject,
PAFD_TDI_OBJECT_QELT Qelt ) {
PAFD_FCB FCB = NewFileObject->FsContext;
if( !SocketAcquireStateLock( FCB ) ) return;
@ -39,7 +39,7 @@ VOID SatisfyAccept( PAFD_DEVICE_EXTENSION DeviceExt,
SocketStateUnlock( FCB );
}
VOID SatisfyPreAccept( PIRP Irp, PAFD_TDI_OBJECT_QELT Qelt ) {
static VOID SatisfyPreAccept( PIRP Irp, PAFD_TDI_OBJECT_QELT Qelt ) {
PAFD_RECEIVED_ACCEPT_DATA ListenReceive =
(PAFD_RECEIVED_ACCEPT_DATA)Irp->AssociatedIrp.SystemBuffer;
PTA_IP_ADDRESS IPAddr;
@ -72,7 +72,7 @@ VOID SatisfyPreAccept( PIRP Irp, PAFD_TDI_OBJECT_QELT Qelt ) {
IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );
}
NTSTATUS DDKAPI ListenComplete
static NTSTATUS DDKAPI ListenComplete
( PDEVICE_OBJECT DeviceObject,
PIRP Irp,
PVOID Context ) {

View file

@ -39,6 +39,9 @@ void OskitDumpBuffer( PCHAR Data, UINT Len ) {
/* FUNCTIONS */
NTSTATUS STDCALL
DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
static NTSTATUS STDCALL
AfdCreateSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
PIO_STACK_LOCATION IrpSp) {
PAFD_FCB FCB;
@ -211,7 +214,7 @@ VOID DestroySocket( PAFD_FCB FCB ) {
AFD_DbgPrint(MIN_TRACE,("Leaving\n"));
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
PIO_STACK_LOCATION IrpSp)
{
@ -241,7 +244,7 @@ AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
return STATUS_SUCCESS;
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
AfdDisconnect(PDEVICE_OBJECT DeviceObject, PIRP Irp,
PIO_STACK_LOCATION IrpSp) {
PFILE_OBJECT FileObject = IrpSp->FileObject;
@ -292,7 +295,7 @@ AfdDisconnect(PDEVICE_OBJECT DeviceObject, PIRP Irp,
return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, TRUE );
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
AfdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
@ -479,7 +482,7 @@ AfdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
return (Status);
}
VOID STDCALL
static VOID STDCALL
AfdUnload(PDRIVER_OBJECT DriverObject)
{
}

View file

@ -26,14 +26,14 @@
#include "tdiconn.h"
#include "debug.h"
BOOLEAN CantReadMore( PAFD_FCB FCB ) {
static BOOLEAN CantReadMore( PAFD_FCB FCB ) {
UINT BytesAvailable = FCB->Recv.Content - FCB->Recv.BytesUsed;
return !BytesAvailable &&
(FCB->PollState & (AFD_EVENT_CLOSE | AFD_EVENT_DISCONNECT));
}
VOID HandleEOFOnIrp( PAFD_FCB FCB, NTSTATUS Status, UINT Information ) {
static VOID HandleEOFOnIrp( PAFD_FCB FCB, NTSTATUS Status, UINT Information ) {
if( Status == STATUS_SUCCESS && Information == 0 ) {
AFD_DbgPrint(MID_TRACE,("Looks like an EOF\n"));
FCB->PollState |= AFD_EVENT_DISCONNECT;
@ -41,7 +41,7 @@ VOID HandleEOFOnIrp( PAFD_FCB FCB, NTSTATUS Status, UINT Information ) {
}
}
NTSTATUS TryToSatisfyRecvRequestFromBuffer( PAFD_FCB FCB,
static NTSTATUS TryToSatisfyRecvRequestFromBuffer( PAFD_FCB FCB,
PAFD_RECV_INFO RecvReq,
PUINT TotalBytesCopied ) {
UINT i, BytesToCopy = 0,
@ -120,7 +120,7 @@ NTSTATUS TryToSatisfyRecvRequestFromBuffer( PAFD_FCB FCB,
return STATUS_SUCCESS;
}
NTSTATUS ReceiveActivity( PAFD_FCB FCB, PIRP Irp ) {
static NTSTATUS ReceiveActivity( PAFD_FCB FCB, PIRP Irp ) {
PLIST_ENTRY NextIrpEntry;
PIRP NextIrp;
PIO_STACK_LOCATION NextIrpSp;
@ -328,7 +328,7 @@ AfdConnectedSocketReadData(PDEVICE_OBJECT DeviceObject, PIRP Irp,
}
NTSTATUS STDCALL
static NTSTATUS STDCALL
SatisfyPacketRecvRequest( PAFD_FCB FCB, PIRP Irp,
PAFD_STORED_DATAGRAM DatagramRecv,
PUINT TotalBytesCopied ) {

View file

@ -12,7 +12,7 @@
#include "tdiconn.h"
#include "debug.h"
VOID PrintEvents( ULONG Events ) {
static VOID PrintEvents( ULONG Events ) {
#if DBG
char *events_list[] = { "AFD_EVENT_RECEIVE",
"AFD_EVENT_OOB_RECEIVE",
@ -33,7 +33,7 @@ VOID PrintEvents( ULONG Events ) {
#endif
}
VOID CopyBackStatus( PAFD_HANDLE HandleArray,
static VOID CopyBackStatus( PAFD_HANDLE HandleArray,
UINT HandleCount ) {
UINT i;
@ -43,7 +43,7 @@ VOID CopyBackStatus( PAFD_HANDLE HandleArray,
}
}
VOID ZeroEvents( PAFD_HANDLE HandleArray,
static VOID ZeroEvents( PAFD_HANDLE HandleArray,
UINT HandleCount ) {
UINT i;
@ -51,7 +51,7 @@ VOID ZeroEvents( PAFD_HANDLE HandleArray,
HandleArray[i].Status = 0;
}
VOID RemoveSelect( PAFD_ACTIVE_POLL Poll ) {
static VOID RemoveSelect( PAFD_ACTIVE_POLL Poll ) {
AFD_DbgPrint(MID_TRACE,("Called\n"));
RemoveEntryList( &Poll->ListEntry );
@ -62,7 +62,7 @@ VOID RemoveSelect( PAFD_ACTIVE_POLL Poll ) {
AFD_DbgPrint(MID_TRACE,("Done\n"));
}
VOID SignalSocket( PAFD_ACTIVE_POLL Poll, PAFD_POLL_INFO PollReq,
static VOID SignalSocket( PAFD_ACTIVE_POLL Poll, PAFD_POLL_INFO PollReq,
NTSTATUS Status ) {
UINT i;
PIRP Irp = Poll->Irp;
@ -89,7 +89,7 @@ VOID SignalSocket( PAFD_ACTIVE_POLL Poll, PAFD_POLL_INFO PollReq,
AFD_DbgPrint(MID_TRACE,("Done\n"));
}
VOID SelectTimeout( PKDPC Dpc,
static VOID SelectTimeout( PKDPC Dpc,
PVOID DeferredContext,
PVOID SystemArgument1,
PVOID SystemArgument2 ) {
@ -324,7 +324,7 @@ AfdEnumEvents( PDEVICE_OBJECT DeviceObject, PIRP Irp,
}
/* * * NOTE ALWAYS CALLED AT DISPATCH_LEVEL * * */
BOOLEAN UpdatePollWithFCB( PAFD_ACTIVE_POLL Poll, PFILE_OBJECT FileObject ) {
static BOOLEAN UpdatePollWithFCB( PAFD_ACTIVE_POLL Poll, PFILE_OBJECT FileObject ) {
UINT i;
PAFD_FCB FCB;
UINT Signalled = 0;

View file

@ -13,9 +13,11 @@
#endif
#include "debug.h"
#include "tdiconn.h"
#include "tdi_proto.h"
#ifdef DBG
VOID DisplayBuffer(
#if 0
static VOID DisplayBuffer(
PVOID Buffer,
ULONG Size)
{
@ -40,9 +42,10 @@ VOID DisplayBuffer(
}
DbgPrint("\n");
}
#endif
#endif /* DBG */
NTSTATUS TdiCall(
static NTSTATUS TdiCall(
PIRP Irp,
PDEVICE_OBJECT DeviceObject,
PKEVENT Event,
@ -85,7 +88,7 @@ NTSTATUS TdiCall(
}
NTSTATUS TdiOpenDevice(
static NTSTATUS TdiOpenDevice(
PUNICODE_STRING DeviceName,
ULONG EaLength,
PFILE_FULL_EA_INFORMATION EaInfo,

View file

@ -67,7 +67,7 @@ PTRANSPORT_ADDRESS TaCopyTransportAddress( PTRANSPORT_ADDRESS OtherAddress ) {
return A;
}
NTSTATUS TdiBuildNullConnectionInfoInPlace
static NTSTATUS TdiBuildNullConnectionInfoInPlace
( PTDI_CONNECTION_INFORMATION ConnInfo,
ULONG Type )
/*

View file

@ -12,7 +12,7 @@
#include "tdiconn.h"
#include "debug.h"
NTSTATUS DDKAPI SendComplete
static NTSTATUS DDKAPI SendComplete
( PDEVICE_OBJECT DeviceObject,
PIRP Irp,
PVOID Context ) {
@ -152,7 +152,7 @@ NTSTATUS DDKAPI SendComplete
return STATUS_SUCCESS;
}
NTSTATUS DDKAPI PacketSocketSendComplete
static NTSTATUS DDKAPI PacketSocketSendComplete
( PDEVICE_OBJECT DeviceObject,
PIRP Irp,
PVOID Context ) {

View file

@ -30,4 +30,19 @@ NTSTATUS TdiQueryInformation(
LONG QueryType,
PMDL MdlBuffer);
NTSTATUS TdiSetEventHandler(
PFILE_OBJECT FileObject,
LONG EventType,
PVOID Handler,
PVOID Context);
NTSTATUS TdiQueryDeviceControl(
PFILE_OBJECT FileObject,
ULONG IoControlCode,
PVOID InputBuffer,
ULONG InputBufferLength,
PVOID OutputBuffer,
ULONG OutputBufferLength,
PULONG Return);
#endif/*_TDI_PROTO_H*/

View file

@ -14,7 +14,7 @@
/* Null-terminated array of ports to probe. This is "semi-risky" (Don Becker). */
ULONG ProbeAddressList[] = { 0x280, 0x300, 0x320, 0x340, 0x360, 0x380, 0 };
BOOLEAN ProbeAddressForNIC(
static BOOLEAN ProbeAddressForNIC(
ULONG address)
/*
* FUNCTION: Probes an address for a NIC
@ -88,7 +88,7 @@ BOOLEAN NICCheck(
}
BOOLEAN NICTestAddress(
static BOOLEAN NICTestAddress(
PNIC_ADAPTER Adapter,
ULONG Address)
/*
@ -118,7 +118,7 @@ BOOLEAN NICTestAddress(
}
BOOLEAN NICTestRAM(
static BOOLEAN NICTestRAM(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Finds out how much RAM a NIC has
@ -163,7 +163,7 @@ BOOLEAN NICTestRAM(
}
VOID NICSetPhysicalAddress(
static VOID NICSetPhysicalAddress(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Initializes the physical address on the NIC
@ -188,7 +188,7 @@ VOID NICSetPhysicalAddress(
}
VOID NICSetMulticastAddressMask(
static VOID NICSetMulticastAddressMask(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Initializes the multicast address mask on the NIC
@ -213,7 +213,7 @@ VOID NICSetMulticastAddressMask(
}
BOOLEAN NICReadSAPROM(
static BOOLEAN NICReadSAPROM(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Reads the Station Address PROM data from the NIC
@ -531,7 +531,7 @@ NDIS_STATUS NICReset(
}
VOID NICStartTransmit(
static VOID NICStartTransmit(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Starts transmitting a packet
@ -574,7 +574,7 @@ VOID NICStartTransmit(
}
VOID NICSetBoundaryPage(
static VOID NICSetBoundaryPage(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Sets the boundary page on the adapter to be one less than NextPacket
@ -592,7 +592,7 @@ VOID NICSetBoundaryPage(
}
VOID NICGetCurrentPage(
static VOID NICGetCurrentPage(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Retrieves the current page from the adapter
@ -883,7 +883,7 @@ VOID NICWriteData(
}
VOID NICIndicatePacket(
static VOID NICIndicatePacket(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Indicates a packet to the wrapper
@ -944,7 +944,7 @@ VOID NICIndicatePacket(
}
VOID NICReadPacket(
static VOID NICReadPacket(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Reads a full packet from the receive buffer ring
@ -991,7 +991,7 @@ VOID NICReadPacket(
}
VOID NICWritePacket(
static VOID NICWritePacket(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Writes a full packet to the transmit buffer ring
@ -1060,7 +1060,7 @@ VOID NICWritePacket(
}
BOOLEAN NICPrepareForTransmit(
static BOOLEAN NICPrepareForTransmit(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Prepares a packet for transmission
@ -1142,7 +1142,7 @@ VOID NICTransmit(
}
VOID HandleReceive(
static VOID HandleReceive(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Handles reception of a packet
@ -1254,7 +1254,7 @@ VOID HandleReceive(
}
VOID HandleTransmit(
static VOID HandleTransmit(
PNIC_ADAPTER Adapter)
/*
* FUNCTION: Handles transmission of a packet

View file

@ -11,6 +11,14 @@
#include <ne2000.h>
#include <debug.h>
NTSTATUS
#ifndef _MSC_VER
STDCALL
#endif
DriverEntry(
PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath);
#ifdef DBG
@ -55,7 +63,8 @@ DRIVER_INFORMATION DriverInfo = {0};
NDIS_PHYSICAL_ADDRESS HighestAcceptableMax = NDIS_PHYSICAL_ADDRESS_CONST(-1, -1);
BOOLEAN MiniportCheckForHang(
#if 0
static BOOLEAN MiniportCheckForHang(
IN NDIS_HANDLE MiniportAdapterContext)
/*
* FUNCTION: Examines if an adapter has hung
@ -69,9 +78,10 @@ BOOLEAN MiniportCheckForHang(
return FALSE;
}
#endif
VOID STDCALL MiniportDisableInterrupt(
static VOID STDCALL MiniportDisableInterrupt(
IN NDIS_HANDLE MiniportAdapterContext)
/*
* FUNCTION: Disables interrupts from an adapter
@ -86,7 +96,7 @@ VOID STDCALL MiniportDisableInterrupt(
}
VOID STDCALL MiniportEnableInterrupt(
static VOID STDCALL MiniportEnableInterrupt(
IN NDIS_HANDLE MiniportAdapterContext)
/*
* FUNCTION: Enables interrupts from an adapter
@ -101,7 +111,7 @@ VOID STDCALL MiniportEnableInterrupt(
}
VOID STDCALL MiniportHalt(
static VOID STDCALL MiniportHalt(
IN NDIS_HANDLE MiniportAdapterContext)
/*
* FUNCTION: Deallocates resources for and halts an adapter
@ -141,7 +151,7 @@ VOID STDCALL MiniportHalt(
}
NDIS_STATUS STDCALL MiniportInitialize(
static NDIS_STATUS STDCALL MiniportInitialize(
OUT PNDIS_STATUS OpenErrorStatus,
OUT PUINT SelectedMediumIndex,
IN PNDIS_MEDIUM MediumArray,
@ -349,7 +359,7 @@ NDIS_STATUS STDCALL MiniportInitialize(
}
VOID STDCALL MiniportISR(
static VOID STDCALL MiniportISR(
OUT PBOOLEAN InterruptRecognized,
OUT PBOOLEAN QueueMiniportHandleInterrupt,
IN NDIS_HANDLE MiniportAdapterContext)
@ -374,7 +384,7 @@ VOID STDCALL MiniportISR(
}
NDIS_STATUS STDCALL MiniportQueryInformation(
static NDIS_STATUS STDCALL MiniportQueryInformation(
IN NDIS_HANDLE MiniportAdapterContext,
IN NDIS_OID Oid,
IN PVOID InformationBuffer,
@ -532,7 +542,7 @@ NDIS_STATUS STDCALL MiniportQueryInformation(
}
NDIS_STATUS STDCALL MiniportReconfigure(
static NDIS_STATUS STDCALL MiniportReconfigure(
OUT PNDIS_STATUS OpenErrorStatus,
IN NDIS_HANDLE MiniportAdapterContext,
IN NDIS_HANDLE WrapperConfigurationContext)
@ -555,7 +565,7 @@ NDIS_STATUS STDCALL MiniportReconfigure(
NDIS_STATUS STDCALL MiniportReset(
static NDIS_STATUS STDCALL MiniportReset(
OUT PBOOLEAN AddressingReset,
IN NDIS_HANDLE MiniportAdapterContext)
/*
@ -575,7 +585,7 @@ NDIS_STATUS STDCALL MiniportReset(
}
NDIS_STATUS STDCALL MiniportSend(
static NDIS_STATUS STDCALL MiniportSend(
IN NDIS_HANDLE MiniportAdapterContext,
IN PNDIS_PACKET Packet,
IN UINT Flags)
@ -616,7 +626,7 @@ NDIS_STATUS STDCALL MiniportSend(
}
NDIS_STATUS STDCALL MiniportSetInformation(
static NDIS_STATUS STDCALL MiniportSetInformation(
IN NDIS_HANDLE MiniportAdapterContext,
IN NDIS_OID Oid,
IN PVOID InformationBuffer,
@ -722,7 +732,7 @@ NDIS_STATUS STDCALL MiniportSetInformation(
}
NDIS_STATUS STDCALL MiniportTransferData(
static NDIS_STATUS STDCALL MiniportTransferData(
OUT PNDIS_PACKET Packet,
OUT PUINT BytesTransferred,
IN NDIS_HANDLE MiniportAdapterContext,

View file

@ -46,7 +46,13 @@
#define NDEBUG
#include <debug.h>
VOID
NTSTATUS
STDCALL
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath);
static VOID
STDCALL
MiniportHandleInterrupt(
IN NDIS_HANDLE MiniportAdapterContext)
@ -213,7 +219,7 @@ MiniportHandleInterrupt(
NdisDprReleaseSpinLock(&Adapter->Lock);
}
NDIS_STATUS
static NDIS_STATUS
MiQueryCard(
IN PADAPTER Adapter)
/*
@ -290,7 +296,7 @@ MiQueryCard(
return NDIS_STATUS_SUCCESS;
}
NDIS_STATUS
static NDIS_STATUS
MiAllocateSharedMemory(
PADAPTER Adapter)
/*
@ -436,7 +442,7 @@ MiAllocateSharedMemory(
return NDIS_STATUS_SUCCESS;
}
VOID
static VOID
MiPrepareInitializationBlock(
PADAPTER Adapter)
/*
@ -471,7 +477,7 @@ MiPrepareInitializationBlock(
Adapter->InitializationBlockVirt->TLEN = (LOG_NUMBER_OF_BUFFERS << 4) & 0xf0;
}
VOID
static VOID
MiFreeSharedMemory(
PADAPTER Adapter)
/*
@ -520,7 +526,7 @@ MiFreeSharedMemory(
}
}
BOOLEAN
static BOOLEAN
STDCALL
MiSyncStop(
IN PVOID SynchronizeContext)
@ -536,7 +542,7 @@ MiSyncStop(
return TRUE;
}
VOID
static VOID
STDCALL
MiniportHalt(
IN NDIS_HANDLE MiniportAdapterContext)
@ -579,7 +585,7 @@ MiniportHalt(
NdisFreeMemory(Adapter, 0, 0);
}
BOOLEAN
static BOOLEAN
STDCALL
MiSyncMediaDetection(
IN PVOID SynchronizeContext)
@ -602,7 +608,7 @@ MiSyncMediaDetection(
return FALSE;
}
VOID
static VOID
STDCALL
MiniportMediaDetectionTimer(
IN PVOID SystemSpecific1,
@ -631,7 +637,7 @@ MiniportMediaDetectionTimer(
}
}
VOID
static VOID
MiInitChip(
PADAPTER Adapter)
/*
@ -713,7 +719,7 @@ MiInitChip(
Adapter->Flags &= ~RESET_IN_PROGRESS;
}
BOOLEAN
static BOOLEAN
MiTestCard(
PADAPTER Adapter)
/*
@ -770,7 +776,7 @@ MiTestCard(
return TRUE;
}
NDIS_STATUS
static NDIS_STATUS
STDCALL
MiniportInitialize(
OUT PNDIS_STATUS OpenErrorStatus,
@ -944,7 +950,7 @@ MiniportInitialize(
return Status;
}
VOID
static VOID
STDCALL
MiniportISR(
OUT PBOOLEAN InterruptRecognized,
@ -997,7 +1003,7 @@ MiniportISR(
NdisRawWritePortUshort(Adapter->PortOffset + RAP, Rap);
}
NDIS_STATUS
static NDIS_STATUS
STDCALL
MiniportReset(
OUT PBOOLEAN AddressingReset,
@ -1022,7 +1028,7 @@ MiniportReset(
return NDIS_STATUS_SUCCESS;
}
BOOLEAN
static BOOLEAN
STDCALL
MiSyncStartTransmit(
IN PVOID SynchronizeContext)
@ -1038,7 +1044,7 @@ MiSyncStartTransmit(
return TRUE;
}
NDIS_STATUS
static NDIS_STATUS
STDCALL
MiniportSend(
IN NDIS_HANDLE MiniportAdapterContext,
@ -1127,7 +1133,7 @@ MiniportSend(
return NDIS_STATUS_SUCCESS;
}
ULONG
static ULONG
STDCALL
MiEthernetCrc(UCHAR *Address)
/*

View file

@ -42,7 +42,7 @@ extern _SEHRegistration_t * __cdecl _SEHCurrentRegistration(void);
extern void __stdcall RtlUnwind(void *, void *, void *, void *);
void const * _SEHRtlUnwind = RtlUnwind;
void __stdcall _SEHLocalUnwind
static void __stdcall _SEHLocalUnwind
(
_SEHPortableFrame_t * frame,
_SEHPortableTryLevel_t * dsttrylevel
@ -68,7 +68,7 @@ void __stdcall _SEHLocalUnwind
}
}
void __cdecl _SEHCallHandler
static void __cdecl _SEHCallHandler
(
_SEHPortableFrame_t * frame,
_SEHPortableTryLevel_t * trylevel
@ -79,7 +79,7 @@ void __cdecl _SEHCallHandler
frame->SPF_Handler(trylevel);
}
int __cdecl _SEHFrameHandler
static int __cdecl _SEHFrameHandler
(
struct _EXCEPTION_RECORD * ExceptionRecord,
void * EstablisherFrame,

View file

@ -1018,6 +1018,7 @@ RtlDescribeChunk@20
RtlDestroyAtomTable@4
RtlDestroyHeap@4
RtlDowncaseUnicodeString@12
RtlDuplicateUnicodeString@12
RtlEmptyAtomTable@8
RtlEnlargedIntegerMultiply@8
RtlEnlargedUnsignedDivide@16

View file

@ -3642,6 +3642,14 @@ RtlCopySid (
IN PSID Source
);
NTSYSAPI
BOOLEAN
NTAPI
RtlCreateUnicodeString(
PUNICODE_STRING DestinationString,
PCWSTR SourceString
);
NTSYSAPI
NTSTATUS
NTAPI
@ -3701,6 +3709,15 @@ RtlDowncaseUnicodeString(
IN BOOLEAN AllocateDestinationString
);
NTSYSAPI
NTSTATUS
NTAPI
RtlDuplicateUnicodeString(
IN ULONG Flags,
IN PCUNICODE_STRING SourceString,
OUT PUNICODE_STRING DestinationString
);
NTSYSAPI
BOOLEAN
NTAPI